#2894 - Crossfire (inverted serial) sent on S.PORT pin in the module bay (ported from master f7044a20ec)

16 channels sent every 2.5ms now @ 200KBauds with CRC
This commit is contained in:
Damjan Adamic
2015-12-20 17:10:32 +01:00
parent e8983250ca
commit 91e80d446a
31 changed files with 435 additions and 92 deletions
@@ -85,12 +85,17 @@ struct SportTxBuffer
uint32_t count;
} sportTxBuffer;
void telemetryPortSetDirectionOutput()
{
TELEMETRY_GPIO_DIR->BSRRL = TELEMETRY_GPIO_PIN_DIR; // output enable
TELEMETRY_USART->CR1 &= ~USART_CR1_RE; // turn off receiver
}
void sportSendBuffer(uint8_t *buffer, uint32_t count)
{
sportTxBuffer.ptr = buffer ;
sportTxBuffer.count = count ;
TELEMETRY_GPIO_DIR->BSRRL = TELEMETRY_GPIO_PIN_DIR ; // output enable
TELEMETRY_USART->CR1 &= ~USART_CR1_RE ; // turn off receiver
sportTxBuffer.ptr = buffer;
sportTxBuffer.count = count;
telemetryPortSetDirectionOutput();
TELEMETRY_USART->CR1 |= USART_CR1_TXEIE ;
}