RTOS abstraction layer. More...
#include "os_port_config.h"#include "compiler_port.h"#include <string.h>#include <stdio.h>#include <stdlib.h>#include <ctype.h>Go to the source code of this file.
Macros | |
| #define | ENABLED 1 |
| #define | DISABLED 0 |
| #define | timeCompare(t1, t2) ((int32_t) ((t1) - (t2))) |
| #define | FALSE 0 |
| #define | TRUE 1 |
| #define | LSB(x) ((x) & 0xFF) |
| #define | MSB(x) (((x) >> 8) & 0xFF) |
| #define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
| #define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
| #define | arraysize(a) (sizeof(a) / sizeof(a[0])) |
| #define | INFINITE_DELAY ((uint_t) -1) |
| #define | MAX_DELAY (INFINITE_DELAY / 2) |
| #define | osMemset(p, value, length) (void) memset(p, value, length) |
| #define | osMemcpy(dest, src, length) (void) memcpy(dest, src, length) |
| #define | osMemmove(dest, src, length) (void) memmove(dest, src, length) |
| #define | osMemcmp(p1, p2, length) memcmp(p1, p2, length) |
| #define | osMemchr(p, c, length) memchr(p, c, length) |
| #define | osStrlen(s) strlen(s) |
| #define | osStrcmp(s1, s2) strcmp(s1, s2) |
| #define | osStrncmp(s1, s2, length) strncmp(s1, s2, length) |
| #define | osStrcasecmp(s1, s2) strcasecmp(s1, s2) |
| #define | osStrncasecmp(s1, s2, length) strncasecmp(s1, s2, length) |
| #define | osStrchr(s, c) strchr(s, c) |
| #define | osStrstr(s1, s2) strstr(s1, s2) |
| #define | osStrcpy(s1, s2) (void) strcpy(s1, s2) |
| #define | osStrncpy(s1, s2, length) (void) strncpy(s1, s2, length) |
| #define | osStrcat(s1, s2) (void) strcat(s1, s2) |
| #define | osStrtok_r(s, delim, last) strtok_r(s, delim, last) |
| #define | osSprintf(dest, ...) sprintf(dest, __VA_ARGS__) |
| #define | osSnprintf(dest, size, ...) snprintf(dest, size, __VA_ARGS__) |
| #define | osVsnprintf(dest, size, format, ap) vsnprintf(dest, size, format, ap) |
| #define | osAtoi(s) atoi(s) |
| #define | osStrtoul(s, endptr, base) strtoul(s, endptr, base) |
| #define | osStrtoull(s, endptr, base) strtoull(s, endptr, base) |
| #define | osTolower(c) tolower((uint8_t) (c)) |
| #define | osToupper(c) toupper((uint8_t) (c)) |
| #define | osIsupper(c) isupper((uint8_t) (c)) |
| #define | osIsdigit(c) isdigit((uint8_t) (c)) |
| #define | osIsspace(c) isspace((uint8_t) (c)) |
| #define | osIsblank(c) ((c) == ' ' || (c) == '\t') |
| #define | usleep(delay) {volatile uint32_t n = delay * 4; while(n > 0) n--;} |
| #define | sleep(delay) {volatile uint32_t n = delay * 4000; while(n > 0) n--;} |
| #define | OsTask void |
| #define | OS_INVALID_HANDLE OS_INVALID_TASK_ID |
Detailed Description
RTOS abstraction layer.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 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
- 2.5.4
Definition in file os_port.h.
Macro Definition Documentation
◆ arraysize
◆ DISABLED
◆ ENABLED
◆ FALSE
◆ INFINITE_DELAY
◆ LSB
◆ MAX
◆ MAX_DELAY
| #define MAX_DELAY (INFINITE_DELAY / 2) |
◆ MIN
◆ MSB
◆ OS_INVALID_HANDLE
| #define OS_INVALID_HANDLE OS_INVALID_TASK_ID |
◆ osAtoi
◆ osIsblank
◆ osIsdigit
◆ osIsspace
◆ osIsupper
◆ osMemchr
◆ osMemcmp
◆ osMemcpy
◆ osMemmove
◆ osMemset
◆ osSnprintf
| #define osSnprintf | ( | dest, | |
| size, | |||
| ... | |||
| ) | snprintf(dest, size, __VA_ARGS__) |
◆ osSprintf
| #define osSprintf | ( | dest, | |
| ... | |||
| ) | sprintf(dest, __VA_ARGS__) |
◆ osStrcasecmp
| #define osStrcasecmp | ( | s1, | |
| s2 | |||
| ) | strcasecmp(s1, s2) |
◆ osStrcat
◆ osStrchr
◆ osStrcmp
◆ osStrcpy
◆ osStrlen
◆ osStrncasecmp
| #define osStrncasecmp | ( | s1, | |
| s2, | |||
| length | |||
| ) | strncasecmp(s1, s2, length) |
◆ osStrncmp
◆ osStrncpy
◆ osStrstr
◆ osStrtok_r
◆ osStrtoul
◆ osStrtoull
◆ OsTask
◆ osTolower
◆ osToupper
◆ osVsnprintf
| #define osVsnprintf | ( | dest, | |
| size, | |||
| format, | |||
| ap | |||
| ) | vsnprintf(dest, size, format, ap) |
