FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | octospi_cs_data_s |
struct | octospi_itf_data_s |
Functions | |
void | __pi_octospi_conf_init (struct pi_octospi_conf *conf) |
Init octospi configuration structure. More... | |
int32_t | __pi_octospi_open (struct pi_octospi_conf *conf, struct octospi_cs_data_s **device_data) |
Open octospi device. More... | |
void | __pi_octospi_close (struct octospi_cs_data_s *cs_data) |
Close octospi device. More... | |
int32_t | __pi_octospi_ioctl (struct octospi_cs_data_s *cs_data, uint32_t cmd, void *arg) |
Ioctl function. More... | |
void | __pi_octospi_2d_copy (struct octospi_cs_data_s *cs_data, uint32_t ext_addr, void *addr, uint32_t size, uint32_t stride, uint32_t length, pi_octospi_op_conf_t *op, udma_channel_e channel, pi_task_t *task) |
Enqueue 2D transfer. More... | |
void __pi_octospi_2d_copy | ( | struct octospi_cs_data_s * | cs_data, |
uint32_t | ext_addr, | ||
void * | addr, | ||
uint32_t | size, | ||
uint32_t | stride, | ||
uint32_t | length, | ||
pi_octospi_op_conf_t * | op, | ||
udma_channel_e | channel, | ||
pi_task_t * | task | ||
) |
cs_data | Pointer to ospi device data. |
ext_addr | External address. |
addr | L2 buffer address. |
size | Size of data to transfer. |
stride | 2D stride value, 0 if 1D. |
length | 2D length value, 0 if 1D. |
op | OSPI operation. |
channel | Type of transfer(RX or TX). |
task | Event task attached to the transfer. |
References __pi_octospi_2d_copy_exec(), pi_task_t::data, octospi_cs_data_s::device_id, octospi_itf_data_s::device_id, disable_irq(), pi_task_t::next, OSPI_TRACE, pi_udma_fifo_hw_buffer_empty(), pi_udma_fifo_sw_fifo_task_enqueue(), restore_irq(), octospi_itf_data_s::udma_chan, and udma_chan_str.
Referenced by pi_octospi_read(), pi_octospi_read_2d(), pi_octospi_read_2d_async(), pi_octospi_read_async(), pi_octospi_write(), pi_octospi_write_2d(), pi_octospi_write_2d_async(), and pi_octospi_write_async().
void __pi_octospi_close | ( | struct octospi_cs_data_s * | cs_data | ) |
cs_data | Pointer to ospi device data. |
References octospi_cs_data_s::device_id, hal_udma_core_2d_get(), hal_udma_core_2d_reset(), hal_udma_ctrl_cg_enable(), hal_udma_ctrl_reset_clear(), hal_udma_hyperbus_rx_dest_set(), hal_udma_hyperbus_tx_dest_set(), HYPER_TRACE, octospi_itf_data_s::nb_open, pi_free(), pi_udma_core_2d_free(), UDMA_CHAN_2D_ID, octospi_itf_data_s::udma_chan_id_rx, octospi_itf_data_s::udma_chan_id_tx, and UDMA_HYPER_ID.
Referenced by pi_octospi_close().
void __pi_octospi_conf_init | ( | struct pi_octospi_conf * | conf | ) |
conf | Pointer to octospi conf. |
Referenced by pi_octospi_conf_init().
int32_t __pi_octospi_ioctl | ( | struct octospi_cs_data_s * | cs_data, |
uint32_t | cmd, | ||
void * | arg | ||
) |
cs_data | Pointer to ospi device data. |
cmd | Ioctl command ID. |
arg | Ioctl command arg. |
-1 | Unknown command. |
RETVAL | Ioctl function return value. |
References __pi_octospi_ospi_config_set(), disable_irq(), and restore_irq().
Referenced by pi_octospi_ioctl().
int32_t __pi_octospi_open | ( | struct pi_octospi_conf * | conf, |
struct octospi_cs_data_s ** | device_data | ||
) |
conf | Pointer to octospi conf. |
driver_conf | Pointer to internal octospi conf pointer. |
0 | Operation is successful. |
ERRNO | Error code. |
References __pi_octospi_0_irq_handler(), __pi_octospi_1_irq_handler(), __pi_octospi_clk_div_get(), __pi_octospi_device_settings_set(), __pi_octospi_handler(), octospi_cs_data_s::baudrate, octospi_itf_data_s::cs_list, octospi_itf_data_s::device_id, FC_IRQ_HYPER_0_EOT_IRQ, FC_IRQ_HYPER_1_EOT_IRQ, hal_udma_ctrl_cg_disable(), hal_udma_ctrl_reset_set(), hal_udma_hyperbus_irq_enable(), hal_udma_hyperbus_rx_dest_set(), hal_udma_hyperbus_transfert_mode_set(), hal_udma_hyperbus_tx_dest_set(), HYPER_BURST_2D_ENABLE, HYPER_MODE_AUTO_ENABLE, octospi_itf_data_s::nb_open, NVIC_EnableIRQ, NVIC_SetVector, OSPI_TRACE, OSPI_TRACE_ERR, pi_free(), pi_malloc(), pi_udma_core_2d_alloc(), pi_udma_core_2d_free(), pi_udma_fifo_init(), octospi_itf_data_s::udma_chan, octospi_itf_data_s::udma_chan_id_rx, octospi_itf_data_s::udma_chan_id_tx, udma_ctrl, udma_hyper, UDMA_HYPER_BURST_ENABLE_2D_ENABLE, UDMA_HYPER_BURST_ENABLE_CS0_AUTO_BURST_ENABLE_MASK, UDMA_HYPER_BURST_ENABLE_CS0_MAXIMUM_CHECK_ENABLE_MASK, and UDMA_HYPER_ID.
Referenced by pi_octospi_open().