Fixed telemetry for NV14 external module.
This commit is contained in:
@@ -65,8 +65,11 @@ void telemetryPortInit(uint32_t baudrate, uint8_t mode)
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
GPIO_Init(TELEMETRY_REV_GPIO, &GPIO_InitStructure);
|
||||
TELEMETRY_TX_POL_INV();
|
||||
TELEMETRY_RX_POL_INV();
|
||||
// TELEMETRY_TX_POL_INV();
|
||||
// TELEMETRY_RX_POL_INV();
|
||||
|
||||
TELEMETRY_TX_POL_NORM();
|
||||
TELEMETRY_RX_POL_NORM();
|
||||
|
||||
USART_InitStructure.USART_BaudRate = baudrate;
|
||||
if (mode & TELEMETRY_SERIAL_8E2) {
|
||||
@@ -113,6 +116,8 @@ void telemetryPortSetDirectionInput()
|
||||
|
||||
void sportSendByte(uint8_t byte)
|
||||
{
|
||||
telemetryPortSetDirectionOutput();
|
||||
|
||||
while (!(TELEMETRY_USART->SR & USART_SR_TXE));
|
||||
USART_SendData(TELEMETRY_USART, byte);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user