[nrf52840] fix NCP radio not working on USB CDC UART (#3169)

This commit is contained in:
e-rk
2018-10-17 13:23:05 +02:00
committed by Jonathan Hui
parent 50bb212d86
commit 8a5b9fc5c0
4 changed files with 23 additions and 0 deletions
@@ -53,6 +53,12 @@ void nrf5UartInit(void);
*/
void nrf5UartDeinit(void);
/**
* Clear pending UART data.
*
*/
void nrf5UartClearPendingData(void);
/**
* This function performs UART driver processing.
*
+5
View File
@@ -81,6 +81,11 @@ void otSysInit(int argc, char *argv[])
nrf5UartInit();
nrf5CryptoInit();
}
else
{
nrf5UartClearPendingData();
}
#ifndef SPIS_TRANSPORT_DISABLE
nrf5SpiSlaveInit();
#endif
+5
View File
@@ -150,6 +150,11 @@ void nrf5UartInit(void)
// Intentionally empty.
}
void nrf5UartClearPendingData(void)
{
// Intentionally empty.
}
void nrf5UartDeinit(void)
{
if (sUartEnabled)
@@ -290,6 +290,13 @@ void nrf5UartDeinit(void)
app_usbd_uninit();
}
void nrf5UartClearPendingData(void)
{
sUsbState.mTransferInProgress = false;
sUsbState.mTxBuffer = NULL;
sUsbState.mTxSize = 0;
}
void nrf5UartProcess(void)
{
while (app_usbd_event_queue_process())