Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_platform.c File Reference

Real-time platform configuration service: validates parameters, then dispatches to the backend registered via sapi_platform_register_backend() (ADR-005, ADR-035). More...

Include dependency graph for sapi_platform.c:

Go to the source code of this file.

Macros

#define SAPI_PLATFORM_RT_PRIORITY_MAX   99U
 Highest real-time priority sapi_platform_realtime_init() accepts.

Functions

sapi_status_t sapi_platform_register_backend (const sapi_platform_backend_t *backend)
 Registers the backend implementation used by sapi_platform_realtime_init() (ADR-005 section 2.1). Call once at startup, before sapi_platform_realtime_init().
sapi_status_t sapi_platform_realtime_init (uint32_t rt_priority)
 Applies the registered backend's real-time platform configuration for the calling process/thread. Call once at process startup, after the backend is registered and before any sapi_timer_* / sapi_task_* thread is created.

Variables

static const sapi_platform_backend_ts_backend = NULL
 Currently registered backend, or NULL if none (ADR-005).

Detailed Description

Real-time platform configuration service: validates parameters, then dispatches to the backend registered via sapi_platform_register_backend() (ADR-005, ADR-035).

Definition in file sapi_platform.c.

Macro Definition Documentation

◆ SAPI_PLATFORM_RT_PRIORITY_MAX

#define SAPI_PLATFORM_RT_PRIORITY_MAX   99U

Highest real-time priority sapi_platform_realtime_init() accepts.

Local makros

Definition at line 14 of file sapi_platform.c.

Variable Documentation

◆ s_backend

const sapi_platform_backend_t* s_backend = NULL
static

Currently registered backend, or NULL if none (ADR-005).

Local types declarations Local variables declarations

Definition at line 20 of file sapi_platform.c.