AP_HAL_ChibiOS: convert to using hal.serial() instead of hal.uartX

This commit is contained in:
Andrew Tridgell 2020-12-11 11:18:37 +11:00
parent e02047861a
commit e54fc4b0de
4 changed files with 6 additions and 6 deletions

View File

@ -195,15 +195,15 @@ static void main_loop()
ChibiOS::Shared_DMA::init();
peripheral_power_enable();
hal.uartA->begin(115200);
hal.serial(0)->begin(115200);
#ifdef HAL_SPI_CHECK_CLOCK_FREQ
// optional test of SPI clock frequencies
ChibiOS::SPIDevice::test_clock_freq();
#endif
hal.uartB->begin(38400);
hal.uartC->begin(57600);
hal.serial(3)->begin(38400);
hal.serial(1)->begin(57600);
hal.analogin->init();
hal.scheduler->init();

View File

@ -12,7 +12,7 @@ define HAL_AIRSPEED_BUS_DEFAULT 0
define AIRSPEED_MAX_SENSORS 1
# ADSB enable
define ADSB_PORT hal.uartB
define ADSB_PORT hal.serial(3)
define HAL_PERIPH_ENABLE_ADSB
define HAL_PERIPH_ENABLE_AIRSPEED
# define HAL_PERIPH_ENABLE_MAG

View File

@ -151,7 +151,7 @@ define HAL_PERIPH_ENABLE_RANGEFINDER
define HAL_PERIPH_ENABLE_MSP
# allow for rangefinder to be plugged in on "MSP" port
define ADSB_PORT hal.uartC
define ADSB_PORT hal.serial(1)
define HAL_PERIPH_ENABLE_ADSB
define HAL_MSP_ENABLED 1

View File

@ -18,7 +18,7 @@ define HAL_PERIPH_ENABLE_ADSB
define HAL_PERIPH_ENABLE_NCP5623_LED
define HAL_PERIPH_ENABLE_RANGEFINDER
define ADSB_PORT hal.uartB
define ADSB_PORT hal.serial(3)
define HAL_AIRSPEED_BUS_DEFAULT 0
define AIRSPEED_MAX_SENSORS 1