APIs for working with Scheduler.
Enumerations | |
enum | cy_scheduler_state_t { CY_SCHEDULER_STATE_NOT_STARTED , CY_SCHEDULER_STATE_INACTIVE , CY_SCHEDULER_STATE_LOCKED , CY_SCHEDULER_STATE_READY , CY_SCHEDULER_STATE_SUSPENDED , CY_SCHEDULER_STATE_RUNNING , CY_SCHEDULER_STATE_UNKNOWN } |
The state a scheduler can be in. More... | |
cy_rslt_t | cy_rtos_scheduler_suspend (void) |
Suspend the scheduler. More... | |
cy_rslt_t | cy_rtos_scheduler_resume (void) |
Resume the scheduler. More... | |
cy_rslt_t | cy_rtos_scheduler_get_state (cy_scheduler_state_t *state) |
Gets the state the scheduler is currently in. More... | |
enum cy_scheduler_state_t |
The state a scheduler can be in.
cy_rslt_t cy_rtos_scheduler_suspend | ( | void | ) |
Suspend the scheduler.
This function suspends the scheduler and makes sure that the code executed after the call does not get interrupted by a task switch. Multiple suspend calls can be done making nesting possible granted that the same number of resume calls are made.
cy_rslt_t cy_rtos_scheduler_resume | ( | void | ) |
Resume the scheduler.
This function resumes the scheduler after it was suspended. If incorrectly called (called more times than cy_rtos_scheduler_suspend) it fails returning CY_RTOS_BAD_PARAM
cy_rslt_t cy_rtos_scheduler_get_state | ( | cy_scheduler_state_t * | state | ) |
Gets the state the scheduler is currently in.
This function is called to determine if the scheduler is running/suspend/not started.
[out] | state | Returns the state the scheduler is currently in |