FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gap9/pmsis/drivers/fc_event/fc_event.c File Reference

Functions

void pi_fc_event_handler_init (uint32_t fc_event_irq)
 Initialize FC event handler. More...
 
void pi_fc_event_handler_set (uint32_t event_id, pi_fc_event_handler_t event_handler, void *arg)
 Set event handler for a SoC event. More...
 
void pi_fc_event_handler_clear (uint32_t event_id)
 
int32_t pi_fc_event_handler_is_free (uint32_t event_id)
 Check handler is set. More...
 
 __attribute__ ((section(".text")))
 

Variables

static pi_fc_event_handler_t fc_event_handlers [NB_SOC_EVENTS]
 
static void * fc_event_handler_args [NB_SOC_EVENTS]
 

Function Documentation

int32_t pi_fc_event_handler_is_free ( uint32_t  event_id)
inline

This function checks if an event handler is set for the given SoC event.

Parameters
event_idSoC event ID.
Note
It is used to check if a UDMA channel is already allocated by a device.

References fc_event_handlers.

Referenced by pi_udma_core_2d_alloc(), pi_udma_core_fifo_alloc(), and pi_udma_core_lin_alloc().

void pi_fc_event_handler_set ( uint32_t  event_id,
pi_fc_event_handler_t  event_handler,
void *  arg 
)

This function sets an event handler for a given SoC event.

Parameters
event_idSoC event ID.
event_handlerSoC event handler function.
argSoc event handler argument.

References fc_event_handler_args, and fc_event_handlers.

Variable Documentation

void* fc_event_handler_args[NB_SOC_EVENTS]
static

Callback arguments.

Referenced by __attribute__(), pi_fc_event_handler_clear(), and pi_fc_event_handler_set().