AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
|
This file is part of the AFBR-S50 Explorer example application. More...
Go to the source code of this file.
Macros | |
#define | SCHEDULER_MAX_TASKS 8U |
Maximum Number of tasks. | |
Typedefs | |
typedef uint8_t | task_prio_t |
Definition of the task priority (and unique task ID). | |
typedef void * | task_event_t |
Task event type definition. | |
typedef void(* | task_function_t) (task_event_t e) |
Task functions definition. | |
Functions | |
scheduler_t * | Scheduler_Init (void) |
Initializes the task scheduler. | |
void | Scheduler_Run (scheduler_t *const me) |
Runs the task scheduler. | |
void | Scheduler_SwitchContext (scheduler_t *const me) |
Suspends the current task and runs another task. | |
status_t | Scheduler_AddTask (scheduler_t *const me, task_function_t task, task_prio_t priority, task_event_t eventQ, size_t eventQSize, const char *name) |
Adds an new task to the scheduler. | |
status_t | Scheduler_PostEvent (scheduler_t *const me, task_prio_t priority, task_event_t event) |
Posts an event to the scheduler and executes it as soon as possible. | |
bool | Scheduler_IsTaskPending (scheduler_t *const me, task_prio_t priority) |
Checks whether a specified task is pending for execution. | |
This file is part of the AFBR-S50 Explorer example application.
This file implements an simple task scheduler.
Copyright (c) 2023, Broadcom Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.