|
FreeRTOS C-Addons
1.1.0
C-Addon functionality to FreeRTOS
|
#include "FreeRTOS.h"#include "semphr.h"

Go to the source code of this file.
Macros | |
| #define | DEFAULT_WORK_QUEUE_STACK_SIZE (configMINIMAL_STACK_SIZE * 2) |
| #define | DEFAULT_WORK_QUEUE_PRIORITY (tskIDLE_PRIORITY + 1) |
| #define | CreateWorkQueue() |
Typedefs | |
| typedef void(* | WorkItem_t) (void *UserData) |
| typedef void * | WorkQueue_t |
Functions | |
| WorkQueue_t | CreateWorkQueueEx (const char *const Name, uint16_t StackSize, UBaseType_t Priority) |
| void | DestroyWorkQueue (WorkQueue_t WorkQueue) |
| int | QueueWorkItem (WorkQueue_t WorkQueue, WorkItem_t WorkItem, void *UserData) |
| #define CreateWorkQueue | ( | ) |
Create a WorkQueue using the defaults.
Definition at line 91 of file workqueue.h.
| #define DEFAULT_WORK_QUEUE_PRIORITY (tskIDLE_PRIORITY + 1) |
Default task priority of the Worker Task.
Definition at line 70 of file workqueue.h.
| #define DEFAULT_WORK_QUEUE_STACK_SIZE (configMINIMAL_STACK_SIZE * 2) |
Default stack size of the Worker Task.
Definition at line 64 of file workqueue.h.
| typedef void(* WorkItem_t) (void *UserData) |
All your work items are actually functions that take a void * parameter.
Definition at line 52 of file workqueue.h.
| typedef void* WorkQueue_t |
Handle for the actual work queue.
Definition at line 58 of file workqueue.h.
| WorkQueue_t CreateWorkQueueEx | ( | const char *const | Name, |
| uint16_t | StackSize, | ||
| UBaseType_t | Priority | ||
| ) |
Create a WorkQueue, specifying all options.
| Name | The name of the worker thread. |
| StackSize | The size of the worker thread stack, in words. |
| Priority | The priority of the worker thread. |
Definition at line 255 of file workqueue.c.
| void DestroyWorkQueue | ( | WorkQueue_t | WorkQueue | ) |
Destroy a WorkQueue, if allowed.
| WorkQueue | The work queue. |
Lock
Flag we are all done.
Signal the Worker thead.
Unlock
Definition at line 312 of file workqueue.c.
| int QueueWorkItem | ( | WorkQueue_t | WorkQueue, |
| WorkItem_t | WorkItem, | ||
| void * | UserData | ||
| ) |
Add an item of work onto the queue.
| WorkQueue | The work queue. |
| WorkItem | The function you want called. |
| UserData | A value passed back to you. |
Lock the queue
Put the work item on the queue.
Wake the Worker thread up.
Unlock the queue
Definition at line 344 of file workqueue.c.
1.8.13