OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
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 
45 #include "optiga_lib_types.h"
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 
82 LIBRARY_EXPORTS pal_os_event_t * pal_os_event_create(register_callback callback,
83  void * callback_args);
84 
100 LIBRARY_EXPORTS void pal_os_event_destroy(pal_os_event_t * pal_os_event);
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 
185 void pal_os_event_process(void);
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif /*_PAL_OS_EVENT_H_*/
192 
void * os_timer
os timer
Definition: pal_os_event.h:62
LIBRARY_EXPORTS pal_os_event_t * pal_os_event_create(register_callback callback, void *callback_args)
Create an os event.
Definition: pal_os_event_arduino.cpp:47
struct pal_os_event pal_os_event_t
PAL os event structure.
void pal_os_event_trigger_registered_callback(void)
Timer callback handler.
Definition: pal_os_event_arduino.cpp:74
void * callback_ctx
context to be passed to callback
Definition: pal_os_event.h:60
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.
Definition: pal_os_event_arduino.cpp:63
This file contains the type definitions for the fundamental data types.
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.
Definition: pal_os_event_arduino.cpp:85
uint8_t bool_t
Typedef for a boolean.
Definition: optiga_lib_types.h:91
bool_t is_event_triggered
event triggered status
Definition: pal_os_event.h:56
PAL os event structure.
Definition: pal_os_event.h:53
LIBRARY_EXPORTS void pal_os_event_destroy(pal_os_event_t *pal_os_event)
Destroys an os event.
Definition: pal_os_event_arduino.cpp:57
void pal_os_event_process(void)
Definition: pal_os_event_arduino.cpp:102
LIBRARY_EXPORTS void pal_os_event_stop(pal_os_event_t *p_pal_os_event)
Stops an os event.
Definition: pal_os_event_arduino.cpp:97
register_callback callback_registered
registered callback
Definition: pal_os_event.h:58
void(* register_callback)(void *)
typedef for Callback function when timer elapses.
Definition: pal_os_event.h:50