#ifndef BOARD_H
#define BOARD_H

#if defined HARDWARE_BT6703
#include "board_bt6703.h"
#elif defined HARDWARE_BT6703_RT
#include "board_bt6703_rt.h"
#elif defined HARDWARE_BT6707
#include "board_bt6707.h"
#elif defined HARDWARE_BT6709
#include "board_bt6709.h"
#elif defined HARDWARE_BT6709_MTS
#include "board_bt6709_mts.h"
#elif defined HARDWARE_BT6710
#include "board_bt6710.h"
#elif defined HARDWARE_BT6711
#include "board_bt6711.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 */
