Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Toggle main menu visibility
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
20
#include "
safeapi/utils/status/sapi_status.h
"
21
#include "
safeapi/oal/timer/sapi_timer.h
"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
34
typedef
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);
41
sapi_status_t
(*
start
)(
sapi_timer_handle_t
handle);
43
sapi_status_t
(*
stop
)(
sapi_timer_handle_t
handle);
45
sapi_status_t
(*
destroy
)(
sapi_timer_handle_t
handle);
47
sapi_status_t
(*
now
)(
sapi_timestamp_ms_t
*out_now_ms);
48
}
sapi_timer_backend_t
;
49
63
sapi_status_t
sapi_timer_register_backend
(
const
sapi_timer_backend_t
*backend);
64
65
#ifdef __cplusplus
66
}
67
#endif
68
69
#endif
/* SAFEAPI_OS_TIMER_BACKEND_H */
70
/* TIMER_BACKEND */
sapi_status_t
sapi_status_t
Common result/status codes.
Definition
sapi_status.h:27
sapi_timer_register_backend
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
sapi_timer_handle_t
struct sapi_timer_impl_s * sapi_timer_handle_t
Definition
sapi_timer.h:31
sapi_timestamp_ms_t
uint64_t sapi_timestamp_ms_t
Definition
sapi_types.h:30
sapi_status.h
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
sapi_timer.h
OS Abstraction Layer - Timer service.
sapi_timer_backend_t
Backend vtable: an integrator's implementation of the timer service for a specific OS/RTOS/BSP target...
Definition
sapi_timer_backend.h:35
sapi_timer_backend_t::destroy
sapi_status_t(*) destroy(sapi_timer_handle_t handle)
Backend implementation of sapi_timer_destroy(). May be NULL.
Definition
sapi_timer_backend.h:45
sapi_timer_backend_t::stop
sapi_status_t(*) stop(sapi_timer_handle_t handle)
Backend implementation of sapi_timer_stop(). May be NULL.
Definition
sapi_timer_backend.h:43
sapi_timer_backend_t::now
sapi_status_t(*) now(sapi_timestamp_ms_t *out_now_ms)
Backend implementation of sapi_timer_now(). May be NULL.
Definition
sapi_timer_backend.h:47
sapi_timer_backend_t::start
sapi_status_t(*) start(sapi_timer_handle_t handle)
Backend implementation of sapi_timer_start(). May be NULL.
Definition
sapi_timer_backend.h:41
sapi_timer_backend_t::create
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.
Definition
sapi_timer_backend.h:37
sapi_timer_config_t
Configuration for sapi_timer_create().
Definition
sapi_timer.h:53
include
safeapi_backend
timer
sapi_timer_backend.h
Generated by
1.18.0