@@ -157,7 +157,7 @@ add_definitions(-DBLUETOOTH)
|
||||
set(SRC
|
||||
${SRC}
|
||||
bluetooth.cpp
|
||||
io/frsky_device_firmware_update.cpp
|
||||
io/frsky_firmware_update.cpp
|
||||
)
|
||||
|
||||
set(STM32LIB_SRC
|
||||
|
||||
@@ -595,7 +595,9 @@ int32_t getVolume(void);
|
||||
// Telemetry driver
|
||||
#define TELEMETRY_FIFO_SIZE 512
|
||||
void telemetryPortInit(uint32_t baudrate, uint8_t mode);
|
||||
void telemetryPortSetDirectionInput(void);
|
||||
void telemetryPortSetDirectionOutput(void);
|
||||
void sportSendByte(uint8_t byte);
|
||||
void sportSendBuffer(const uint8_t * buffer, uint32_t count);
|
||||
uint8_t telemetryGetByte(uint8_t * byte);
|
||||
extern uint32_t telemetryErrors;
|
||||
|
||||
@@ -138,6 +138,12 @@ void telemetryPortSetDirectionInput()
|
||||
TELEMETRY_USART->CR1 |= USART_CR1_RE; // turn on receiver
|
||||
}
|
||||
|
||||
void sportSendByte(uint8_t byte)
|
||||
{
|
||||
while (!(TELEMETRY_USART->SR & USART_SR_TXE));
|
||||
USART_SendData(TELEMETRY_USART, byte);
|
||||
}
|
||||
|
||||
void sportSendBuffer(const uint8_t * buffer, uint32_t count)
|
||||
{
|
||||
telemetryPortSetDirectionOutput();
|
||||
|
||||
Reference in New Issue
Block a user