[Horus / Taranis] S.PORT telemetry now uses the DMA. I think the buffer could be reduced, 512bytes seems really big
This commit is contained in:
@@ -43,10 +43,6 @@ uint8_t frskyTxBufferCount = 0;
|
||||
uint8_t telemetryState = TELEMETRY_INIT;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBFLAMENCO) || defined(PCBHORUS)
|
||||
Fifo<uint8_t, 512> telemetryFifo; // TODO should be in the driver
|
||||
#endif
|
||||
|
||||
uint8_t frskyRxBufferCount = 0;
|
||||
|
||||
FrskyData frskyData;
|
||||
|
||||
@@ -337,9 +337,9 @@ bool sportWaitState(SportUpdateState state, int timeout)
|
||||
return true;
|
||||
#else
|
||||
for (int i=timeout/2; i>=0; i--) {
|
||||
uint8_t data ;
|
||||
while (telemetryFifo.pop(data)) {
|
||||
processSerialData(data);
|
||||
uint8_t byte ;
|
||||
while (telemetryGetByte(&byte)) {
|
||||
processSerialData(byte);
|
||||
}
|
||||
if (sportUpdateState == state) {
|
||||
return true;
|
||||
@@ -358,7 +358,7 @@ void blankPacket(uint8_t *packet)
|
||||
memset(packet+2, 0, 6);
|
||||
}
|
||||
|
||||
uint8_t sportUpdatePacket[16];
|
||||
uint8_t sportUpdatePacket[16] __DMA;
|
||||
|
||||
void writePacket(uint8_t * packet)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
@@ -21,8 +21,6 @@
|
||||
#ifndef _TELEMETRY_H_
|
||||
#define _TELEMETRY_H_
|
||||
|
||||
extern Fifo<uint8_t, 512> telemetryFifo;
|
||||
|
||||
enum TelemetryProtocol
|
||||
{
|
||||
TELEM_PROTO_FRSKY_D,
|
||||
|
||||
Reference in New Issue
Block a user