#pragma once

#define HAL_BOARD_NAME "VRBRAIN"
#define HAL_CPU_CLASS HAL_CPU_CLASS_150
#define HAL_OS_POSIX_IO 1
#define HAL_BOARD_LOG_DIRECTORY "/fs/microsd/APM/LOGS"
#define HAL_BOARD_TERRAIN_DIRECTORY "/fs/microsd/APM/TERRAIN"
#define HAL_PARAM_DEFAULTS_PATH "/etc/defaults.parm"
#define HAL_INS_DEFAULT HAL_INS_VRBRAIN
#define HAL_BARO_DEFAULT HAL_BARO_VRBRAIN
#define HAL_COMPASS_DEFAULT HAL_COMPASS_VRBRAIN
#define HAL_SERIAL0_BAUD_DEFAULT 115200

#if  defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRBRAIN_V45
#define HAL_STORAGE_SIZE            8192
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V51)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRBRAIN_V51
#define HAL_STORAGE_SIZE            16384
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRBRAIN_V52
#define HAL_STORAGE_SIZE            16384
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V51)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRUBRAIN_V51
#define HAL_STORAGE_SIZE            8192
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V52)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRUBRAIN_V52
#define HAL_STORAGE_SIZE            8192
#elif defined(CONFIG_ARCH_BOARD_VRCORE_V10)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRCORE_V10
#define HAL_STORAGE_SIZE            16384
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V54)
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRBRAIN_V54
#define HAL_STORAGE_SIZE            16384
#endif

#define HAL_GPIO_A_LED_PIN        25
#define HAL_GPIO_B_LED_PIN        26
#define HAL_GPIO_C_LED_PIN        27
#define HAL_GPIO_LED_ON           HIGH
#define HAL_GPIO_LED_OFF          LOW
#define EXTERNAL_LED_GPS          28    // GPS LED - AN10
#define EXTERNAL_LED_ARMED        29    // Armed LED - AN11
#define EXTERNAL_LED_MOTOR1       30    // Motor1 LED - AN8
#define EXTERNAL_LED_MOTOR2       31    // Motor2 LED - AN12

