Tx16s sbus in (#7787)

Enable SBUS trainer input
This commit is contained in:
3djc
2020-07-07 15:56:18 +02:00
committed by GitHub
parent 94ba22a74d
commit 0eb203e827
9 changed files with 96 additions and 19 deletions
@@ -20,6 +20,10 @@
#include "opentx.h"
#if defined(SBUS)
Fifo<uint8_t, 32> trainerSbusFifo;
#endif
void trainerSendNextFrame();
void init_trainer_ppm()
@@ -152,3 +156,15 @@ extern "C" void TRAINER_TIMER_IRQHandler()
trainerSendNextFrame();
}
}
int sbusGetByte(uint8_t * byte)
{
switch (currentTrainerMode) {
#if defined(AUX_SERIAL)
case TRAINER_MODE_MASTER_BATTERY_COMPARTMENT:
return trainerSbusFifo.pop(*byte);
#endif
default:
return false;
}
}