|
PixelKey
NeoPixel USB Key
|
Modules | |
| Task Manager Internals | |
Macros | |
| #define | TASK_LIST |
| XMACRO(name,fn,docstring) for defining tasks. More... | |
| #define | XTASK(task, fn, doc) TASK_ ## task /*!< doc See @ref fn. */, |
Typedefs | |
| typedef void(* | task_fn_t) (void) |
Enumerations | |
| enum | task_t { TASK_REBOOT , TASK_FRAME_TX , TASK_FRAME_RENDER , TASK_TERMINAL_CONNECTED , TASK_CMD_RX , TASK_CMD_HANDLER , TASK_CMD_PROMPT , TASK_COUNT , TASK_UNDEFINED = -1 } |
| Available tasks. More... | |
| enum | task_status_t { TASK_STATUS_IDLE , TASK_STATUS_QUEUED , TASK_STATUS_PENDING , TASK_STATUS_RUNNING } |
| Task status. More... | |
Functions | |
| void | tasks_run (task_fn_t idle_task) |
| Main task runner loop. More... | |
| void | tasks_queue (task_t task) |
| Queue a task for execution. More... | |
| task_status_t | tasks_status_get (task_t task) |
| Gets the status of a given task. More... | |
| #define TASK_LIST |
XMACRO(name,fn,docstring) for defining tasks.
| enum task_status_t |
| enum task_t |
Available tasks.
| Enumerator | |
|---|---|
| TASK_REBOOT | Triggers a software reset. See pixelkey_reboot . |
| TASK_FRAME_TX | Transmits the last rendered frame. See npdata_frame_send . |
| TASK_FRAME_RENDER | Calculates the next frame. See pixelkey_task_do_frame . |
| TASK_TERMINAL_CONNECTED | Sends strings for newly connected terminals. See pixelkey_task_terminal_connected . |
| TASK_CMD_RX | Command string reception and parsing. See pixelkey_task_command_rx . |
| TASK_CMD_HANDLER | Command handling. See pixelkey_commandproc_task . |
| TASK_CMD_PROMPT | Sends the command prompt string once command handling completes. See pixelkey_task_command_prompt . |
| TASK_COUNT | Number of available tasks. |
| TASK_UNDEFINED | Task is undefined. |
| void tasks_queue | ( | task_t | task | ) |
Queue a task for execution.
| task | The task to queue. |
| void tasks_run | ( | task_fn_t | idle_task | ) |
Main task runner loop.
Priority, round-robin task manager. Never exits.
| [in] | idle_task | Idle function executed when no tasks are queued, specify NULL to ignore. |
| task_status_t tasks_status_get | ( | task_t | task | ) |
Gets the status of a given task.
| task | The task to check. |