68#ifndef NROS_PLATFORM_HAS_ATOMICS
69# define NROS_PLATFORM_HAS_ATOMICS
88#if !defined(NROS_PLATFORM_BAREMETAL)
89# ifndef NROS_PLATFORM_HAS_MALLOC
90# define NROS_PLATFORM_HAS_MALLOC
125#define NROS_PLATFORM_RET_OK 0
127#define NROS_PLATFORM_RET_ERROR -1
132#define NROS_PLATFORM_RET_UNSUPPORTED -5
136#define NROS_PLATFORM_RET_NOMEM -6
140#define NROS_PLATFORM_RET_INVALID -7
144#define NROS_PLATFORM_RET_TIMEOUT -8
246#ifdef NROS_PLATFORM_HAS_MALLOC
322 __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
326 return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
394#ifndef NROS_WALL_CLOCK_STATE_T_DEFINED
395#define NROS_WALL_CLOCK_STATE_T_DEFINED
397#define NROS_WALL_CLOCK_SOURCE_PLATFORM 0u
398#define NROS_WALL_CLOCK_SOURCE_SNTP 1u
399#define NROS_WALL_CLOCK_SOURCE_ZENOH_HLC 2u
400#define NROS_WALL_CLOCK_SOURCE_BOARD 3u
499#define NROS_PLATFORM_TASK_DETACHED 0x01u
511#define NROS_PLATFORM_PRIORITY_MIN 0
512#define NROS_PLATFORM_PRIORITY_MAX 255
514#define NROS_PLATFORM_PRIORITY_INHERIT INT32_MIN
521#define NROS_PLATFORM_PRIORITY_RAW(n) (-0x40000000 - (int32_t) (n))
523#define NROS_PLATFORM_PRIORITY_IS_RAW(p) \
524 ((p) <= -0x40000000 && (p) != NROS_PLATFORM_PRIORITY_INHERIT)
526#define NROS_PLATFORM_PRIORITY_RAW_VALUE(p) (-0x40000000 - (int32_t) (p))
544 void *(*entry)(
void *),
void *arg);
607#ifndef NROS_PLATFORM_TASK_STORAGE_SIZE
619# define NROS_PLATFORM_TASK_STORAGE_SIZE 512
621#ifndef NROS_PLATFORM_MUTEX_STORAGE_SIZE
628# define NROS_PLATFORM_MUTEX_STORAGE_SIZE 256
630#ifndef NROS_PLATFORM_MUTEX_REC_STORAGE_SIZE
631# define NROS_PLATFORM_MUTEX_REC_STORAGE_SIZE 256
633#ifndef NROS_PLATFORM_CONDVAR_STORAGE_SIZE
636# define NROS_PLATFORM_CONDVAR_STORAGE_SIZE 256
638#ifndef NROS_PLATFORM_STORAGE_ALIGN
640# define NROS_PLATFORM_STORAGE_ALIGN 8
796#define NROS_PLATFORM_PARK_SIGNALLED 0
797#define NROS_PLATFORM_PARK_EXPIRED 1
798#define NROS_PLATFORM_PARK_YIELDED 2
820 uint64_t deadline_us);
875 const uint8_t *name_ptr, uintptr_t name_len,
876 const uint8_t *msg_ptr, uintptr_t msg_len);
892 const uint8_t *name_ptr, uintptr_t name_len,
893 const uint8_t *msg_ptr, uintptr_t msg_len);
953#if defined(__cplusplus)
954# define NROS_PLATFORM_NORETURN [[noreturn]]
955#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
956# define NROS_PLATFORM_NORETURN _Noreturn
958# define NROS_PLATFORM_NORETURN __attribute__((noreturn))
Definition platform.h:403
bool synced
Definition platform.h:406
uint32_t steps
Definition platform.h:412
uint8_t source
Definition platform.h:409