WiP
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
|
||||
#include "../common/arm/stm32/timers_driver.h"
|
||||
|
||||
#if defined(AUX_SERIAL)
|
||||
#include "aux_serial_driver.h"
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -223,10 +227,7 @@ void boardInit()
|
||||
i2cInit();
|
||||
usbInit();
|
||||
|
||||
#if defined(DEBUG) && defined(AUX_SERIAL_GPIO)
|
||||
auxSerialInit(0, 0); // default serial mode (None if DEBUG not defined)
|
||||
TRACE("\nTaranis board started :)");
|
||||
#endif
|
||||
initSerialPorts();
|
||||
|
||||
#if defined(HAPTIC)
|
||||
hapticInit();
|
||||
@@ -415,3 +416,26 @@ void initJackDetect(void)
|
||||
GPIO_Init(JACK_DETECT_GPIO, &GPIO_InitStructure);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AUX_SERIAL)
|
||||
const etx_serial_port_t auxSerialPort = {
|
||||
&AuxSerialDriver,
|
||||
nullptr
|
||||
};
|
||||
#define AUX_SERIAL_PORT &auxSerialPort
|
||||
#else
|
||||
#define AUX_SERIAL_PORT nullptr
|
||||
#endif
|
||||
|
||||
#define AUX2_SERIAL_PORT nullptr
|
||||
|
||||
static const etx_serial_port_t* serialPorts[MAX_AUX_SERIAL] = {
|
||||
AUX_SERIAL_PORT,
|
||||
AUX2_SERIAL_PORT,
|
||||
};
|
||||
|
||||
const etx_serial_port_t* auxSerialGetPort(int port_nr)
|
||||
{
|
||||
if (port_nr >= MAX_AUX_SERIAL) return nullptr;
|
||||
return serialPorts[port_nr];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user