S.PORT Flash fix

This commit is contained in:
Bertrand Songis
2019-06-06 17:04:08 +02:00
parent 1203557739
commit 5ae3eae1d4
5 changed files with 30 additions and 5 deletions
+1
View File
@@ -600,6 +600,7 @@ void telemetryPortSetDirectionOutput(void);
void sportSendByte(uint8_t byte);
void sportSendBuffer(const uint8_t * buffer, uint32_t count);
uint8_t telemetryGetByte(uint8_t * byte);
void telemetryClearFifo();
extern uint32_t telemetryErrors;
// Sport update driver
@@ -235,3 +235,13 @@ uint8_t telemetryGetByte(uint8_t * byte)
return telemetryNoDMAFifo.pop(*byte);
#endif
}
void telemetryClearFifo()
{
#if defined(PCBX12S)
telemetryDMAFifo.clear();
#endif
telemetryNoDMAFifo.clear();
}
+1
View File
@@ -696,6 +696,7 @@ void telemetryPortSetDirectionOutput(void);
void sportSendByte(uint8_t byte);
void sportSendBuffer(const uint8_t * buffer, uint32_t count);
uint8_t telemetryGetByte(uint8_t * byte);
void telemetryClearFifo();
extern uint32_t telemetryErrors;
// PCBREV driver
@@ -198,3 +198,8 @@ uint8_t telemetryGetByte(uint8_t * byte)
return telemetryFifo.pop(*byte);
#endif
}
void telemetryClearFifo()
{
telemetryFifo.clear();
}