2016-09-24 07:42:22 -03:00
|
|
|
#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
|
|
|
|
|
2018-02-13 21:39:37 -04:00
|
|
|
#define HAL_HAVE_GETTIME_SETTIME 1
|
|
|
|
|
2018-02-03 09:53:48 -04:00
|
|
|
#ifdef CONFIG_ARCH_BOARD_VRBRAIN_V45
|
2016-09-24 07:42:22 -03:00
|
|
|
#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
|
2018-02-03 10:19:45 -04:00
|
|
|
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V52E)
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRBRAIN_V52E
|
|
|
|
#define HAL_STORAGE_SIZE 8192
|
2016-09-24 07:42:22 -03:00
|
|
|
#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
|
2018-02-03 09:53:48 -04:00
|
|
|
#else
|
|
|
|
#error "Unknown VRBRAIN board type"
|
2016-09-24 07:42:22 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define HAL_GPIO_A_LED_PIN 25
|
|
|
|
#define HAL_GPIO_B_LED_PIN 26
|
|
|
|
#define HAL_GPIO_C_LED_PIN 27
|
2018-02-11 17:51:12 -04:00
|
|
|
#define HAL_GPIO_LED_ON 1
|
|
|
|
#define HAL_GPIO_LED_OFF 0
|
2016-09-24 07:42:22 -03:00
|
|
|
#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
|
2018-05-10 03:59:17 -03:00
|
|
|
#define HAL_BUZZER_PIN 32
|
2016-09-24 07:42:22 -03:00
|
|
|
|
2018-02-03 09:53:48 -04:00
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
|
|
|
#define HAL_BARO_MS5611_SPI_INT_NAME "ms5611_int"
|
|
|
|
#define HAL_BARO_MS5611_SPI_EXT_NAME "ms5611_ext"
|
|
|
|
#define HAL_BARO_MS5611_SPI_IMU_NAME "ms5611_imu"
|
|
|
|
|
|
|
|
#define HAL_INS_MPU60x0_NAME "mpu6000"
|
|
|
|
#define HAL_INS_MPU60x0_EXT_NAME "mpu6000_ext"
|
|
|
|
#define HAL_INS_MPU60x0_IMU_NAME "mpu6000_imu"
|
|
|
|
|
|
|
|
#define HAL_INS_LSM9DS0_G_NAME "lsm9ds0_g"
|
|
|
|
#define HAL_INS_LSM9DS0_A_NAME "lsm9ds0_am"
|
|
|
|
|
|
|
|
#define HAL_INS_LSM9DS0_EXT_G_NAME "lsm9ds0_ext_g"
|
|
|
|
#define HAL_INS_LSM9DS0_EXT_A_NAME "lsm9ds0_ext_am"
|
|
|
|
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#define HAL_INS_MPU9250_EXT_NAME "mpu9250_ext"
|
|
|
|
|
|
|
|
#define HAL_INS_MPU6500_NAME "mpu6500"
|
|
|
|
|
|
|
|
#define HAL_INS_ICM20608_NAME "icm20608"
|
|
|
|
#define HAL_INS_ICM20608_AM_NAME "icm20608-am"
|
|
|
|
#define HAL_INS_ICM20608_EXT_NAME "icm20608_ext"
|
|
|
|
|
|
|
|
#define HAL_COMPASS_HMC5843_NAME "hmc5843"
|
|
|
|
#define HAL_COMPASS_HMC5843_EXT_NAME "hmc5843_ext"
|
|
|
|
#define HAL_COMPASS_HMC5843_IMU_NAME "hmc5843_imu"
|
|
|
|
#define HAL_COMPASS_LIS3MDL_NAME "lis3mdl"
|
|
|
|
|
|
|
|
#ifndef HAL_HAVE_BOARD_VOLTAGE
|
2017-03-20 14:57:14 -03:00
|
|
|
#define HAL_HAVE_BOARD_VOLTAGE 0
|
2018-02-03 09:53:48 -04:00
|
|
|
#endif
|
|
|
|
|
2018-11-10 17:41:29 -04:00
|
|
|
#ifndef HAL_HAVE_BOARD_VOLTAGE
|
|
|
|
#define HAL_HAVE_SERVO_VOLTAGE 1
|
|
|
|
#endif
|
|
|
|
|
2018-02-03 09:53:48 -04:00
|
|
|
#ifndef HAL_PX4_HAVE_MTD_SUPPORT
|
2017-03-20 15:16:20 -03:00
|
|
|
#define HAL_PX4_HAVE_MTD_SUPPORT 1
|
2018-02-03 09:53:48 -04:00
|
|
|
#endif
|
|
|
|
#ifndef HAL_PX4_HAVE_PWM_INPUT
|
2017-03-20 16:32:49 -03:00
|
|
|
#define HAL_PX4_HAVE_PWM_INPUT 1
|
2018-02-03 09:53:48 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAL_HAVE_SAFETY_SWITCH
|
|
|
|
#define HAL_HAVE_SAFETY_SWITCH 1
|
|
|
|
#endif
|
2018-08-07 03:37:37 -03:00
|
|
|
|
|
|
|
#include <AP_HAL_VRBRAIN/Semaphores.h>
|
|
|
|
#define HAL_Semaphore VRBRAIN::Semaphore
|
|
|
|
|