This commit is contained in:
Raphael Coeffic
2022-03-20 16:22:14 +01:00
parent da59fca1bc
commit 530d395204
66 changed files with 1267 additions and 1081 deletions
+8 -5
View File
@@ -63,11 +63,12 @@ void stop_trainer_module_sbus() {}
void init_intmodule_heartbeat() {}
void stop_intmodule_heartbeat() {}
static void init(const etx_serial_init*) {}
static void deinit() {}
static void sendByte(uint8_t) {}
static void sendBuffer(const uint8_t*, uint8_t) {}
static void waitForTxCompleted() {}
static void* init(const etx_serial_init*) { return nullptr; }
static void deinit(void*) {}
static void sendByte(void*, uint8_t) {}
static void sendBuffer(void*, const uint8_t*, uint8_t) {}
static void waitForTxCompleted(void*) {}
static int getByte(void*,uint8_t*) { return -1; }
const etx_serial_driver_t IntmoduleSerialDriver = {
.init = init,
@@ -75,6 +76,7 @@ const etx_serial_driver_t IntmoduleSerialDriver = {
.sendByte = sendByte,
.sendBuffer = sendBuffer,
.waitForTxCompleted = waitForTxCompleted,
.getByte = getByte,
.setReceiveCb = nullptr,
.setOnErrorCb = nullptr,
};
@@ -85,6 +87,7 @@ const etx_serial_driver_t ExtmoduleSerialDriver = {
.sendByte = sendByte,
.sendBuffer = sendBuffer,
.waitForTxCompleted = waitForTxCompleted,
.getByte = getByte,
.setReceiveCb = nullptr,
.setOnErrorCb = nullptr,
};
+3 -55
View File
@@ -429,7 +429,7 @@ void telemetryPortInit(uint32_t baudrate, uint8_t mode)
{
}
bool telemetryGetByte(uint8_t * byte)
bool sportGetByte(uint8_t * byte)
{
return false;
}
@@ -732,6 +732,7 @@ void disableSpeaker()
}
#endif
int trainerModuleSbusGetByte(unsigned char*) { return 0; }
void rtcInit()
{
@@ -751,60 +752,7 @@ void usbSerialPutc(uint8_t c)
}
#endif
#if defined(AUX_SERIAL)
#if defined(AUX_SERIAL_DMA_Stream_RX)
AuxSerialRxFifo auxSerialRxFifo(nullptr);
#else
AuxSerialRxFifo auxSerialRxFifo;
#endif
uint8_t auxSerialMode;
void auxSerialSetup(unsigned int baudrate, bool dma, uint8_t length, uint8_t parity, uint8_t stop)
{
}
void auxSerialInit(unsigned int mode, unsigned int protocol)
{
}
void auxSerialPutc(uint8_t c)
{
}
void auxSerialSbusInit()
{
}
void auxSerialStop()
{
}
#endif
#if defined(AUX2_SERIAL)
AuxSerialRxFifo aux2SerialRxFifo(nullptr);
uint8_t aux2SerialMode;
void aux2SerialSetup(unsigned int baudrate, bool dma, uint8_t length, uint8_t parity, uint8_t stop)
{
}
void aux2SerialInit(unsigned int mode, unsigned int protocol)
{
}
void aux2SerialPutc(uint8_t c)
{
}
void aux2SerialSbusInit()
{
}
void aux2SerialStop()
{
}
#endif
const etx_serial_port_t* auxSerialGetPort(int port_nr) { return nullptr; }
#if defined(HARDWARE_TOUCH)
struct TouchState simTouchState = {};