[Taranis] Telemetry (only FrSky D) through serial port inside the

battery compartment added
This commit is contained in:
bsongis
2014-06-23 15:41:50 +02:00
parent d2ce28f897
commit e96578c857
18 changed files with 68 additions and 32 deletions
@@ -40,6 +40,11 @@ extern Fifo<512> telemetryFifo;
void telemetryPortInit(uint32_t baudrate)
{
if (baudrate == 0) {
USART_DeInit(USART2);
return;
}
USART_InitTypeDef USART_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure;
@@ -77,6 +82,7 @@ void telemetryPortInit(uint32_t baudrate)
USART_Cmd(SPORT, ENABLE);
USART_ITConfig(SPORT, USART_IT_RXNE, ENABLE);
NVIC_EnableIRQ(USART2_IRQn);
NVIC_SetPriority(USART2_IRQn, 6);
}