FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
spi_internal.h File Reference

Data Structures

struct  spim_drv_fifo
 
struct  spim_cs_data
 
struct  spim_driver_data
 
struct  spim_transfer
 

Macros

#define SPIM_CS_DATA_GET_DRV_DATA(cs_data)
 
#define SPIM_TMP_RD_SIZE
 
#define SPIM_TMP_WR_SIZE
 
#define RD_TMP_BUF_F
 
#define WR_TMP_BUF_F
 
#define RD_TMP_BUF_L
 
#define WR_TMP_BUF_L
 
#define SPIM_TMP_BUF_SIZE
 

Functions

void __spim_execute_callback (void *arg)
 
void spim_eot_handler (void *arg)
 
void spim_tx_handler (void *arg)
 
void spim_rx_handler (void *arg)
 
int __pi_spi_open (struct spim_cs_data **cs_data, struct pi_spi_conf *conf)
 
int __pi_spi_close (struct spim_cs_data *cs_data)
 
static int32_t __pi_spim_drv_fifo_enqueue (struct spim_cs_data *data, struct spim_transfer *transfer, pi_task_t *end_task)
 
static pi_task_t__pi_spim_drv_fifo_pop (struct spim_driver_data *data)
 
static void __pi_spim_exec_transfer (pi_task_t *task)
 
void __pi_spi_send_ucode_set_addr_info (struct spim_cs_data *cs_data, void *addr, size_t size)
 
uint8_t * __pi_spi_send_ucode_set (struct spim_cs_data *cs_data, uint8_t *ucode, size_t size)
 
void __pi_spi_receive_ucode_set_addr_info (struct spim_cs_data *cs_data, void *addr, size_t size)
 
uint8_t * __pi_spi_receive_ucode_set (struct spim_cs_data *cs_data, uint8_t *ucode, size_t size)
 
void __pi_spi_send_async (struct spim_cs_data *cs_data, void *data, size_t len, pi_spi_flags_e flags, pi_task_t *task)
 
void __pi_spi_receive_async (struct spim_cs_data *cs_data, void *data, size_t len, pi_spi_flags_e flags, pi_task_t *task)
 
void __pi_spi_receive_async_with_ucode (struct spim_cs_data *cs_data, void *data, size_t len, pi_spi_flags_e flags, int ucode_size, void *ucode, pi_task_t *task)
 
void __pi_spi_send_async_with_ucode (struct spim_cs_data *cs_data, void *data, size_t len, pi_spi_flags_e flags, int ucode_size, void *ucode, pi_task_t *task)
 
void __pi_spi_xfer_async (struct spim_cs_data *cs_data, void *tx_data, void *rx_data, size_t len, pi_spi_flags_e flags, pi_task_t *task)
 
void __pi_spi_copy_async (struct spim_cs_data *cs_data, uint32_t addr, void *data, size_t len, pi_spi_flags_e flags, pi_task_t *task)
 
void __pi_spi_copy_async_2d (struct spim_cs_data *cs_data, uint32_t addr, void *data, size_t len, size_t stride, size_t length, pi_spi_flags_e flags, pi_task_t *task)
 
static uint32_t __pi_spi_get_config (struct spim_cs_data *cs_data)
 
static void __pi_spim_drv_fifo_enqueue_task (struct spim_cs_data *cs_data, pi_task_t *end_task)
 
static struct spim_cs_data__pi_spim_get_cs_data (struct spim_driver_data *drv_data, int cs)
 
static void __pi_spim_cs_data_del (struct spim_driver_data *drv_data, int cs)
 
static void __pi_spim_cs_data_add (struct spim_driver_data *drv_data, struct spim_cs_data *cs_data)
 
void __pi_spi_freq_cb (void *args)
 

Macro Definition Documentation

#define RD_TMP_BUF_F
#define RD_TMP_BUF_L
#define SPIM_TMP_BUF_SIZE
#define SPIM_TMP_RD_SIZE
#define SPIM_TMP_WR_SIZE
#define WR_TMP_BUF_F
#define WR_TMP_BUF_L

Function Documentation

void __pi_spi_copy_async ( struct spim_cs_data cs_data,
uint32_t  addr,
void *  data,
size_t  len,
pi_spi_flags_e  flags,
pi_task_t task 
)
static uint32_t __pi_spi_get_config ( struct spim_cs_data cs_data)
inlinestatic

References spim_cs_data::cfg.

Referenced by pi_spi_get_config().

uint8_t* __pi_spi_receive_ucode_set ( struct spim_cs_data cs_data,
uint8_t *  ucode,
size_t  size 
)
void __pi_spi_receive_ucode_set_addr_info ( struct spim_cs_data cs_data,
void *  addr,
size_t  size 
)
uint8_t* __pi_spi_send_ucode_set ( struct spim_cs_data cs_data,
uint8_t *  ucode,
size_t  size 
)
void __pi_spi_send_ucode_set_addr_info ( struct spim_cs_data cs_data,
void *  addr,
size_t  size 
)
static void __pi_spim_cs_data_add ( struct spim_driver_data drv_data,
struct spim_cs_data cs_data 
)
inlinestatic
static void __pi_spim_cs_data_del ( struct spim_driver_data drv_data,
int  cs 
)
inlinestatic
static pi_task_t * __pi_spim_drv_fifo_pop ( struct spim_driver_data data)
inlinestatic
static void __pi_spim_exec_transfer ( pi_task_t task)
inlinestatic
static struct spim_cs_data* __pi_spim_get_cs_data ( struct spim_driver_data drv_data,
int  cs 
)
static
void __spim_execute_callback ( void *  arg)