Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
os_port_sys_bios.h File Reference
RTOS abstraction layer (SYS/BIOS) More...
Go to the source code of this file.
Data Structures | |
| struct | OsEvent |
| Event object. More... | |
| struct | OsSemaphore |
| Semaphore object. More... | |
| struct | OsMutex |
| Mutex object. More... | |
Typedefs | |
| typedef Task_Object | OsTask |
| Task object. | |
| typedef void(* | OsTaskCode )(void *params) |
| Task routine. | |
Functions | |
| void | osInitKernel (void) |
| Kernel initialization. | |
| void | osStartKernel (void) |
| Start kernel. | |
| OsTask * | osCreateTask (const char_t *name, OsTaskCode taskCode, void *params, size_t stackSize, int_t priority) |
| Create a new task. | |
| void | osDeleteTask (OsTask *task) |
| Delete a task. | |
| void | osDelayTask (systime_t delay) |
| Delay routine. | |
| void | osSwitchTask (void) |
| Yield control to the next task. | |
| void | osSuspendAllTasks (void) |
| Suspend scheduler activity. | |
| void | osResumeAllTasks (void) |
| Resume scheduler activity. | |
| bool_t | osCreateEvent (OsEvent *event) |
| Create an event object. | |
| void | osDeleteEvent (OsEvent *event) |
| Delete an event object. | |
| void | osSetEvent (OsEvent *event) |
| Set the specified event object to the signaled state. | |
| void | osResetEvent (OsEvent *event) |
| Set the specified event object to the nonsignaled state. | |
| bool_t | osWaitForEvent (OsEvent *event, systime_t timeout) |
| Wait until the specified event is in the signaled state. | |
| bool_t | osSetEventFromIsr (OsEvent *event) |
| Set an event object to the signaled state from an interrupt service routine. | |
| bool_t | osCreateSemaphore (OsSemaphore *semaphore, uint_t count) |
| Create a semaphore object. | |
| void | osDeleteSemaphore (OsSemaphore *semaphore) |
| Delete a semaphore object. | |
| bool_t | osWaitForSemaphore (OsSemaphore *semaphore, systime_t timeout) |
| Wait for the specified semaphore to be available. | |
| void | osReleaseSemaphore (OsSemaphore *semaphore) |
| Release the specified semaphore object. | |
| bool_t | osCreateMutex (OsMutex *mutex) |
| Create a mutex object. | |
| void | osDeleteMutex (OsMutex *mutex) |
| Delete a mutex object. | |
| void | osAcquireMutex (OsMutex *mutex) |
| Acquire ownership of the specified mutex object. | |
| void | osReleaseMutex (OsMutex *mutex) |
| Release ownership of the specified mutex object. | |
| systime_t | osGetSystemTime (void) |
| Retrieve system time. | |
| void * | osAllocMem (size_t size) |
| Allocate a memory block. | |
| void | osFreeMem (void *p) |
| Release a previously allocated memory block. | |
Detailed Description
RTOS abstraction layer (SYS/BIOS)
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version:
- 1.7.6
Definition in file os_port_sys_bios.h.
Typedef Documentation
| typedef Task_Object OsTask |
Task object.
Definition at line 73 of file os_port_sys_bios.h.
| typedef void(* OsTaskCode)(void *params) |
Task routine.
Definition at line 110 of file os_port_sys_bios.h.
Function Documentation
| void osAcquireMutex | ( | OsMutex * | mutex ) |
Acquire ownership of the specified mutex object.
- Parameters:
-
[in] mutex Pointer to the mutex object [in] mutex A handle to the mutex object
Definition at line 460 of file os_port_chibios.c.
| void* osAllocMem | ( | size_t | size ) |
Allocate a memory block.
- Parameters:
-
[in] size Bytes to allocate
- Returns:
- A pointer to the allocated memory block or NULL if there is insufficient memory available
Definition at line 507 of file os_port_chibios.c.
| bool_t osCreateEvent | ( | OsEvent * | event ) |
Create an event object.
- Parameters:
-
[in] event Pointer to the event object
- Returns:
- The function returns TRUE if the event object was successfully created. Otherwise, FALSE is returned
Definition at line 248 of file os_port_chibios.c.
| bool_t osCreateMutex | ( | OsMutex * | mutex ) |
Create a mutex object.
- Parameters:
-
[in] mutex Pointer to the mutex object
- Returns:
- The function returns TRUE if the mutex was successfully created. Otherwise, FALSE is returned
Definition at line 434 of file os_port_chibios.c.
| bool_t osCreateSemaphore | ( | OsSemaphore * | semaphore, |
| uint_t | count | ||
| ) |
Create a semaphore object.
- Parameters:
-
[in] semaphore Pointer to the semaphore object [in] count The maximum count for the semaphore object. This value must be greater than zero
- Returns:
- The function returns TRUE if the semaphore was successfully created. Otherwise, FALSE is returned
Definition at line 357 of file os_port_chibios.c.
| OsTask* osCreateTask | ( | const char_t * | name, |
| OsTaskCode | taskCode, | ||
| void * | params, | ||
| size_t | stackSize, | ||
| int_t | priority | ||
| ) |
Create a new task.
- Parameters:
-
[in] name A name identifying the task [in] taskCode Pointer to the task entry function [in] params A pointer to a variable to be passed to the task [in] stackSize The initial size of the stack, in words [in] priority The priority at which the task should run
- Returns:
- If the function succeeds, the return value is a pointer to the new task. If the function fails, the return value is NULL
Definition at line 111 of file os_port_chibios.c.
| void osDelayTask | ( | systime_t | delay ) |
Delay routine.
- Parameters:
-
[in] delay Amount of time for which the calling task should block
Definition at line 201 of file os_port_chibios.c.
| void osDeleteEvent | ( | OsEvent * | event ) |
Delete an event object.
- Parameters:
-
[in] event Pointer to the event object
Definition at line 263 of file os_port_chibios.c.
| void osDeleteMutex | ( | OsMutex * | mutex ) |
Delete a mutex object.
- Parameters:
-
[in] mutex Pointer to the mutex object
Definition at line 449 of file os_port_chibios.c.
| void osDeleteSemaphore | ( | OsSemaphore * | semaphore ) |
Delete a semaphore object.
- Parameters:
-
[in] semaphore Pointer to the semaphore object
Definition at line 372 of file os_port_chibios.c.
| void osDeleteTask | ( | OsTask * | task ) |
Delete a task.
- Parameters:
-
[in] task Pointer to the task to be deleted
Definition at line 186 of file os_port_chibios.c.
| void osFreeMem | ( | void * | p ) |
Release a previously allocated memory block.
- Parameters:
-
[in] p Previously allocated memory block to be freed
Definition at line 527 of file os_port_chibios.c.
| systime_t osGetSystemTime | ( | void | ) |
Retrieve system time.
- Returns:
- Number of milliseconds elapsed since the system was last started
Definition at line 488 of file os_port_chibios.c.
| void osInitKernel | ( | void | ) |
Kernel initialization.
Definition at line 47 of file os_port_chibios.c.
| void osReleaseMutex | ( | OsMutex * | mutex ) |
Release ownership of the specified mutex object.
- Parameters:
-
[in] mutex Pointer to the mutex object [in] mutex A handle to the mutex object
Definition at line 472 of file os_port_chibios.c.
| void osReleaseSemaphore | ( | OsSemaphore * | semaphore ) |
Release the specified semaphore object.
- Parameters:
-
[in] semaphore Pointer to the semaphore object
Definition at line 420 of file os_port_chibios.c.
| void osResetEvent | ( | OsEvent * | event ) |
Set the specified event object to the nonsignaled state.
- Parameters:
-
[in] event Pointer to the event object
Definition at line 286 of file os_port_chibios.c.
| void osResumeAllTasks | ( | void | ) |
Resume scheduler activity.
Definition at line 234 of file os_port_chibios.c.
| void osSetEvent | ( | OsEvent * | event ) |
Set the specified event object to the signaled state.
- Parameters:
-
[in] event Pointer to the event object
Definition at line 274 of file os_port_chibios.c.
| bool_t osSetEventFromIsr | ( | OsEvent * | event ) |
Set an event object to the signaled state from an interrupt service routine.
- Parameters:
-
[in] event Pointer to the event object
- Returns:
- TRUE if setting the event to signaled state caused a task to unblock and the unblocked task has a priority higher than the currently running task
Definition at line 338 of file os_port_chibios.c.
| void osStartKernel | ( | void | ) |
Start kernel.
Definition at line 62 of file os_port_chibios.c.
| void osSuspendAllTasks | ( | void | ) |
Suspend scheduler activity.
Definition at line 223 of file os_port_chibios.c.
| void osSwitchTask | ( | void | ) |
Yield control to the next task.
Definition at line 212 of file os_port_chibios.c.
| bool_t osWaitForEvent | ( | OsEvent * | event, |
| systime_t | timeout | ||
| ) |
Wait until the specified event is in the signaled state.
- Parameters:
-
[in] event Pointer to the event object [in] timeout Timeout interval
- Returns:
- The function returns TRUE if the state of the specified object is signaled. FALSE is returned if the timeout interval elapsed
Definition at line 301 of file os_port_chibios.c.
| bool_t osWaitForSemaphore | ( | OsSemaphore * | semaphore, |
| systime_t | timeout | ||
| ) |
Wait for the specified semaphore to be available.
- Parameters:
-
[in] semaphore Pointer to the semaphore object [in] timeout Timeout interval
- Returns:
- The function returns TRUE if the semaphore is available. FALSE is returned if the timeout interval elapsed
Definition at line 386 of file os_port_chibios.c.
Generated on Tue Jul 12 2022 17:10:21 by
1.7.2