第一次提交
This commit is contained in:
30
Bsp/bsp_rs2251.h
Normal file
30
Bsp/bsp_rs2251.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef __BSP_RS2251_h
|
||||
#define __BSP_RS2251_h
|
||||
#include "at32a423.h"
|
||||
|
||||
|
||||
#define REF_OUT(a) if (a) \
|
||||
gpio_bits_set(GPIOA, GPIO_PINS_3);\
|
||||
else \
|
||||
gpio_bits_reset(GPIOA, GPIO_PINS_3)
|
||||
|
||||
|
||||
// Column_Selection
|
||||
#define C_A(a) if (a) \
|
||||
gpio_bits_set(GPIOB, GPIO_PINS_5);\
|
||||
else \
|
||||
gpio_bits_reset(GPIOB, GPIO_PINS_5)
|
||||
#define C_B(a) if (a) \
|
||||
gpio_bits_set(GPIOB, GPIO_PINS_4);\
|
||||
else \
|
||||
gpio_bits_reset(GPIOB, GPIO_PINS_4)
|
||||
#define C_C(a) if (a) \
|
||||
gpio_bits_set(GPIOB, GPIO_PINS_3);\
|
||||
else \
|
||||
gpio_bits_reset(GPIOB, GPIO_PINS_3)
|
||||
|
||||
|
||||
void RS2251_Init(void);
|
||||
void ref_gpio_init(void);
|
||||
void Choose_AX_Channel(uint8_t data);
|
||||
#endif
|
||||
Reference in New Issue
Block a user