R_RTOS
0.1
DistributedRealTimeOperatingSystemfortheARMCortexMArchitecture
|
Event services for sending/receiving events in tasks. More...
Data Structures | |
struct | evtQueue |
A simple singly linked list serving as one event queue. More... | |
struct | evtStruc |
Struct for Event maintenance. More... | |
Macros | |
#define | CREATE_EVT_MSK(evtNr) (EVTQSlots)((EVTQSlots)0x1u << evtNr) |
Makro that can be used to create an event mask for a group of event flags. More... | |
#define | AMOUNT_OF_EVTS ((uint8_t)0x4u) |
Defines the maximum amount of different events in the system. More... | |
#define | EVT_QUEUE_SIZE ((uint8_t)0x4u) |
Defines the maximum size of the event queues. More... | |
#define | MEM_OBJECTS_EVT ((uint8_t)0x4u) |
Number of SyncEle that will be allocated by the Event mechanism in its memory pool. More... | |
Typedefs | |
typedef struct evtQueue | EVTQueue |
evtQueue | |
typedef uint8_t | EvtNr |
Number of an event. | |
typedef uint32_t | EvtMsk |
Used for event masks. | |
typedef uint32_t | EVTQSlots |
Used as a bitarry for slots of an event queue. | |
typedef struct evtStruc | Evt |
Struct for Event maintenance. More... | |
Functions | |
void | evt_INIT (void) |
Initialize the event service. More... | |
RetCode | evt_WaitForEvts (PTskTCB const tsk, EVTQSlots evtMask, const SysTicks maxWaitTime) |
Sets the task up to wait for the events specified by evtMask. More... | |
RetCode | evt_SendEvt (const EvtNr evtNr) |
Sends the event specified by evtNr to all entities in the corresponding event queue. More... | |
RetCode | evt_GiveUpOnEvts (PTskTCB const tsk) |
Removes the specified task from all event queues it was queued into. More... | |
Event services for sending/receiving events in tasks.
#define AMOUNT_OF_EVTS ((uint8_t)0x4u) |
Defines the maximum amount of different events in the system.
Makro that can be used to create an event mask for a group of event flags.
Multiple events can be set using an ORed combination of this makro.
#define EVT_QUEUE_SIZE ((uint8_t)0x4u) |
Defines the maximum size of the event queues.
#define MEM_OBJECTS_EVT ((uint8_t)0x4u) |
Number of SyncEle that will be allocated by the Event mechanism in its memory pool.
Struct for Event maintenance.
Contains information about the event.
Removes the specified task from all event queues it was queued into.
[in] | tsk | Pointer to the TskTCB of the task giving up on all events. |
Calling this function removes the specified task from all event queues and updates the rest of the queues accordingly.
void evt_INIT | ( | void | ) |
Initialize the event service.
Initialized the event queues.
Sends the event specified by evtNr to all entities in the corresponding event queue.
[in] | evtNr | Number of the event to be sent. |
The event queue related to the evt is evaluated and all entities are updated.
Sets the task up to wait for the events specified by evtMask.
[in] | tsk | Task, which will then be waiting on the events specified by evtMask |
[in] | evtMask | Event mask specifying all events to wait on |
[in] | maxWaitTime | Maximum time to block a task in SysTicks |
The task will be put into a waiting state until all of the specified events occured.