AP_BoardConfig: ensure that debug pins are enabled if compiled with debug

This commit is contained in:
Andy Piper 2022-11-27 15:56:15 +00:00 committed by Andrew Tridgell
parent 7884694771
commit 76b5915d5b
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ void AP_BoardConfig::board_init_safety()
*/ */
void AP_BoardConfig::board_init_debug() void AP_BoardConfig::board_init_debug()
{ {
#ifndef HAL_BUILD_AP_PERIPH #if !defined(HAL_BUILD_AP_PERIPH) && !defined(HAL_DEBUG_BUILD)
if ((_options & BOARD_OPTION_DEBUG_ENABLE) == 0) { if ((_options & BOARD_OPTION_DEBUG_ENABLE) == 0) {
#ifdef HAL_GPIO_PIN_JTCK_SWCLK #ifdef HAL_GPIO_PIN_JTCK_SWCLK
palSetLineMode(HAL_GPIO_PIN_JTCK_SWCLK, PAL_MODE_INPUT); palSetLineMode(HAL_GPIO_PIN_JTCK_SWCLK, PAL_MODE_INPUT);
@ -63,7 +63,7 @@ void AP_BoardConfig::board_init_debug()
palSetLineMode(HAL_GPIO_PIN_JTMS_SWDIO, PAL_MODE_INPUT); palSetLineMode(HAL_GPIO_PIN_JTMS_SWDIO, PAL_MODE_INPUT);
#endif #endif
} }
#endif // HAL_BUILD_AP_PERIPH #endif // HAL_BUILD_AP_PERIPH && HAL_DEBUG_BUILD
} }