Bsongis/r9m lite pro highspeed (#6546)

R9M Lite Pro @ 450k
This commit is contained in:
Bertrand Songis
2019-07-05 10:45:43 +02:00
committed by GitHub
parent e27c93e202
commit 58104417bb
19 changed files with 130 additions and 87 deletions
@@ -43,7 +43,7 @@ void intmoduleStop()
void intmodulePxx1SerialStart()
{
intmoduleSerialStart(INTMODULE_PXX_BAUDRATE, false);
intmoduleSerialStart(INTMODULE_PXX1_SERIAL_BAUDRATE, false);
}
void intmoduleSerialStart(uint32_t baudrate, uint8_t rxEnable)
@@ -136,7 +136,7 @@ void intmoduleSendNextFrame()
{
switch(moduleState[INTERNAL_MODULE].protocol) {
#if defined(PXX2)
case PROTOCOL_CHANNELS_PXX2:
case PROTOCOL_CHANNELS_PXX2_HIGHSPEED:
intmoduleSendBuffer(intmodulePulsesData.pxx2.getData(), intmodulePulsesData.pxx2.getSize());
break;
#endif
@@ -235,11 +235,6 @@ void extmoduleSendNextFrame()
EXTMODULE_DMA_STREAM->CR |= DMA_SxCR_EN | DMA_SxCR_TCIE; // Enable DMA
}
#endif
#if defined(PXX2)
else if (moduleState[EXTERNAL_MODULE].protocol == PROTOCOL_CHANNELS_PXX2) {
sportSendBuffer(extmodulePulsesData.pxx2.getData(), extmodulePulsesData.pxx2.getSize());
}
#endif
#if defined(DSM2)
else if (IS_DSM2_PROTOCOL(moduleState[EXTERNAL_MODULE].protocol) || IS_MULTIMODULE_PROTOCOL(moduleState[EXTERNAL_MODULE].protocol) || IS_SBUS_PROTOCOL(moduleState[EXTERNAL_MODULE].protocol)) {
EXTMODULE_TIMER->CCR2 = *(extmodulePulsesData.dsm2.ptr - 1) - 4000; // 2mS in advance
@@ -238,7 +238,7 @@ void extmodulePxx1PulsesStart()
#if defined(PXX1) && defined(EXTMODULE_USART)
void extmodulePxx1SerialStart()
{
extmoduleInvertedSerialStart(EXTMODULE_PXX_SERIAL_BAUDRATE);
extmoduleInvertedSerialStart(EXTMODULE_PXX1_SERIAL_BAUDRATE);
}
#endif
@@ -276,12 +276,9 @@ void extmoduleSendNextFrame()
#endif
#if defined(PXX2)
case PROTOCOL_CHANNELS_PXX2:
#if defined(EXTMODULE_USART)
extmoduleSendBuffer(extmodulePulsesData.pxx2.getData(), extmodulePulsesData.pxx2.getSize());
#else
sportSendBuffer(extmodulePulsesData.pxx2.getData(), extmodulePulsesData.pxx2.getSize());
#endif
case PROTOCOL_CHANNELS_PXX2_HIGHSPEED:
case PROTOCOL_CHANNELS_PXX2_LOWSPEED:
extmoduleSendBuffer(extmodulePulsesData.pxx2.getData(), extmodulePulsesData.pxx2.getSize());
break;
#endif