2016-02-17 21:25:25 -04:00
|
|
|
#pragma once
|
2012-12-11 19:19:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* C preprocesor enumeration of the boards supported by the AP_HAL.
|
|
|
|
* This list exists so HAL_BOARD == HAL_BOARD_xxx preprocessor blocks
|
|
|
|
* can be used to exclude HAL boards from the build when appropriate.
|
2015-11-03 09:46:29 -04:00
|
|
|
* Its not an elegant solution but we can improve it in future.
|
2012-12-11 19:19:52 -04:00
|
|
|
*/
|
2014-07-23 09:23:26 -03:00
|
|
|
|
2015-11-01 07:22:15 -04:00
|
|
|
#define HAL_BOARD_SITL 3
|
2013-09-26 09:37:19 -03:00
|
|
|
#define HAL_BOARD_SMACCM 4 // unused
|
2013-09-22 03:02:42 -03:00
|
|
|
#define HAL_BOARD_PX4 5
|
2013-09-22 03:03:28 -03:00
|
|
|
#define HAL_BOARD_LINUX 7
|
2014-03-31 14:29:33 -03:00
|
|
|
#define HAL_BOARD_VRBRAIN 8
|
2015-03-24 20:28:26 -03:00
|
|
|
#define HAL_BOARD_QURT 9
|
2012-12-14 21:18:55 -04:00
|
|
|
#define HAL_BOARD_EMPTY 99
|
2012-12-11 19:19:52 -04:00
|
|
|
|
2014-08-13 01:42:52 -03:00
|
|
|
// default board subtype is -1
|
|
|
|
#define HAL_BOARD_SUBTYPE_NONE -1
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2014-07-06 23:02:50 -03:00
|
|
|
/**
|
2014-08-13 01:42:52 -03:00
|
|
|
HAL Linux sub-types, starting at 1000
|
2014-07-06 23:02:50 -03:00
|
|
|
*/
|
2014-08-13 01:42:52 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_NONE 1000
|
2015-09-06 18:31:33 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_ERLEBOARD 1001
|
2014-08-13 01:42:52 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_PXF 1002
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_NAVIO 1003
|
2014-11-13 19:15:51 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_ZYNQ 1004
|
2015-01-10 19:16:28 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BBBMINI 1005
|
2015-08-17 22:16:50 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BEBOP 1006
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_RASPILOT 1007
|
2015-08-11 18:41:05 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_MINLURE 1008
|
2015-11-01 07:22:15 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2 1009
|
2015-11-28 05:18:40 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BH 1010
|
2015-12-13 23:18:52 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_QFLIGHT 1011
|
2016-01-05 06:28:06 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_PXFMINI 1012
|
2016-01-20 08:56:00 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_NAVIO2 1013
|
2016-06-06 19:14:47 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_DISCO 1014
|
2014-08-13 01:42:52 -03:00
|
|
|
|
|
|
|
/**
|
|
|
|
HAL PX4 sub-types, starting at 2000
|
|
|
|
*/
|
|
|
|
#define HAL_BOARD_SUBTYPE_PX4_V1 2000
|
|
|
|
#define HAL_BOARD_SUBTYPE_PX4_V2 2001
|
|
|
|
|
2014-12-30 06:29:36 -04:00
|
|
|
/**
|
|
|
|
HAL VRBRAIN sub-types, starting at 4000
|
|
|
|
*/
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRBRAIN_V45 4000
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRBRAIN_V51 4001
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRBRAIN_V52 4002
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRUBRAIN_V51 4003
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRUBRAIN_V52 4004
|
2016-07-05 12:22:35 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_VRCORE_V10 4005
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRBRAIN_V54 4006
|
2014-12-30 06:29:36 -04:00
|
|
|
|
2014-07-06 23:02:50 -03:00
|
|
|
// InertialSensor driver types
|
2015-07-10 00:52:09 -03:00
|
|
|
#define HAL_INS_MPU60XX_SPI 2
|
|
|
|
#define HAL_INS_MPU60XX_I2C 3
|
|
|
|
#define HAL_INS_HIL 4
|
|
|
|
#define HAL_INS_PX4 5
|
|
|
|
#define HAL_INS_L3G4200D 7
|
|
|
|
#define HAL_INS_VRBRAIN 8
|
2016-01-20 18:20:35 -04:00
|
|
|
#define HAL_INS_MPU9250_SPI 9
|
2015-07-10 00:52:09 -03:00
|
|
|
#define HAL_INS_L3GD20 10
|
|
|
|
#define HAL_INS_LSM9DS0 11
|
2015-08-17 22:16:50 -03:00
|
|
|
#define HAL_INS_RASPILOT 12
|
2015-09-28 13:49:32 -03:00
|
|
|
#define HAL_INS_MPU9250_I2C 13
|
2015-11-28 05:18:40 -04:00
|
|
|
#define HAL_INS_BH 14
|
2015-12-13 23:18:52 -04:00
|
|
|
#define HAL_INS_QFLIGHT 15
|
2015-03-24 20:28:26 -03:00
|
|
|
#define HAL_INS_QURT 16
|
2016-04-24 05:25:36 -03:00
|
|
|
#define HAL_INS_BBBMINI 17
|
2014-07-06 23:02:50 -03:00
|
|
|
|
|
|
|
// barometer driver types
|
|
|
|
#define HAL_BARO_BMP085 1
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_MS5611_I2C 2
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_BARO_MS5611_SPI 3
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_MS5607_I2C 4
|
2015-07-10 00:55:19 -03:00
|
|
|
#define HAL_BARO_PX4 5
|
|
|
|
#define HAL_BARO_HIL 6
|
|
|
|
#define HAL_BARO_VRBRAIN 7
|
2015-09-28 14:31:16 -03:00
|
|
|
#define HAL_BARO_MS5637_I2C 8
|
2015-12-13 23:18:52 -04:00
|
|
|
#define HAL_BARO_QFLIGHT 9
|
2015-03-24 20:28:26 -03:00
|
|
|
#define HAL_BARO_QURT 10
|
2014-07-06 23:02:50 -03:00
|
|
|
|
|
|
|
// compass driver types
|
|
|
|
#define HAL_COMPASS_HMC5843 1
|
|
|
|
#define HAL_COMPASS_PX4 2
|
|
|
|
#define HAL_COMPASS_HIL 3
|
|
|
|
#define HAL_COMPASS_VRBRAIN 4
|
2015-02-23 17:27:52 -04:00
|
|
|
#define HAL_COMPASS_AK8963_MPU9250 5
|
2015-07-10 01:04:52 -03:00
|
|
|
#define HAL_COMPASS_AK8963_I2C 6
|
2015-08-12 16:16:18 -03:00
|
|
|
#define HAL_COMPASS_HMC5843_MPU6000 7
|
2015-08-17 22:16:50 -03:00
|
|
|
#define HAL_COMPASS_RASPILOT 8
|
2015-09-28 17:49:15 -03:00
|
|
|
#define HAL_COMPASS_AK8963_MPU9250_I2C 9
|
2015-11-28 05:18:40 -04:00
|
|
|
#define HAL_COMPASS_BH 10
|
2015-12-13 23:18:52 -04:00
|
|
|
#define HAL_COMPASS_QFLIGHT 11
|
2015-03-24 20:28:26 -03:00
|
|
|
#define HAL_COMPASS_QURT 12
|
2016-04-24 05:25:36 -03:00
|
|
|
#define HAL_COMPASS_BBBMINI 13
|
2016-04-25 12:34:45 -03:00
|
|
|
#define HAL_COMPASS_NAVIO2 14
|
2016-04-29 09:55:17 -03:00
|
|
|
#define HAL_COMPASS_NAVIO 15
|
2014-07-06 23:02:50 -03:00
|
|
|
|
2015-10-02 06:29:27 -03:00
|
|
|
// Heat Types
|
|
|
|
#define HAL_LINUX_HEAT_PWM 1
|
|
|
|
|
2013-12-30 18:24:43 -04:00
|
|
|
/**
|
|
|
|
CPU classes, used to select if CPU intensive algorithms should be used
|
|
|
|
|
2014-07-23 09:23:26 -03:00
|
|
|
Note that these are only approximate, not exact CPU speeds.
|
2013-12-30 18:24:43 -04:00
|
|
|
*/
|
2015-11-03 09:46:39 -04:00
|
|
|
#define HAL_CPU_CLASS_16 1 // DEPRECATED: 16Mhz, AVR2560 or similar
|
2013-12-30 18:24:43 -04:00
|
|
|
#define HAL_CPU_CLASS_150 3 // 150Mhz, PX4 or similar, assumes
|
|
|
|
// hardware floating point. Assumes tens
|
|
|
|
// of kilobytes of memory available
|
|
|
|
#define HAL_CPU_CLASS_1000 4 // GigaHz class, SITL, BeagleBone etc,
|
|
|
|
// assumes megabytes of memory available
|
|
|
|
|
|
|
|
/**
|
|
|
|
operating system features:
|
|
|
|
|
|
|
|
HAL implementations may define the following extra feature defines
|
|
|
|
to 1 if available
|
|
|
|
|
|
|
|
HAL_OS_POSIX_IO : has posix-like filesystem IO
|
2015-05-05 08:27:59 -03:00
|
|
|
HAL_OS_SOCKETS : has posix-like sockets
|
2013-12-30 18:24:43 -04:00
|
|
|
*/
|
|
|
|
|
2015-11-03 09:46:29 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
2013-02-22 19:32:53 -04:00
|
|
|
#define HAL_BOARD_NAME "SITL"
|
2013-12-30 18:24:43 -04:00
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_1000
|
|
|
|
#define HAL_OS_POSIX_IO 1
|
2015-05-05 08:27:59 -03:00
|
|
|
#define HAL_OS_SOCKETS 1
|
2014-08-13 01:42:52 -03:00
|
|
|
#define HAL_STORAGE_SIZE 16384
|
2014-03-12 03:12:24 -03:00
|
|
|
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "logs"
|
2014-07-21 22:28:36 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "terrain"
|
2015-04-01 22:25:09 -03:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "etc/defaults.parm"
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_HIL
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_HIL
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL
|
2015-11-26 09:48:59 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 61
|
|
|
|
#define HAL_GPIO_B_LED_PIN 48
|
|
|
|
#define HAL_GPIO_C_LED_PIN 117
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2012-12-30 04:57:57 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
2013-02-22 19:32:53 -04:00
|
|
|
#define HAL_BOARD_NAME "PX4"
|
2013-12-30 18:24:43 -04:00
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_150
|
|
|
|
#define HAL_OS_POSIX_IO 1
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/fs/microsd/APM/LOGS"
|
2014-07-21 22:28:36 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/fs/microsd/APM/TERRAIN"
|
2015-04-01 22:25:09 -03:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/etc/defaults.parm"
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_PX4
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_PX4
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_PX4
|
|
|
|
#define HAL_SERIAL0_BAUD_DEFAULT 115200
|
2014-08-13 01:42:52 -03:00
|
|
|
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_PX4_V1
|
|
|
|
#define HAL_STORAGE_SIZE 8192
|
|
|
|
#else
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_PX4_V2
|
|
|
|
#define HAL_STORAGE_SIZE 16384
|
2016-06-15 05:00:55 -03:00
|
|
|
#define HAL_HAVE_IMU_HEATER 1 // for Pixhawk2
|
|
|
|
#define HAL_IMU_TEMP_DEFAULT -1 // disabled
|
2014-08-13 01:42:52 -03:00
|
|
|
#endif
|
2015-11-26 09:48:59 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 27
|
|
|
|
#define HAL_GPIO_B_LED_PIN 26
|
|
|
|
#define HAL_GPIO_C_LED_PIN 25
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2013-09-22 03:03:28 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
|
|
|
#define HAL_BOARD_NAME "Linux"
|
2013-12-30 18:24:43 -04:00
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_1000
|
|
|
|
#define HAL_OS_POSIX_IO 1
|
2015-05-05 08:27:59 -03:00
|
|
|
#define HAL_OS_SOCKETS 1
|
2015-01-02 07:08:38 -04:00
|
|
|
#define HAL_STORAGE_SIZE 16384
|
2014-03-12 03:12:24 -03:00
|
|
|
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
|
2014-07-06 23:02:50 -03:00
|
|
|
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NONE
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "logs"
|
2014-07-21 22:28:36 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "terrain"
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_HIL
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_HIL
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL
|
2015-11-26 09:48:59 -04:00
|
|
|
|
2015-09-06 18:31:33 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBOARD
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
2014-07-21 22:28:36 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
2016-01-20 18:20:35 -04:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
2015-07-09 21:22:59 -03:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
|
2016-03-04 15:11:09 -04:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2015-11-26 09:48:59 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 61
|
|
|
|
#define HAL_GPIO_B_LED_PIN 48
|
|
|
|
#define HAL_GPIO_C_LED_PIN 117
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2015-07-09 21:22:59 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
|
2015-07-10 03:29:13 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/data/ftp/internal_000/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/data/ftp/internal_000/APM/terrain"
|
2015-07-10 00:52:09 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C
|
2016-01-12 14:22:11 -04:00
|
|
|
#define HAL_INS_MPU60x0_I2C_BUS 2
|
|
|
|
#define HAL_INS_MPU60x0_I2C_ADDR 0x68
|
2015-07-10 01:04:52 -03:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C
|
2016-03-10 17:15:15 -04:00
|
|
|
#define HAL_COMPASS_AK8963_I2C_BUS 1
|
2015-06-22 09:28:48 -03:00
|
|
|
#define HAL_COMPASS_AK8963_I2C_ADDR 0x0d
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5607_I2C
|
2015-06-19 09:25:22 -03:00
|
|
|
#define HAL_BARO_MS5607_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5607_I2C_ADDR 0x77
|
2016-06-15 05:00:55 -03:00
|
|
|
#define HAL_HAVE_IMU_HEATER 1
|
|
|
|
#define HAL_IMU_TEMP_DEFAULT 55
|
2015-10-02 06:29:27 -03:00
|
|
|
#define HAL_UTILS_HEAT HAL_LINUX_HEAT_PWM
|
2015-11-27 06:36:00 -04:00
|
|
|
#define HAL_LINUX_HEAT_PWM_NUM 6
|
2015-10-02 06:29:27 -03:00
|
|
|
#define HAL_LINUX_HEAT_KP 20000
|
|
|
|
#define HAL_LINUX_HEAT_KI 6
|
|
|
|
#define HAL_LINUX_HEAT_PERIOD_NS 125000
|
|
|
|
#define HAL_LINUX_HEAT_TARGET_TEMP 50
|
2015-11-24 05:32:45 -04:00
|
|
|
#define BEBOP_CAMV_PWM 9
|
|
|
|
#define BEBOP_CAMV_PWM_FREQ 43333333
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SUBDEV_PATH "/dev/v4l-subdev0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
2016-05-13 05:15:10 -03:00
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
2015-11-24 05:32:45 -04:00
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
2015-12-22 12:06:39 -04:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/etc/arducopter/bebop.parm"
|
2016-07-12 15:55:39 -03:00
|
|
|
#define HAL_RCOUT_BEBOP_BLDC_I2C_BUS 1
|
2016-04-14 17:40:45 -03:00
|
|
|
#define HAL_RCOUT_BEBOP_BLDC_I2C_ADDR 0x08
|
2015-11-24 05:32:45 -04:00
|
|
|
/* focal length 3.6 um, 2x binning in each direction
|
|
|
|
* 240x240 crop rescaled to 64x64 */
|
2016-07-25 17:00:02 -03:00
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 0
|
2015-11-24 05:32:45 -04:00
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (2.5 / (3.6 * 2.0 * 240 / 64))
|
2016-06-06 19:14:47 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/data/ftp/internal_000/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/data/ftp/internal_000/APM/terrain"
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C
|
|
|
|
#define HAL_INS_MPU60x0_I2C_BUS 2
|
|
|
|
#define HAL_INS_MPU60x0_I2C_ADDR 0x68
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_AK8963_I2C_ADDR 0x0d
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5607_I2C
|
|
|
|
#define HAL_BARO_MS5607_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5607_I2C_ADDR 0x77
|
|
|
|
#define HAL_AIRSPEED_MS4515DO_I2C_BUS 1
|
|
|
|
#define HAL_UTILS_HEAT HAL_LINUX_HEAT_PWM
|
|
|
|
#define HAL_LINUX_HEAT_PWM_NUM 10
|
|
|
|
#define HAL_LINUX_HEAT_KP 20000
|
|
|
|
#define HAL_LINUX_HEAT_KI 6
|
|
|
|
#define HAL_LINUX_HEAT_PERIOD_NS 125000
|
|
|
|
#define HAL_LINUX_HEAT_TARGET_TEMP 50
|
|
|
|
#define BEBOP_CAMV_PWM 9
|
|
|
|
#define BEBOP_CAMV_PWM_FREQ 43333333
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SUBDEV_PATH "/dev/v4l-subdev0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
|
|
|
#define HAL_RCOUT_DISCO_BLDC_I2C_BUS 1
|
|
|
|
#define HAL_RCOUT_DISCO_BLDC_I2C_ADDR 0x08
|
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/etc/arducopter/bebop.parm"
|
|
|
|
/* focal length 3.6 um, 2x binning in each direction
|
|
|
|
* 240x240 crop rescaled to 64x64 */
|
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (2.5 / (3.6 * 2.0 * 240 / 64))
|
2016-07-25 17:00:02 -03:00
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 0
|
2015-08-11 18:41:05 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_MINLURE
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI
|
2016-01-12 14:22:11 -04:00
|
|
|
#define HAL_INS_MPU60x0_NAME "mpu6000"
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 10
|
2015-08-11 18:41:05 -03:00
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
2016-03-23 20:10:21 -03:00
|
|
|
/* Internal and external compasses */
|
2016-03-04 15:11:09 -04:00
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2015-05-10 21:16:01 -03:00
|
|
|
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
2016-05-13 05:15:10 -03:00
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
2015-05-10 21:16:01 -03:00
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/etc/arducopter/minlure.parm"
|
|
|
|
/* ELP-USBFHD01M-L21
|
|
|
|
* focal length 2.1 mm, pixel size 3 um
|
|
|
|
* 240x240 crop rescaled to 64x64 */
|
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (3.0 / (2.1 * 2.0 * 240 / 64))
|
2014-07-23 09:23:26 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
2015-04-09 09:55:16 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
2016-01-20 18:20:35 -04:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
2015-06-19 09:25:22 -03:00
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
2016-04-29 09:55:17 -03:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_NAVIO
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2016-01-20 08:56:00 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
2016-04-25 12:34:45 -03:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_NAVIO2
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2015-11-26 09:48:59 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 16
|
|
|
|
#define HAL_GPIO_B_LED_PIN 16
|
|
|
|
#define HAL_GPIO_C_LED_PIN 16
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2015-08-17 22:16:50 -03:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_RASPILOT
|
2016-01-12 14:22:11 -04:00
|
|
|
#define HAL_INS_MPU60x0_NAME "mpu6000"
|
2016-03-10 13:18:46 -04:00
|
|
|
#define HAL_INS_LSM9DS0_G_NAME "lsm9ds0_g"
|
|
|
|
#define HAL_INS_LSM9DS0_A_NAME "lsm9ds0_am"
|
2015-08-17 22:16:50 -03:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
2015-08-17 22:16:50 -03:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_RASPILOT
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2015-11-01 07:22:15 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
2016-01-20 18:20:35 -04:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2015-11-01 07:22:15 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
2015-11-01 07:22:15 -04:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2015-11-26 09:48:59 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 24
|
|
|
|
#define HAL_GPIO_B_LED_PIN 25
|
|
|
|
#define HAL_GPIO_C_LED_PIN 16
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2014-11-13 19:15:51 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ZYNQ
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
|
|
|
// Stub the sensors out for now, at least we can build and run
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_HIL
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_HIL
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL
|
2015-01-10 19:16:28 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
2016-04-24 05:25:36 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_BBBMINI
|
2016-01-20 18:20:35 -04:00
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2016-04-24 05:25:36 -03:00
|
|
|
#define HAL_INS_MPU9250_NAME_EXT "mpu9250ext"
|
2015-01-10 19:16:28 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
2016-04-24 05:25:36 -03:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_BBBMINI
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 2
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2016-02-06 16:13:41 -04:00
|
|
|
#define HAL_OPTFLOW_ONBOARD_VDEV_PATH "/dev/video0"
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_WIDTH 320
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_SENSOR_HEIGHT 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_WIDTH 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_OUTPUT_HEIGHT 64
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_WIDTH 240
|
|
|
|
#define HAL_OPTFLOW_ONBOARD_CROP_HEIGHT 240
|
2016-05-13 05:15:10 -03:00
|
|
|
#define HAL_OPTFLOW_ONBOARD_NBUFS 8
|
2016-02-06 16:13:41 -04:00
|
|
|
#define HAL_FLOW_PX4_MAX_FLOW_PIXEL 4
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_FEATURE_THRESHOLD 30
|
|
|
|
#define HAL_FLOW_PX4_BOTTOM_FLOW_VALUE_THRESHOLD 5000
|
|
|
|
/* ELP-USBFHD01M-L21
|
|
|
|
* focal length 2.1 mm, pixel size 3 um
|
|
|
|
* 240x240 crop rescaled to 64x64 */
|
|
|
|
#define HAL_FLOW_PX4_FOCAL_LENGTH_MILLIPX (3.0 / (2.1 * 2.0 * 240 / 64))
|
2016-07-25 17:00:02 -03:00
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 2
|
2015-11-28 05:18:40 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BH
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
2016-01-04 09:59:19 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
|
|
|
|
#define HAL_BARO_MS5611_I2C_BUS 1
|
2015-11-28 05:18:40 -04:00
|
|
|
#define HAL_BARO_MS5611_I2C_ADDR 0x77
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_BH
|
2016-03-07 12:46:14 -04:00
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2016-01-12 14:22:11 -04:00
|
|
|
#define HAL_INS_MPU60x0_I2C_BUS 1
|
|
|
|
#define HAL_INS_MPU60x0_I2C_ADDR 0x69
|
2015-11-28 05:18:40 -04:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_BH
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2015-11-28 05:18:40 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 17
|
|
|
|
#define HAL_GPIO_B_LED_PIN 18
|
|
|
|
#define HAL_GPIO_C_LED_PIN 22
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
|
|
|
#define HAL_RCOUT_RGBLED_RED 13
|
|
|
|
#define HAL_RCOUT_RGBLED_GREEN 14
|
|
|
|
#define HAL_RCOUT_RGBLED_BLUE 15
|
2015-12-13 23:18:52 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_QFLIGHT
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_QFLIGHT
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_QFLIGHT
|
2015-12-14 17:23:14 -04:00
|
|
|
#define HAL_LINUX_UARTS_ON_TIMER_THREAD 1
|
2016-01-05 06:28:06 -04:00
|
|
|
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/var/APM/logs"
|
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/var/APM/terrain"
|
2016-01-20 18:20:35 -04:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
|
|
|
|
#define HAL_INS_MPU9250_NAME "mpu9250"
|
2016-01-05 06:28:06 -04:00
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
|
2016-02-19 13:40:53 -04:00
|
|
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
2016-01-05 06:28:06 -04:00
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
|
2016-03-04 15:11:09 -04:00
|
|
|
/* HMC5843 can be an external compass */
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_BUS 1
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
2016-01-05 06:28:06 -04:00
|
|
|
#define HAL_GPIO_A_LED_PIN 24
|
|
|
|
#define HAL_GPIO_B_LED_PIN 25
|
|
|
|
#define HAL_GPIO_C_LED_PIN 16
|
|
|
|
#define HAL_GPIO_LED_ON LOW
|
|
|
|
#define HAL_GPIO_LED_OFF HIGH
|
2014-08-13 01:42:52 -03:00
|
|
|
#else
|
|
|
|
#error "no Linux board subtype set"
|
2014-07-06 23:02:50 -03:00
|
|
|
#endif
|
2014-07-13 19:52:27 -03:00
|
|
|
|
2016-03-23 14:29:07 -03:00
|
|
|
#ifndef HAL_COMPASS_DEFAULT
|
|
|
|
#define HAL_COMPASS_DEFAULT -1
|
|
|
|
#endif
|
|
|
|
|
2015-12-14 17:23:14 -04:00
|
|
|
#ifndef HAL_LINUX_UARTS_ON_TIMER_THREAD
|
|
|
|
#define HAL_LINUX_UARTS_ON_TIMER_THREAD 0
|
|
|
|
#endif
|
|
|
|
|
2016-04-01 18:11:18 -03:00
|
|
|
#ifndef HAL_OPTFLOW_PX4FLOW_I2C_ADDRESS
|
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_ADDRESS 0x42
|
|
|
|
#endif
|
2015-12-14 17:23:14 -04:00
|
|
|
|
2016-04-29 12:10:21 -03:00
|
|
|
#ifndef HAL_OPTFLOW_PX4FLOW_I2C_BUS
|
|
|
|
#define HAL_OPTFLOW_PX4FLOW_I2C_BUS 1
|
|
|
|
#endif
|
|
|
|
|
2012-12-23 16:30:50 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_EMPTY
|
2013-02-22 19:32:53 -04:00
|
|
|
#define HAL_BOARD_NAME "EMPTY"
|
2013-12-30 18:24:43 -04:00
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_16
|
2014-03-12 03:12:24 -03:00
|
|
|
#define HAL_STORAGE_SIZE 4096
|
|
|
|
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_HIL
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_HIL
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_HIL
|
2014-08-13 01:42:52 -03:00
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_NONE
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2015-03-24 20:28:26 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_QURT
|
|
|
|
#define AP_HAL_BOARD_DRIVER AP_HAL_QURT
|
|
|
|
#define HAL_BOARD_NAME "QURT"
|
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_1000
|
|
|
|
#define HAL_STORAGE_SIZE 16384
|
|
|
|
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
|
|
|
|
#define HAL_INS_DEFAULT HAL_INS_QURT
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_QURT
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_QURT
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_NONE
|
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/dev/fs/logs"
|
|
|
|
#define HAL_OS_POSIX_IO 1
|
|
|
|
#define HAL_SERIAL0_BAUD_DEFAULT 115200
|
|
|
|
|
2014-03-31 14:29:33 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
|
|
|
#define HAL_BOARD_NAME "VRBRAIN"
|
|
|
|
#define HAL_CPU_CLASS HAL_CPU_CLASS_150
|
|
|
|
#define HAL_OS_POSIX_IO 1
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_BOARD_LOG_DIRECTORY "/fs/microsd/APM/LOGS"
|
2014-08-22 13:36:11 -03:00
|
|
|
#define HAL_BOARD_TERRAIN_DIRECTORY "/fs/microsd/APM/TERRAIN"
|
2016-07-05 12:22:35 -03:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH "/etc/defaults.parm"
|
2014-07-14 10:43:54 -03:00
|
|
|
#define HAL_INS_DEFAULT HAL_INS_VRBRAIN
|
|
|
|
#define HAL_BARO_DEFAULT HAL_BARO_VRBRAIN
|
|
|
|
#define HAL_COMPASS_DEFAULT HAL_COMPASS_VRBRAIN
|
2014-07-06 23:02:50 -03:00
|
|
|
#define HAL_SERIAL0_BAUD_DEFAULT 115200
|
2014-11-14 10:09:16 -04:00
|
|
|
#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
|
2014-12-30 06:29:36 -04:00
|
|
|
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRBRAIN_V52
|
|
|
|
#define HAL_STORAGE_SIZE 16384
|
2014-11-14 10:09:16 -04:00
|
|
|
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V51)
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRUBRAIN_V51
|
|
|
|
#define HAL_STORAGE_SIZE 8192
|
2014-12-30 06:29:36 -04:00
|
|
|
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V52)
|
|
|
|
#define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_VRUBRAIN_V52
|
|
|
|
#define HAL_STORAGE_SIZE 8192
|
2016-07-05 12:22:35 -03:00
|
|
|
#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
|
2014-11-14 10:09:16 -04:00
|
|
|
#endif
|
2015-11-26 09:48:59 -04:00
|
|
|
#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
|
2016-07-05 12:22:35 -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
|
2014-03-31 14:29:33 -03:00
|
|
|
|
2012-12-18 05:04:20 -04:00
|
|
|
#else
|
|
|
|
#error "Unknown CONFIG_HAL_BOARD type"
|
|
|
|
#endif
|
|
|
|
|
2014-08-13 01:42:52 -03:00
|
|
|
#ifndef CONFIG_HAL_BOARD_SUBTYPE
|
|
|
|
#error "No CONFIG_HAL_BOARD_SUBTYPE set"
|
|
|
|
#endif
|
|
|
|
|
2015-03-24 20:28:26 -03:00
|
|
|
#ifndef HAL_OS_POSIX_IO
|
|
|
|
#define HAL_OS_POSIX_IO 0
|
|
|
|
#endif
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2016-02-24 10:30:36 -04:00
|
|
|
#ifndef HAL_OS_SOCKETS
|
|
|
|
#define HAL_OS_SOCKETS 0
|
|
|
|
#endif
|
|
|
|
|
2016-01-06 18:09:09 -04:00
|
|
|
#ifndef HAL_PARAM_DEFAULTS_PATH
|
|
|
|
#define HAL_PARAM_DEFAULTS_PATH NULL
|
|
|
|
#endif
|
2016-06-15 05:00:55 -03:00
|
|
|
|
|
|
|
#ifndef HAL_HAVE_IMU_HEATER
|
|
|
|
#define HAL_HAVE_IMU_HEATER 0
|
|
|
|
#endif
|
2016-07-25 17:00:02 -03:00
|
|
|
|
|
|
|
#ifndef HAL_RANGEFINDER_LIGHTWARE_I2C_BUS
|
|
|
|
#define HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 1
|
|
|
|
#endif
|