Real-Time Embedded Multithreading: Using ThreadX and ARM

The event flags group services described in this appendix are:
| tx_event_flags_create | Create an event flags group |
| tx_event_flags_delete | Delete an event flags group |
| tx_event_flags_get | Get event flags from an event flags group |
| tx_event_flags_info_get | Retrieve information about an event flags group |
| tx_event_flags_set | Set event flags in an event flags group |
Create an event flags group
UINT <b class="bold">tx_event_flags_create</b>(TX_EVENT_FLAGS_GROUP <b class="bold">*group_ptr,</b> CHAR <b class="bold">*name_ptr</b>)
This service creates a group of 32 event flags. All 32 event flags in the group are initialized to zero. Each event flag is represented by a single bit. This service initializes the group Control Block through the parameter group_ptr.
| name_ptr | Pointer to the name of the event flags group. |
| group_ptr | Pointer to an Event Flags Group Control Block. |
| TX_SUCCESS 1 | (0x00) | Successful event group creation. |
| TX_GROUP_ERROR | (0x06) | Invalid event group pointer. Either the pointer is NULL or the event group has already been created. |
| TX_CALLER_ERROR | (0x13) | Invalid caller of this service. |
[78]
Initialization and threads
No
TX_EVENT_FLAGS_GROUP my_event_group;UINT status;/* Create an event flags group. */status = <b class="bold">tx_event_flags_create</b>(&my_event_group, "my_event_group_name");/* If status equals TX_SUCCESS, my_event_group is ready for get...