#ifndef BOARD_H
#define BOARD_H

#if defined HARDWARE_BT6702
#include "board_bt6702.h"
#endif

#define EXPAND_AS_ENUM(name, ...) name,
#define EXPAND_AS_DEFS(name, port, pin, flags) {port, pin, flags},
#define ADC_EXPAND_AS_DEFS(name, chan, coef) {chan, coef},

typedef enum gpio_e {
	GPIO_TABLE(EXPAND_AS_ENUM)
	GPIO_TOTAL_COUNT
} gpio_t;

/* to prevent compilation error on pin conflict */
#define MAKE_PIN_CHECK 1
#if MAKE_PIN_CHECK
#define GPIO_EXPAND_AS_CHECK(name, port, pin, flags) port ## pin,
#define ADC_EXPAND_AS_CHECK(name, chan) _ ## chan,
enum gpio_check {
	GPIO_TABLE(GPIO_EXPAND_AS_CHECK)
};
#endif /* MAKE_PIN_CHECK */

#endif /* BOARD_H */
