31 lines
658 B
C
31 lines
658 B
C
|
|
#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
|