[Horus] Cosmetics
This commit is contained in:
@@ -75,6 +75,12 @@ void telemetryPortSetDirectionOutput()
|
||||
TELEMETRY_USART->CR1 &= ~USART_CR1_RE; // turn off receiver
|
||||
}
|
||||
|
||||
void telemetryPortSetDirectionInput()
|
||||
{
|
||||
TELEMETRY_GPIO_DIR->BSRRH = TELEMETRY_DIR_GPIO_PIN; // output disable
|
||||
TELEMETRY_USART->CR1 |= USART_CR1_RE; // turn on receiver
|
||||
}
|
||||
|
||||
void sportSendBuffer(uint8_t *buffer, uint32_t count)
|
||||
{
|
||||
sportTxBuffer.ptr = buffer ;
|
||||
@@ -105,8 +111,7 @@ extern "C" void TELEMETRY_USART_IRQHandler()
|
||||
|
||||
if ((status & USART_SR_TC) && (TELEMETRY_USART->CR1 & USART_CR1_TCIE)) {
|
||||
TELEMETRY_USART->CR1 &= ~USART_CR1_TCIE ; // stop Complete interrupt
|
||||
TELEMETRY_GPIO_DIR->BSRRH = TELEMETRY_DIR_GPIO_PIN ; // output disable
|
||||
TELEMETRY_USART->CR1 |= USART_CR1_RE ;
|
||||
telemetryPortSetDirectionInput();
|
||||
while (status & (USART_FLAG_RXNE)) {
|
||||
status = TELEMETRY_USART->DR;
|
||||
status = TELEMETRY_USART->SR ;
|
||||
|
||||
Reference in New Issue
Block a user