AP_HAL: reorganize precompiler for HAL_ENABLE_LIBUAVCAN_DRIVERS and HAL_MAX_PROTOCOL_DRIVERS

This commit is contained in:
Tom Pittenger 2021-04-30 18:30:10 -07:00 committed by Andrew Tridgell
parent bdf0efbbe7
commit 806b6a63bf
1 changed files with 2 additions and 2 deletions

View File

@ -217,7 +217,7 @@
#endif
#ifndef HAL_MAX_CAN_PROTOCOL_DRIVERS
#if defined(HAL_BUILD_AP_PERIPH) || defined(HAL_BOOTLOADER_BUILD)
#if defined(HAL_BOOTLOADER_BUILD)
#define HAL_MAX_CAN_PROTOCOL_DRIVERS 0
#else
#define HAL_MAX_CAN_PROTOCOL_DRIVERS HAL_NUM_CAN_IFACES
@ -225,7 +225,7 @@
#endif
#ifndef HAL_ENABLE_LIBUAVCAN_DRIVERS
#define HAL_ENABLE_LIBUAVCAN_DRIVERS (HAL_MAX_CAN_PROTOCOL_DRIVERS > 0)
#define HAL_ENABLE_LIBUAVCAN_DRIVERS (HAL_MAX_CAN_PROTOCOL_DRIVERS > 0) && !defined(HAL_BUILD_AP_PERIPH)
#endif
#ifdef HAVE_LIBDL