-
In a multi-threaded OS environment where where UART TX and RX processing may be done in a separate thread is it okay to call otPlatUartSendDone() and otPlatUartReceived() from another thread than the main OpenThread thread which calls otTaskletsProcess? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Generally no. All public OT APIs and platform callbacks should be called from same OS context (task/thread). You can refer to the specific API documentation to see if it explicitly allows calls from different contexts. I know of only one example openthread/include/openthread/platform/spi-slave.h Lines 67 to 70 in f0b6fce |
Beta Was this translation helpful? Give feedback.
Generally no. All public OT APIs and platform callbacks should be called from same OS context (task/thread).
You can refer to the specific API documentation to see if it explicitly allows calls from different contexts. I know of only one example
otPlatSpiSlaveTransactionCompleteCallback
:openthread/include/openthread/platform/spi-slave.h
Lines 67 to 70 in f0b6fce