I want to switch from FreeRTOS to Azure RTOS ThreadX. In FreeRTOS there is the function xQueueSendToBackFromISR() - It is used to write data to the queue from an interrupt service routine. FreeRTOS interrupt provides an interrupt safe version of queue API to read and write data from queues using ISR. And I am looking for the equivalent function in Azure RTOS ThreadX.
I looked up the documentation on Microsoft website and went through the functions but it seems that there is no such function in Azure RTOS ThreadX? https://learn.microsoft.com/en-us/azure/rtos/threadx/chapter4
The function you are looking for is tx_queue_send()
, with TX_NO_WAIT
as third parameter.
UINT tx_queue_send( TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option);
wait_option:
Defines how the service behaves if the message queue is full. The wait options are defined as follows:
*TX_NO_WAIT: (0x00000000)
- Selecting TX_NO_WAIT results in an immediate return from this service regardless of whether or not it was successful. This is the only valid option if the service is called from a non-thread; e.g., Initialization, timer, or ISR.