mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
[nrf52840] fix NCP radio not working on USB CDC UART (#3169)
This commit is contained in:
@@ -53,6 +53,12 @@ void nrf5UartInit(void);
|
||||
*/
|
||||
void nrf5UartDeinit(void);
|
||||
|
||||
/**
|
||||
* Clear pending UART data.
|
||||
*
|
||||
*/
|
||||
void nrf5UartClearPendingData(void);
|
||||
|
||||
/**
|
||||
* This function performs UART driver processing.
|
||||
*
|
||||
|
||||
@@ -81,6 +81,11 @@ void otSysInit(int argc, char *argv[])
|
||||
nrf5UartInit();
|
||||
nrf5CryptoInit();
|
||||
}
|
||||
else
|
||||
{
|
||||
nrf5UartClearPendingData();
|
||||
}
|
||||
|
||||
#ifndef SPIS_TRANSPORT_DISABLE
|
||||
nrf5SpiSlaveInit();
|
||||
#endif
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user