/* * IO_Test.h * * Created on: 2020¦~4¤ë21¤é * Author: Wendell */ #ifndef IO_TEST_H_ #define IO_TEST_H_ typedef enum { GPIO_DIR_INPUT = 0, GPIO_DIR_OUTPUT }_GPIO_DIR; typedef enum { GPIO_AM_OK_FLAG = 0, // output GPIO_IO_BD1_1, // output GPIO_IO_BD1_2, // output GPIO_IO_BD2_1, // output GPIO_IO_BD2_2, // output GPIO_ID_BD1_1, // input GPIO_ID_BD1_2, // input GPIO_ID_BD2_1, // input GPIO_ID_BD2_2, // input GPIO_AM_RFID_RST, // output GPIO_AM_RFID_ICC, // output GPIO_BOARD1_PROXIMITY, // input GPIO_BOARD2_PROXIMITY, // input }_SYS_GPIO; #define SYS_GPIO_NUM 16 #define PIN_AM_OK_FLAG 112 #define PIN_IO_BD1_1 26 #define PIN_IO_BD1_2 27 #define PIN_IO_BD2_1 46 #define PIN_IO_BD2_2 47 #define PIN_ID_BD1_1 22 #define PIN_ID_BD1_2 23 #define PIN_ID_BD2_1 44 #define PIN_ID_BD2_2 45 #define PIN_AM_RFID_RST 19 #define PIN_AM_RFID_ICC 20 #define PIN_BOARD1_PROXIMITY 88 #define PIN_BOARD2_PROXIMITY 86 #define PIN_AM_DE_1 89 #define PIN_AM_RE_1 87 #define PIN_ETHERNET_RESET 110 #define ADC_AIN0 0 #define ADC_AIN1 1 #define ADC_AIN2 2 #define ADC_AIN3 3 void gpio_set_direction(int pin, unsigned char dir); void gpio_write(int pin, unsigned char value); int gpio_read(int pin); void DoIOTest(void); #endif /* IO_TEST_H_ */