Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_timer_backend.h
Go to the documentation of this file.
1
17#ifndef SAFEAPI_OS_TIMER_BACKEND_H
18#define SAFEAPI_OS_TIMER_BACKEND_H
19
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
34typedef struct sapi_timer_backend_s
35{
37 sapi_status_t (*create)(sapi_timer_storage_t *storage,
38 const sapi_timer_config_t *config,
39 sapi_timer_handle_t *out_handle);
49
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* SAFEAPI_OS_TIMER_BACKEND_H */
70 /* TIMER_BACKEND */
sapi_status_t
Common result/status codes.
Definition sapi_status.h:27
sapi_status_t sapi_timer_register_backend(const sapi_timer_backend_t *backend)
Registers the backend implementation used by every sapi_timer_* call. This is how an integrator suppl...
Definition sapi_timer.c:25
struct sapi_timer_impl_s * sapi_timer_handle_t
Definition sapi_timer.h:31
uint64_t sapi_timestamp_ms_t
Definition sapi_types.h:30
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
OS Abstraction Layer - Timer service.
Backend vtable: an integrator's implementation of the timer service for a specific OS/RTOS/BSP target...
sapi_status_t(*) destroy(sapi_timer_handle_t handle)
Backend implementation of sapi_timer_destroy(). May be NULL.
sapi_status_t(*) stop(sapi_timer_handle_t handle)
Backend implementation of sapi_timer_stop(). May be NULL.
sapi_status_t(*) now(sapi_timestamp_ms_t *out_now_ms)
Backend implementation of sapi_timer_now(). May be NULL.
sapi_status_t(*) start(sapi_timer_handle_t handle)
Backend implementation of sapi_timer_start(). May be NULL.
sapi_status_t(*) create(sapi_timer_storage_t *storage, const sapi_timer_config_t *config, sapi_timer_handle_t *out_handle)
Backend implementation of sapi_timer_create(). May be NULL.
Configuration for sapi_timer_create().
Definition sapi_timer.h:53