fm_ccjy/Board/Inc/hc165.h

20 lines
814 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*** 74hc165.h ***/
#ifndef _74HC165_H
#define _74HC165_H
#include "main.h"
#define HC165_CLK_H() LL_GPIO_SetOutputPin(HC165_CLK_GPIO_Port, HC165_CLK_Pin)
#define HC165_CLK_L() LL_GPIO_ResetOutputPin(HC165_CLK_GPIO_Port, HC165_CLK_Pin)//HC165时钟上升沿触发
#define HC165_LD_H() LL_GPIO_SetOutputPin(HC165_LD_GPIO_Port, HC165_LD_Pin)
#define HC165_LD_L() LL_GPIO_ResetOutputPin(HC165_LD_GPIO_Port, HC165_LD_Pin)//并行数据输入使能,低电平有效
#define HC165_INH_H() LL_GPIO_SetOutputPin(HC165_INH_GPIO_Port, HC165_INH_Pin)
#define HC165_INH_L() LL_GPIO_ResetOutputPin(HC165_INH_GPIO_Port, HC165_INH_Pin)//时钟使能,低电平有效
#define HC165_DAT_OUT LL_GPIO_IsInputPinSet(HC165_DAT_GPIO_Port,HC165_DAT_Pin) //读取串行数据输出引脚电平
void _74hc165_init(void);
uint16_t _74hc165_read_byte(void);
#endif