mirror of https://github.com/ArduPilot/ardupilot
AP_HAL: added AP_HAL_BOARD_DRIVER define
this makes example sketches easier to read
This commit is contained in:
parent
abbe37be37
commit
4cff98dcae
|
@ -15,5 +15,21 @@
|
|||
#define HAL_BOARD_AVR_SITL 3
|
||||
#define HAL_BOARD_EMPTY 99
|
||||
|
||||
/*
|
||||
define AP_HAL_BOARD_DRIVER to the right hal type for this
|
||||
board. This prevents us having a mess of ifdefs in every example
|
||||
sketch
|
||||
*/
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||
#define AP_HAL_BOARD_DRIVER AP_HAL_AVR_APM1
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
||||
#define AP_HAL_BOARD_DRIVER AP_HAL_AVR_APM2
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
||||
#define AP_HAL_BOARD_DRIVER AP_HAL_AVR_SITL
|
||||
#else
|
||||
#error "Unknown CONFIG_HAL_BOARD type"
|
||||
#endif
|
||||
|
||||
#endif // __AP_HAL_BOARDS_H__
|
||||
|
||||
|
|
Loading…
Reference in New Issue