|
MotorWare f2806x Module API Documentation
|
Modules | |
| Module overview | |
Data Structures | |
| struct | _EVENT_ArgList_ |
| Defines the event argument list. More... | |
| struct | _EVENT_Obj_ |
| Defines the event queue object. More... | |
| struct | _QUEUE_Obj_ |
| Defines the queue object structure. More... | |
Macros | |
| #define | EVENT_MAX_NUM_ARGS 4 |
| Defines the maximum number of event arguments. More... | |
| #define | QUEUE_MAX_NUM_EVENTS 8 |
| Defines the maximum number of events per queue Note: must be a power of 2. More... | |
Typedefs | |
| typedef void(* | EVENT_Fxn) () |
| Defines the event function prototype. More... | |
| typedef struct _EVENT_ArgList_ | EVENT_ArgList |
| Defines the event argument list. More... | |
| typedef struct _EVENT_Obj_ | EVENT_Obj |
| Defines the event queue object. More... | |
| typedef struct _EVENT_Obj_ * | EVENT_Handle |
| Defines the EVENT handle. More... | |
| typedef struct _QUEUE_Obj_ | QUEUE_Obj |
| Defines the queue object structure. More... | |
| typedef struct _QUEUE_Obj_ * | QUEUE_Handle |
| Defines the queue handle. More... | |
Enumerations | |
| enum | QUEUE_Status_e { QUEUE_STATUS_FIRST_EVENT_TAKEN =0, QUEUE_STATUS_LAST_EVENT_TAKEN } |
| Defines the queue status messages. More... | |
Functions | |
| static bool | QUEUE_isEvent (QUEUE_Handle handle) |
| Checks if there is an event available in the queue. More... | |
| static bool | QUEUE_isIdle (QUEUE_Handle handle) |
| Checks if the specified queue is idle. More... | |
| QUEUE_Handle | QUEUE_init (void *pMemory, const size_t numBytes) |
| Initializes the queue. More... | |
| void | QUEUE_listen (QUEUE_Handle handle) |
| Puts the calling process in a listen state. It loops until. More... | |
| static status | QUEUE_postEventFirst (QUEUE_Handle handle, const EVENT_Fxn eventFxn, const EVENT_ArgList *pArgList, const uint_least8_t numArgs) |
| Posts an event to the beginning of the specified queue. More... | |
| static status | QUEUE_postEventLast (QUEUE_Handle handle, const EVENT_Fxn eventFxn, const EVENT_ArgList *pArgList, const uint_least8_t numArgs) |
| Posts an event to the end of the specified queue. More... | |
| static void | QUEUE_removeFirstEvent (QUEUE_Handle handle) |
| Removed the first event from the specified queue. More... | |
| static void | QUEUE_removeLastEvent (QUEUE_Handle handle) |
| Removed the last event from the specified queue. More... | |
| static void | QUEUE_executeEvent (QUEUE_Handle handle) |
| Checks the specified event queue for an event. If there is an event,. More... | |
Variables | |
| uint32_t | gEventIndex |
| The event index. More... | |
| EVENT_Obj | gEvents [QUEUE_MAX_NUM_EVENTS] |
| The array of events. More... | |
| struct _EVENT_ArgList_ |
| Data Fields | ||
|---|---|---|
| void * | arg[EVENT_MAX_NUM_ARGS] | an array of the pointers to the event arguments |
| struct _EVENT_Obj_ |
| Data Fields | ||
|---|---|---|
| EVENT_ArgList | argList | the event function argument list |
| EVENT_Fxn | eventFxn | the event function that will be called |
| struct _EVENT_Obj_ * | nextEvent | the next event in the queue |
| uint_least8_t | numArgs | the number of event arguments |
| struct _EVENT_Obj_ * | prevEvent | the previous event in the queue |
| uint_least8_t | queueNumber | the queue number |
| bool | taken | a flag to indicate if event is taken |
| struct _QUEUE_Obj_ |
| Data Fields | ||
|---|---|---|
| EVENT_Handle | firstEvent | the first event in the queue |
| EVENT_Handle | lastEvent | the last event in the queue |
| #define EVENT_MAX_NUM_ARGS 4 |
Defines the maximum number of event arguments.
Definition at line 73 of file queue.h.
Referenced by QUEUE_postEventFirst(), and QUEUE_postEventLast().
| #define QUEUE_MAX_NUM_EVENTS 8 |
Defines the maximum number of events per queue Note: must be a power of 2.
Definition at line 78 of file queue.h.
Referenced by QUEUE_postEventFirst(), and QUEUE_postEventLast().
| typedef struct _EVENT_ArgList_ EVENT_ArgList |
Defines the event argument list.
| typedef void(* EVENT_Fxn) () |
| typedef struct _EVENT_Obj_* EVENT_Handle |
| typedef struct _EVENT_Obj_ EVENT_Obj |
Defines the event queue object.
| typedef struct _QUEUE_Obj_* QUEUE_Handle |
| typedef struct _QUEUE_Obj_ QUEUE_Obj |
Defines the queue object structure.
| enum QUEUE_Status_e |
|
inlinestatic |
Checks the specified event queue for an event. If there is an event,.
| [in] | handle | The queue handle |
Definition at line 364 of file queue.h.
References _EVENT_ArgList_::arg, _EVENT_Obj_::argList, _EVENT_Obj_::eventFxn, _QUEUE_Obj_::firstEvent, _EVENT_Obj_::numArgs, and QUEUE_removeFirstEvent().
Referenced by QUEUE_listen().
| QUEUE_Handle QUEUE_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
Initializes the queue.
| [in] | pMemory | A pointer to the memory for the queue object |
| [in] | numBytes | The number of bytes allocated for the queue object, bytes |
Definition at line 60 of file queue.c.
References _QUEUE_Obj_::firstEvent, gEventIndex, and _QUEUE_Obj_::lastEvent.
|
inlinestatic |
Checks if there is an event available in the queue.
| [in] | handle | The queue handle |
Definition at line 158 of file queue.h.
References _QUEUE_Obj_::firstEvent.
|
inlinestatic |
Checks if the specified queue is idle.
| [in] | handle | The queue handle |
Definition at line 168 of file queue.h.
References _QUEUE_Obj_::firstEvent.
Referenced by QUEUE_listen().
| void QUEUE_listen | ( | QUEUE_Handle | handle | ) |
Puts the calling process in a listen state. It loops until.
| [in] | handle | The queue handle |
Definition at line 91 of file queue.c.
References QUEUE_executeEvent(), and QUEUE_isIdle().
|
inlinestatic |
Posts an event to the beginning of the specified queue.
| [in] | handle | The queue handle |
| [in] | eventFxn | The event function that will be called |
| [in] | *pArgList | The pointer to the event argument list |
| [in] | numArgs | The number of arguments |
Definition at line 194 of file queue.h.
References _EVENT_ArgList_::arg, _EVENT_Obj_::argList, ERROR, EVENT_MAX_NUM_ARGS, _EVENT_Obj_::eventFxn, _QUEUE_Obj_::firstEvent, gEventIndex, _EVENT_Obj_::nextEvent, _EVENT_Obj_::numArgs, OK, _EVENT_Obj_::prevEvent, QUEUE_MAX_NUM_EVENTS, QUEUE_STATUS_FIRST_EVENT_TAKEN, and _EVENT_Obj_::taken.
|
inlinestatic |
Posts an event to the end of the specified queue.
| [in] | handle | The queue handle |
| [in] | eventFxn | The event function that will be called |
| [in] | *pArgList | The pointer to the event argument list |
| [in] | numArgs | The number of event arguments |
Definition at line 247 of file queue.h.
References _EVENT_ArgList_::arg, _EVENT_Obj_::argList, ERROR, EVENT_MAX_NUM_ARGS, _EVENT_Obj_::eventFxn, gEventIndex, _QUEUE_Obj_::lastEvent, _EVENT_Obj_::nextEvent, _EVENT_Obj_::numArgs, OK, _EVENT_Obj_::prevEvent, QUEUE_MAX_NUM_EVENTS, QUEUE_STATUS_LAST_EVENT_TAKEN, and _EVENT_Obj_::taken.
|
inlinestatic |
Removed the first event from the specified queue.
| [in] | handle | The queue handle |
Definition at line 298 of file queue.h.
References _QUEUE_Obj_::firstEvent, _EVENT_Obj_::nextEvent, _EVENT_Obj_::prevEvent, and _EVENT_Obj_::taken.
Referenced by QUEUE_executeEvent().
|
inlinestatic |
Removed the last event from the specified queue.
| [in] | handle | The queue handle |
Definition at line 331 of file queue.h.
References _QUEUE_Obj_::lastEvent, _EVENT_Obj_::nextEvent, _EVENT_Obj_::prevEvent, and _EVENT_Obj_::taken.
| uint32_t gEventIndex |
The event index.
Definition at line 52 of file queue.c.
Referenced by QUEUE_init(), QUEUE_postEventFirst(), and QUEUE_postEventLast().
| EVENT_Obj gEvents[QUEUE_MAX_NUM_EVENTS] |
1.8.9.1