OPTIGA™ Trust M
Host Library Documentation
pal_os_event.h File Reference

This file provides the prototype declarations of PAL OS event. More...

Include dependency graph for pal_os_event.h:

Go to the source code of this file.

Data Structures

struct  pal_os_event
 PAL os event structure. More...
 
typedef void(* register_callback) (void *)
 typedef for Callback function when timer elapses. More...
 
typedef struct pal_os_event pal_os_event_t
 PAL os event structure. More...
 
LIBRARY_EXPORTS pal_os_event_tpal_os_event_create (register_callback callback, void *callback_args)
 Create an os event. More...
 
LIBRARY_EXPORTS void pal_os_event_destroy (pal_os_event_t *pal_os_event)
 Destroys an os event. More...
 
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. More...
 
void pal_os_event_trigger_registered_callback (void)
 Timer callback handler. More...
 
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. More...
 
LIBRARY_EXPORTS void pal_os_event_stop (pal_os_event_t *p_pal_os_event)
 Stops an os event. More...
 

Detailed Description

This file provides the prototype declarations of PAL OS event.

Author
Infineon Technologies AG

Definition in file pal_os_event.h.

Typedef Documentation

◆ pal_os_event_t

typedef struct pal_os_event pal_os_event_t

PAL os event structure.

◆ register_callback

typedef void( * register_callback) (void *)

typedef for Callback function when timer elapses.

Definition at line 50 of file pal_os_event.h.

Function Documentation

◆ pal_os_event_create()

LIBRARY_EXPORTS pal_os_event_t* pal_os_event_create ( register_callback  callback,
void *  callback_args 
)

Create an os event.

Starts an OS event.

Precondition
  • None
Note
  • None
Parameters
[in]callbackCallback function to be registered internally
[in]callback_argsArguement to be passed to registered callback

◆ pal_os_event_destroy()

LIBRARY_EXPORTS void pal_os_event_destroy ( pal_os_event_t pal_os_event)

Destroys an os event.

Starts an OS event.

Precondition
  • None
Note
  • None
Parameters
[in]pal_os_eventpal_os_event to be destroyed

◆ 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.

Platform specific event call back registration function to trigger once when timer expires.

  • This function registers the callback function supplied by the caller.
  • It triggers a timer with the supplied time interval in microseconds.
  • Once the timer expires, the registered callback function gets called.
Precondition
  • None
Note
  • None
Parameters
[in]p_pal_os_eventPointer to pal_os_event
[in]callbackCallback function pointer
[in]callback_argsCallback arguments
[in]time_ustime in micro seconds to trigger the call back

◆ 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.

Starts an OS event.

Precondition
  • None
Note
  • None
Parameters
[in]p_pal_os_eventPointer to os event
[in]callbackCallback function to be registered internally
[in]callback_argsArguement to be passed to registered callback

◆ pal_os_event_stop()

LIBRARY_EXPORTS void pal_os_event_stop ( pal_os_event_t p_pal_os_event)

Stops an os event.

Stops an OS event.

Precondition
  • None
Note
  • None
Parameters
[in]p_pal_os_eventPointer to os event

◆ pal_os_event_trigger_registered_callback()

void pal_os_event_trigger_registered_callback ( void  )

Timer callback handler.

Timer callback handler.

  • This gets called from the TIMER elapse event.
  • Once the timer expires, the registered callback function gets called from the timer event handler, if the call back is not NULL.
Precondition
  • None
Note
  • None