AP_HAL_ESP32: eliminate legacy UART ordering/references

This commit is contained in:
Thomas Watson 2023-12-10 11:33:12 -06:00 committed by Andrew Tridgell
parent 20ee5b2d37
commit 6b79349947
1 changed files with 20 additions and 21 deletions

View File

@ -30,25 +30,24 @@
#include "Util.h" #include "Util.h"
static Empty::UARTDriver uartADriver;
static ESP32::UARTDriver cons(0); static ESP32::UARTDriver cons(0);
static ESP32::UARTDriver uartBDriver(1);
#ifdef HAL_ESP32_WIFI #ifdef HAL_ESP32_WIFI
#if HAL_ESP32_WIFI == 1 #if HAL_ESP32_WIFI == 1
static ESP32::WiFiDriver uartCDriver; //tcp, client should connect to 192.168.4.1 port 5760 static ESP32::WiFiDriver serial1Driver; //tcp, client should connect to 192.168.4.1 port 5760
#elif HAL_ESP32_WIFI == 2 #elif HAL_ESP32_WIFI == 2
static ESP32::WiFiUdpDriver uartCDriver; //udp static ESP32::WiFiUdpDriver serial1Driver; //udp
#endif #endif
#else #else
static Empty::UARTDriver uartCDriver; static Empty::UARTDriver serial1Driver;
#endif #endif
static ESP32::UARTDriver uartDDriver(2); static ESP32::UARTDriver serial2Driver(2);
static Empty::UARTDriver uartEDriver; static ESP32::UARTDriver serial3Driver(1);
static Empty::UARTDriver uartFDriver; static Empty::UARTDriver serial4Driver;
static Empty::UARTDriver uartGDriver; static Empty::UARTDriver serial5Driver;
static Empty::UARTDriver uartHDriver; static Empty::UARTDriver serial6Driver;
static Empty::UARTDriver uartIDriver; static Empty::UARTDriver serial7Driver;
static Empty::UARTDriver uartJDriver; static Empty::UARTDriver serial8Driver;
static Empty::UARTDriver serial9Driver;
static Empty::DSP dspDriver; static Empty::DSP dspDriver;
@ -73,15 +72,15 @@ extern const AP_HAL::HAL& hal;
HAL_ESP32::HAL_ESP32() : HAL_ESP32::HAL_ESP32() :
AP_HAL::HAL( AP_HAL::HAL(
&cons, //Console/mavlink &cons, //Console/mavlink
&uartCDriver, //Telem 1, ordering captures the historical use of uartB as SERIAL3 &serial1Driver, //Telem 1
&uartDDriver, //Telem 2 &serial2Driver, //Telem 2
&uartBDriver, //GPS 1 &serial3Driver, //GPS 1
&uartEDriver, //GPS 2 &serial4Driver, //GPS 2
&uartFDriver, //Extra 1 &serial5Driver, //Extra 1
&uartGDriver, //Extra 2 &serial6Driver, //Extra 2
&uartHDriver, //Extra 3 &serial7Driver, //Extra 3
&uartIDriver, //Extra 4 &serial8Driver, //Extra 4
&uartJDriver, //Extra 5 &serial9Driver, //Extra 5
&i2cDeviceManager, &i2cDeviceManager,
&spiDeviceManager, &spiDeviceManager,
nullptr, nullptr,