AP_HAL_ChibiOS: replace HAL_NO_UARTDRIVER with AP_HAL_UARTDRIVER_ENABLED

This commit is contained in:
Peter Barker 2025-01-07 15:19:13 +11:00 committed by Andrew Tridgell
parent 135805d290
commit f29e2cb19c
7 changed files with 10 additions and 6 deletions

View File

@ -48,7 +48,7 @@
#define HAL_SCHEDULER_LOOP_DELAY_ENABLED 1
#endif
#ifndef HAL_NO_UARTDRIVER
#if AP_HAL_UARTDRIVER_ENABLED
static HAL_SERIAL0_DRIVER;
static HAL_SERIAL1_DRIVER;
static HAL_SERIAL2_DRIVER;

View File

@ -18,7 +18,7 @@
#define HAL_FORWARD_OTG2_SERIAL_LOCK_KEY 0x23565283UL
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS && !defined(HAL_NO_UARTDRIVER)
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS && AP_HAL_UARTDRIVER_ENABLED
#include <hal.h>
#include "UARTDriver.h"

View File

@ -29,7 +29,7 @@ FLASH_SIZE_KB 128
# SERIAL_ORDER USART1
SERIAL_ORDER
define HAL_USE_UART FALSE
define HAL_NO_UARTDRIVER TRUE
define AP_HAL_UARTDRIVER_ENABLED 0
define HAL_CAN_POOL_SIZE 6000

View File

@ -117,7 +117,7 @@ define __FPU_PRESENT 0
define HAL_USE_RTC FALSE
define HAL_NO_FLASH_SUPPORT TRUE
define HAL_NO_UARTDRIVER TRUE
define AP_HAL_UARTDRIVER_ENABLED 0
define HAL_LOGGING_ENABLED 0
define DMA_RESERVE_SIZE 0

View File

@ -1221,7 +1221,6 @@ class ChibiOSHWDef(object):
#define HAL_BOOTLOADER_BUILD TRUE
#define HAL_USE_ADC FALSE
#define HAL_USE_EXT FALSE
#define HAL_NO_UARTDRIVER
#define HAL_NO_PRINTF
#define HAL_NO_CCM
#define HAL_USE_I2C FALSE

View File

@ -10,6 +10,11 @@
#define HAL_GYROFFT_ENABLED 0
#endif
// bootloaders use serial directly:
#ifndef AP_HAL_UARTDRIVER_ENABLED
#define AP_HAL_UARTDRIVER_ENABLED 0
#endif
// bootloaders don't talk to the GCS:
#ifndef HAL_GCS_ENABLED
#define HAL_GCS_ENABLED 0

View File

@ -51,7 +51,7 @@ PA15 GPIO_CAN1_SILENT OUTPUT PUSHPULL SPEED_LOW LOW
# disable serial
define HAL_USE_SERIAL FALSE
define HAL_NO_UARTDRIVER TRUE
define AP_HAL_UARTDRIVER_ENABLED 0
define HAL_USE_ADC FALSE