AP_HAL_Empty: eliminate legacy UART ordering/references

Fourth serial port (SERIAL2) added purely for consistency.
This commit is contained in:
Thomas Watson 2023-12-10 11:29:32 -06:00 committed by Andrew Tridgell
parent 2aa4ee8ba7
commit 20ee5b2d37
1 changed files with 15 additions and 14 deletions

View File

@ -9,9 +9,10 @@
using namespace Empty; using namespace Empty;
static UARTDriver uartADriver; static UARTDriver serial0Driver;
static UARTDriver uartBDriver; static UARTDriver serial1Driver;
static UARTDriver uartCDriver; static UARTDriver serial2Driver;
static UARTDriver serial3Driver;
static SPIDeviceManager spiDeviceManager; static SPIDeviceManager spiDeviceManager;
static AnalogIn analogIn; static AnalogIn analogIn;
static Storage storageDriver; static Storage storageDriver;
@ -25,20 +26,20 @@ static Flash flashDriver;
HAL_Empty::HAL_Empty() : HAL_Empty::HAL_Empty() :
AP_HAL::HAL( AP_HAL::HAL(
&uartADriver, &serial0Driver,
&uartCDriver, // ordering captures the historical use of uartB as SERIAL3 &serial1Driver,
nullptr, /* no uartD */ &serial2Driver,
&uartBDriver, &serial3Driver,
nullptr, /* no uartE */ nullptr, /* no SERIAL4 */
nullptr, /* no uartF */ nullptr, /* no SERIAL5 */
nullptr, /* no uartG */ nullptr, /* no SERIAL6 */
nullptr, /* no uartH */ nullptr, /* no SERIAL7 */
nullptr, /* no uartI */ nullptr, /* no SERIAL8 */
nullptr, /* no uartJ */ nullptr, /* no SERIAL9 */
&spiDeviceManager, &spiDeviceManager,
&analogIn, &analogIn,
&storageDriver, &storageDriver,
&uartADriver, &serial0Driver,
&gpioDriver, &gpioDriver,
&rcinDriver, &rcinDriver,
&rcoutDriver, &rcoutDriver,