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.
|
2016-09-16 22:43:32 -03:00
|
|
|
* It's not an elegant solution but we can improve it in future.
|
2012-12-11 19:19:52 -04:00
|
|
|
*/
|
2016-08-30 12:59:12 -03:00
|
|
|
#pragma once
|
2014-07-23 09:23:26 -03:00
|
|
|
|
2015-11-01 07:22:15 -04:00
|
|
|
#define HAL_BOARD_SITL 3
|
2016-08-30 12:59:12 -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
|
2016-08-30 12:59:12 -03:00
|
|
|
#define HAL_BOARD_EMPTY 99
|
2012-12-11 19:19:52 -04:00
|
|
|
|
2016-08-30 12:59:12 -03:00
|
|
|
/* Default board subtype is -1 */
|
2014-08-13 01:42:52 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_NONE -1
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2016-08-30 12:59:12 -03:00
|
|
|
/* HAL Linux sub-types, starting at 1000 */
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_NONE 1000
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_ERLEBOARD 1001
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_PXF 1002
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_NAVIO 1003
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_ZYNQ 1004
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BBBMINI 1005
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BEBOP 1006
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_RASPILOT 1007
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_MINLURE 1008
|
2015-11-01 07:22:15 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2 1009
|
2016-08-30 12:59:12 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BH 1010
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_QFLIGHT 1011
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_PXFMINI 1012
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_NAVIO2 1013
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_DISCO 1014
|
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_AERO 1015
|
2016-10-17 14:11:03 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_DARK 1016
|
2016-03-07 04:11:37 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_URUS 1017
|
2016-12-29 10:52:56 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_LINUX_BLUE 1018
|
2016-08-30 12:59:12 -03:00
|
|
|
|
|
|
|
/* HAL PX4 sub-types, starting at 2000 */
|
|
|
|
#define HAL_BOARD_SUBTYPE_PX4_V1 2000
|
|
|
|
#define HAL_BOARD_SUBTYPE_PX4_V2 2001
|
2016-11-02 19:34:36 -03:00
|
|
|
#define HAL_BOARD_SUBTYPE_PX4_V4 2002
|
2016-12-09 22:04:47 -04:00
|
|
|
#define HAL_BOARD_SUBTYPE_PX4_V3 2003
|
2016-08-30 12:59:12 -03: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
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRCORE_V10 4005
|
|
|
|
#define HAL_BOARD_SUBTYPE_VRBRAIN_V54 4006
|
|
|
|
|
|
|
|
/* InertialSensor driver types */
|
|
|
|
#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
|
2016-08-30 12:59:12 -03:00
|
|
|
#define HAL_INS_L3GD20 10
|
|
|
|
#define HAL_INS_LSM9DS0 11
|
|
|
|
#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
|
2016-08-30 12:59:12 -03:00
|
|
|
#define HAL_INS_QFLIGHT 15
|
|
|
|
#define HAL_INS_QURT 16
|
|
|
|
#define HAL_INS_BBBMINI 17
|
|
|
|
#define HAL_INS_AERO 18
|
2017-02-06 19:51:58 -04:00
|
|
|
#define HAL_INS_MPU6500 19
|
2016-08-30 12:59:12 -03:00
|
|
|
|
|
|
|
/* Barometer driver types */
|
|
|
|
#define HAL_BARO_BMP085 1
|
|
|
|
#define HAL_BARO_MS5611_I2C 2
|
|
|
|
#define HAL_BARO_MS5611_SPI 3
|
|
|
|
#define HAL_BARO_MS5607_I2C 4
|
|
|
|
#define HAL_BARO_PX4 5
|
|
|
|
#define HAL_BARO_HIL 6
|
|
|
|
#define HAL_BARO_VRBRAIN 7
|
|
|
|
#define HAL_BARO_MS5637_I2C 8
|
|
|
|
#define HAL_BARO_QFLIGHT 9
|
|
|
|
#define HAL_BARO_QURT 10
|
2016-12-29 10:53:32 -04:00
|
|
|
#define HAL_BARO_BMP280_I2C 11
|
2017-01-17 05:26:06 -04:00
|
|
|
#define HAL_BARO_BMP280_SPI 12
|
2016-08-30 12:59:12 -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
|
|
|
|
#define HAL_COMPASS_AK8963_MPU9250 5
|
|
|
|
#define HAL_COMPASS_AK8963_I2C 6
|
|
|
|
#define HAL_COMPASS_HMC5843_MPU6000 7
|
|
|
|
#define HAL_COMPASS_RASPILOT 8
|
2015-09-28 17:49:15 -03:00
|
|
|
#define HAL_COMPASS_AK8963_MPU9250_I2C 9
|
2016-08-30 12:59:12 -03:00
|
|
|
#define HAL_COMPASS_BH 10
|
|
|
|
#define HAL_COMPASS_QFLIGHT 11
|
|
|
|
#define HAL_COMPASS_QURT 12
|
|
|
|
#define HAL_COMPASS_BBBMINI 13
|
|
|
|
#define HAL_COMPASS_NAVIO2 14
|
|
|
|
#define HAL_COMPASS_NAVIO 15
|
|
|
|
#define HAL_COMPASS_AERO 16
|
|
|
|
|
|
|
|
/* Heat Types */
|
2015-10-02 06:29:27 -03:00
|
|
|
#define HAL_LINUX_HEAT_PWM 1
|
|
|
|
|
2016-08-30 12:59:12 -03:00
|
|
|
/* CPU classes, used to select if CPU intensive algorithms should be used
|
|
|
|
* Note that these are only approximate, not exact CPU speeds. */
|
|
|
|
|
|
|
|
/* DEPRECATED: 16Mhz: AVR2560 or similar */
|
|
|
|
#define HAL_CPU_CLASS_16 1
|
|
|
|
/* 150Mhz: PX4 or similar. Assumes:
|
|
|
|
* - hardware floating point
|
|
|
|
* - tens of kilobytes of memory available */
|
|
|
|
#define HAL_CPU_CLASS_150 3
|
|
|
|
/* GigaHz class: SITL, BeagleBone etc. Assumes megabytes of memory available. */
|
|
|
|
#define HAL_CPU_CLASS_1000 4
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
* - HAL_OS_SOCKETS : has posix-like sockets */
|
|
|
|
|
|
|
|
/* DEFINITIONS FOR BOARDS */
|
2013-12-30 18:24:43 -04:00
|
|
|
|
2015-11-03 09:46:29 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
2016-09-24 07:42:22 -03:00
|
|
|
#include <AP_HAL/board/sitl.h>
|
2012-12-30 04:57:57 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
2016-09-24 07:42:22 -03:00
|
|
|
#include <AP_HAL/board/px4.h>
|
2013-09-22 03:03:28 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
2016-09-24 07:42:22 -03:00
|
|
|
#include <AP_HAL/board/linux.h>
|
2012-12-23 16:30:50 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_EMPTY
|
2016-09-24 07:42:22 -03:00
|
|
|
#include <AP_HAL/board/empty.h>
|
2015-03-24 20:28:26 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_QURT
|
2016-09-24 07:42:22 -03:00
|
|
|
#include <AP_HAL/board/qurt.h>
|
2014-03-31 14:29:33 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
2016-09-24 07:42:22 -03:00
|
|
|
#include <AP_HAL/board/vrbrain.h>
|
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
|
2016-10-30 02:24:21 -03:00
|
|
|
#define HAL_PARAM_DEFAULTS_PATH nullptr
|
2016-01-06 18:09:09 -04:00
|
|
|
#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
|
2016-10-31 22:16:31 -03:00
|
|
|
|
|
|
|
#ifndef HAL_COMPASS_HMC5843_I2C_ADDR
|
|
|
|
#define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
|
|
|
|
#endif
|
|
|
|
|
2016-12-10 03:01:49 -04:00
|
|
|
#ifndef HAL_WITH_UAVCAN
|
|
|
|
#define HAL_WITH_UAVCAN 0
|
|
|
|
#endif
|
|
|
|
|
2017-01-27 00:52:51 -04:00
|
|
|
// this is used as a general mechanism to make a 'small' build by
|
|
|
|
// dropping little used features. We use this to allow us to keep
|
|
|
|
// FMUv2 going for as long as possible
|
|
|
|
#ifndef HAL_MINIMIZE_FEATURES
|
|
|
|
#define HAL_MINIMIZE_FEATURES 0
|
|
|
|
#endif
|