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

Functions

static int32_t pi_udma_core_lin_alloc (pi_fc_event_handler_t handler, void *arg)
 Allocate a UDMA linear channel. More...
 
static void pi_udma_core_lin_free (int32_t chan_id)
 Free a UDMA linear channel. More...
 
static int32_t pi_udma_core_2d_alloc (pi_fc_event_handler_t handler, void *arg)
 Allocate a UDMA 2D channel. More...
 
static void pi_udma_core_2d_free (int32_t chan_id)
 Free a UDMA 2D channel. More...
 
static int32_t pi_udma_core_fifo_alloc (pi_fc_event_handler_t handler, void *arg)
 Allocate a UDMA FIFO channel. More...
 
static void pi_udma_core_fifo_free (int32_t chan_id)
 Free a UDMA FIFO channel. More...
 

Function Documentation

static int32_t pi_udma_core_2d_alloc ( pi_fc_event_handler_t  handler,
void *  arg 
)
inlinestatic

Before any transfer on UDMA, a UDMA channel must be allocated. This function is used to allocate a 2D channel.

Parameters
handlerFunction pointer to callback.
Return values
chan_idID of the channel allocated if operation is successful.
-1No available channels.

References pi_fc_event_handler_is_free(), pi_fc_event_handler_set(), UDMA_CHAN_2D_ID, and UDMA_NB_CHAN_2D.

Referenced by __pi_hyper_open(), __pi_octospi_open(), and pi_udma_datamove_open().

static void pi_udma_core_2d_free ( int32_t  chan_id)
inlinestatic

When a transfer is finished on UDMA or before closing a UDMA interface, allocated channels must be freed. This function allows to free an allocated channel.

Parameters
chan_idID of the channel to free.

References pi_fc_event_handler_clear(), UDMA_CHAN_2D_ID, and UDMA_NB_CHAN_2D.

Referenced by __pi_hyper_close(), __pi_hyper_open(), __pi_octospi_close(), __pi_octospi_open(), pi_udma_datamove_close(), and pi_udma_datamove_open().

static int32_t pi_udma_core_fifo_alloc ( pi_fc_event_handler_t  handler,
void *  arg 
)
inlinestatic

Before any transfer on UDMA, a UDMA channel must be allocated. This function is used to allocate a FIFO channel.

Parameters
handlerFunction pointer to callback.
Return values
chan_idID of the channel allocated if operation is successful.
-1No available channels.

References pi_fc_event_handler_is_free(), pi_fc_event_handler_set(), UDMA_CHAN_FIFO_ID, and UDMA_NB_CHAN_FIFO.

Referenced by pi_udma_fifo_open().

static void pi_udma_core_fifo_free ( int32_t  chan_id)
inlinestatic

When a transfer is finished on UDMA or before closing a UDMA interface, allocated channels must be freed. This function allows to free an allocated channel.

Parameters
chan_idID of the channel to free.

References pi_fc_event_handler_clear(), UDMA_CHAN_FIFO_ID, and UDMA_NB_CHAN_FIFO.

Referenced by pi_udma_fifo_close().

static int32_t pi_udma_core_lin_alloc ( pi_fc_event_handler_t  handler,
void *  arg 
)
inlinestatic

Before any transfer on UDMA, a UDMA channel must be allocated. This function is used to allocate a linear channel.

Parameters
handlerFunction pointer to callback.
Return values
chan_idID of the channel allocated if operation is successful.
-1No available channels.

References pi_fc_event_handler_is_free(), pi_fc_event_handler_set(), UDMA_CHAN_LIN_ID, and UDMA_NB_CHAN_LIN.

Referenced by __pi_aes_open(), __pi_cpi_open(), __pi_i2c_open(), __pi_i2c_slave_open(), __pi_i2s_slot_conf_apply(), __pi_uart_conf_set(), pi_ffc_open(), and pi_udma_datamove_open().

static void pi_udma_core_lin_free ( int32_t  chan_id)
inlinestatic

When a transfer is finished on UDMA or before closing a UDMA interface, allocated channels must be freed. This function allows to free an allocated channel.

Parameters
chan_idID of the channel to free.

References pi_fc_event_handler_clear(), UDMA_CHAN_LIN_ID, and UDMA_NB_CHAN_LIN.

Referenced by __pi_aes_close(), __pi_cpi_close(), __pi_i2c_close(), __pi_i2c_slave_close(), __pi_uart_close(), __pi_uart_conf_set(), pi_ffc_close(), pi_udma_datamove_close(), and pi_udma_datamove_open().