feat(ACCESS): Configure AUX serial port as "External module" (#2562)

* Enable RX DMA on external module USART

* feat(ACCESS): configure AUX serial port as "External module" (#2562)

This allows configuring the external access mod on runtime rather than by compilation option.

* fix: fetch external module driver
This commit is contained in:
Raphael Coeffic
2022-12-14 18:41:32 +10:00
committed by GitHub
parent efe2ddd2b1
commit 06c359f096
22 changed files with 323 additions and 128 deletions
+3 -1
View File
@@ -864,7 +864,9 @@ void applyModelConfig(uint8_t module)
static void* initExternal(uint8_t module)
{
#if defined(AFHDS3_EXT_UART)
const etx_serial_driver_t* drv = &ExtmoduleSerialDriver;
auto drv = extmoduleGetSerialPort();
if (!drv) return nullptr;
uint16_t period = AFHDS3_UART_COMMAND_TIMEOUT * 1000 /* us */;
#else
const etx_serial_driver_t* drv = nullptr;