FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | pi_udma_fifo_t |
Functions | |
static void | pi_udma_fifo_init (pi_udma_fifo_t *fifo) |
Initialize UDMA fifo. More... | |
static int32_t | pi_udma_fifo_hw_buffer_empty (pi_udma_fifo_t *fifo) |
Get free HW slot ID. More... | |
static void | pi_udma_fifo_hw_fifo_task_enqueue (pi_udma_fifo_t *fifo, pi_task_t *task, uint8_t hw_buff_idx) |
Enqueue a task in HW buffer. More... | |
static pi_task_t * | pi_udma_fifo_hw_fifo_task_pop (pi_udma_fifo_t *fifo) |
Pop a task from HW buffer. More... | |
static pi_task_t * | pi_udma_fifo_hw_fifo_current_task_get (pi_udma_fifo_t *fifo, uint8_t hw_buff_idx) |
Get current task in HW buffer. More... | |
static void | pi_udma_fifo_sw_fifo_task_enqueue (pi_udma_fifo_t *fifo, pi_task_t *task) |
Enqueue a task in SW fifo. More... | |
static pi_task_t * | pi_udma_fifo_sw_fifo_task_pop (pi_udma_fifo_t *fifo) |
Pop a task from SW fifo. More... | |
static void | pi_udma_fifo_buffer_set (struct pi_task *task, uint32_t *buff, uint32_t *size, uint32_t max_size) |
Compute UDMA register values. More... | |
|
inlinestatic |
task | Current transfer(struct pi_task). |
buff | Pointer to L2 buffer address. |
size | Pointer to size of buffer. |
max_size | Max size supported by UDMA. |
References max_size.
Referenced by __pi_octospi_2d_copy_exec(), __pi_uart_copy_exec(), and __pi_uart_handler().
|
inlinestatic |
This function returns ID of first free UDMA HW slot.
fifo | Pointer to UDMA fifo struct. |
-1 | No free slot. |
slot_id | ID of free slot. |
References pi_udma_fifo_t::hw_buffer.
Referenced by __pi_octospi_2d_copy(), __pi_octospi_irq_handler(), __pi_uart_copy(), and __pi_uart_handler().
|
inlinestatic |
fifo | Pointer to UDMA fifo struct. |
hw_buff_idx | HW slot ID. |
Task | Pointer to current struct pi_task. |
NULL | If HW buffer is empty. |
References pi_udma_fifo_t::hw_buffer.
Referenced by __pi_uart_handler().
|
inlinestatic |
fifo | Pointer to UDMA fifo struct. |
task | Pointer to task to enqueue. |
hw_buff_idx | HW slot ID. |
References disable_irq(), pi_udma_fifo_t::hw_buffer, and restore_irq().
Referenced by __pi_octospi_2d_copy_exec(), __pi_uart_copy_exec(), and __pi_uart_handler().
|
inlinestatic |
fifo | Pointer to UDMA fifo struct. |
Task | Pointer to current struct pi_task. |
NULL | If HW buffers are empty. |
References pi_udma_fifo_t::hw_buffer.
Referenced by __pi_octospi_irq_handler(), __pi_uart_handler(), __pi_uart_rx_abort(), __pi_uart_rx_timeout_abort(), __pi_uart_tx_abort(), and __pi_uart_tx_timeout_abort().
|
inlinestatic |
struct pi_task data field array desc : data[0] = l2_buffer data[1] = size data[2] = channel
fifo | Pointer to UDMA fifo struct. |
References pi_udma_fifo_t::fifo_head, pi_udma_fifo_t::fifo_tail, and pi_udma_fifo_t::hw_buffer.
Referenced by __pi_octospi_open(), and __pi_uart_open().
|
inlinestatic |
fifo | Pointer to UDMA fifo struct. |
task | Pointer to task to enqueue. |
References disable_irq(), pi_udma_fifo_t::fifo_head, pi_udma_fifo_t::fifo_tail, pi_task_t::next, and restore_irq().
Referenced by __pi_octospi_2d_copy(), and __pi_uart_copy().
|
inlinestatic |
fifo | Pointer to UDMA fifo struct. |
Task | Pointer to first struct pi_task from SW fifo. |
NULL | If SW fifo is empty. |
References pi_udma_fifo_t::fifo_head, and pi_task_t::next.
Referenced by __pi_octospi_irq_handler(), and __pi_uart_handler().