mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_AVR: proper empty uart for APM1 vs APM2
* APM1 uses uart2 as a spi port (dataflash) * APM2 uses uart3 as a spi port (dataflash)
This commit is contained in:
parent
de81267bd5
commit
1cd09be2fd
|
@ -21,12 +21,14 @@ using namespace AP_HAL_AVR;
|
||||||
|
|
||||||
AVRUARTDriverISRs(0);
|
AVRUARTDriverISRs(0);
|
||||||
AVRUARTDriverISRs(1);
|
AVRUARTDriverISRs(1);
|
||||||
|
AVRUARTDriverISRs(2);
|
||||||
AVRUARTDriverISRs(3);
|
AVRUARTDriverISRs(3);
|
||||||
|
|
||||||
static AVRUARTDriverInstance(avrUart0Driver, 0);
|
static AVRUARTDriverInstance(avrUart0Driver, 0);
|
||||||
static AVRUARTDriverInstance(avrUart1Driver, 1);
|
static AVRUARTDriverInstance(avrUart1Driver, 1);
|
||||||
static EmptyUARTDriver avrUart2Driver;
|
static AVRUARTDriverInstance(avrUart2Driver, 2);
|
||||||
static AVRUARTDriverInstance(avrUart3Driver, 3);
|
static AVRUARTDriverInstance(avrUart3Driver, 3);
|
||||||
|
static EmptyUARTDriver emptyUartDriver;
|
||||||
|
|
||||||
static AVRI2CDriver avrI2CDriver;
|
static AVRI2CDriver avrI2CDriver;
|
||||||
static ArduinoSPIDriver arduinoSPIDriver;
|
static ArduinoSPIDriver arduinoSPIDriver;
|
||||||
|
@ -46,7 +48,7 @@ static ArduinoScheduler arduinoScheduler;
|
||||||
const HAL_AVR AP_HAL_AVR_APM1(
|
const HAL_AVR AP_HAL_AVR_APM1(
|
||||||
(UARTDriver*) &avrUart0Driver,
|
(UARTDriver*) &avrUart0Driver,
|
||||||
(UARTDriver*) &avrUart1Driver,
|
(UARTDriver*) &avrUart1Driver,
|
||||||
(UARTDriver*) &avrUart2Driver,
|
(UARTDriver*) &emptyUartDriver,
|
||||||
(UARTDriver*) &avrUart3Driver,
|
(UARTDriver*) &avrUart3Driver,
|
||||||
&avrI2CDriver,
|
&avrI2CDriver,
|
||||||
&arduinoSPIDriver,
|
&arduinoSPIDriver,
|
||||||
|
@ -63,7 +65,7 @@ const HAL_AVR AP_HAL_AVR_APM2(
|
||||||
(UARTDriver*) &avrUart0Driver,
|
(UARTDriver*) &avrUart0Driver,
|
||||||
(UARTDriver*) &avrUart1Driver,
|
(UARTDriver*) &avrUart1Driver,
|
||||||
(UARTDriver*) &avrUart2Driver,
|
(UARTDriver*) &avrUart2Driver,
|
||||||
(UARTDriver*) &avrUart3Driver,
|
(UARTDriver*) &emptyUartDriver,
|
||||||
&avrI2CDriver,
|
&avrI2CDriver,
|
||||||
&arduinoSPIDriver,
|
&arduinoSPIDriver,
|
||||||
&apm2AnalogIn,
|
&apm2AnalogIn,
|
||||||
|
|
Loading…
Reference in New Issue