OPTIGA™ Trust M
Host Library Documentation
pal_os_event.h
Go to the documentation of this file.
1 
38 #ifndef _PAL_OS_EVENT_H_
39 #define _PAL_OS_EVENT_H_
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
46 
50 typedef void ( * register_callback)(void * );
51 
53 typedef struct pal_os_event
54 {
60  void * callback_ctx;
62  void * os_timer;
64 
65 
83  void * callback_args);
84 
101 
123 LIBRARY_EXPORTS void pal_os_event_register_callback_oneshot(pal_os_event_t * p_pal_os_event,
124  register_callback callback,
125  void * callback_args,
126  uint32_t time_us);
127 
144 
162 LIBRARY_EXPORTS void pal_os_event_start(pal_os_event_t * p_pal_os_event,
163  register_callback callback,
164  void * callback_args);
165 
181 LIBRARY_EXPORTS void pal_os_event_stop(pal_os_event_t * p_pal_os_event);
182 
183 #ifdef __cplusplus
184 }
185 #endif
186 
187 #endif /*_PAL_OS_EVENT_H_*/
188 
register_callback
void(* register_callback)(void *)
typedef for Callback function when timer elapses.
Definition: pal_os_event.h:50
pal_os_event_create
LIBRARY_EXPORTS pal_os_event_t * pal_os_event_create(register_callback callback, void *callback_args)
Create an os event.
pal_os_event_start
LIBRARY_EXPORTS void pal_os_event_start(pal_os_event_t *p_pal_os_event, register_callback callback, void *callback_args)
Start an os event.
pal_os_event
PAL os event structure.
Definition: pal_os_event.h:54
pal_os_event_destroy
LIBRARY_EXPORTS void pal_os_event_destroy(pal_os_event_t *pal_os_event)
Destroys an os event.
optiga_lib_types.h
This file contains the type definitions for the fundamental data types.
pal_os_event::os_timer
void * os_timer
os timer
Definition: pal_os_event.h:62
pal_os_event::callback_ctx
void * callback_ctx
context to be passed to callback
Definition: pal_os_event.h:60
pal_os_event::callback_registered
register_callback callback_registered
registered callback
Definition: pal_os_event.h:58
pal_os_event_stop
LIBRARY_EXPORTS void pal_os_event_stop(pal_os_event_t *p_pal_os_event)
Stops an os event.
bool_t
uint8_t bool_t
Typedef for a boolean.
Definition: optiga_lib_types.h:84
pal_os_event_t
struct pal_os_event pal_os_event_t
PAL os event structure.
pal_os_event::is_event_triggered
bool_t is_event_triggered
event triggered status
Definition: pal_os_event.h:56
pal_os_event_trigger_registered_callback
void pal_os_event_trigger_registered_callback(void)
Timer callback handler.
pal_os_event_register_callback_oneshot
LIBRARY_EXPORTS void pal_os_event_register_callback_oneshot(pal_os_event_t *p_pal_os_event, register_callback callback, void *callback_args, uint32_t time_us)
Callback registration function to trigger once when timer expires.