Appiko
Functions
IRQ to main thread message passer

This module is used to pass messages from any higher priority interrupts to lower priority ones or the main thread so that the higher priority interrupt can finish soon and off-load non-real time tasks. More...

Functions

void irq_msg_init (irq_msg_callbacks *cb_ptr)
 
void irq_msg_push (irq_msg_types pushed_msg, void *more_data)
 
void irq_msg_process (void)
 

Detailed Description

Function Documentation

◆ irq_msg_init()

void irq_msg_init ( irq_msg_callbacks *  cb_ptr)

Initialize the messenger ring buffer system

Parameters
cb_ptrThe array of function pointers that gets called for different message types.

Definition at line 53 of file irq_msg_util.c.

References ASSERT, and CBUF_Init.

◆ irq_msg_process()

void irq_msg_process ( void  )

This function is to be called in the while(1) loop in main() so that all the pushed messages can be processed.

Definition at line 77 of file irq_msg_util.c.

References CBUF_Len, and CBUF_Pop.

◆ irq_msg_push()

void irq_msg_push ( irq_msg_types  pushed_msg,
void *  more_data 
)

This function is to be called in the higher priority interrupt and is used to push the required message.

Parameters
pushed_msgThe type of message to be pushed
more_dataThe data of the message to be pushed

Definition at line 64 of file irq_msg_util.c.

References CBUF_Push, CRITICAL_REGION_ENTER, and CRITICAL_REGION_EXIT.

Referenced by button_handler(), and device_tick_process().