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

Macros

#define DEBUG_PRINTF(...)
 
#define SPI_UCODE_CMD_SEND_CMD(cmd, bits, qpi)
 
#define SPI_UCODE_CMD_SEND_ADDR(bits, qpi)
 
#define SPI_UCODE_CMD_DUMMY(cycles)
 

Functions

int pi_spi_open (struct pi_device *device)
 
void pi_spi_close (struct pi_device *device)
 
void pi_spi_ioctl (struct pi_device *device, uint32_t cmd, void *arg)
 
void pi_spi_send (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag)
 
void pi_spi_send_async (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag, pi_task_t *task)
 
void pi_spi_receive (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag)
 
void pi_spi_receive_async (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flag, pi_task_t *task)
 
void pi_spi_receive_with_ucode (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flags, int ucode_size, void *ucode)
 
void pi_spi_send_with_ucode (struct pi_device *device, void *data, size_t len, pi_spi_flags_e flags, int ucode_size, void *ucode)
 
uint32_t pi_spi_get_config (struct pi_device *device)
 
void pi_spi_transfer (struct pi_device *device, void *tx_data, void *rx_data, size_t len, pi_spi_flags_e flag)
 
void pi_spi_transfer_async (struct pi_device *device, void *tx_data, void *rx_data, size_t len, pi_spi_flags_e flag, pi_task_t *task)
 
void * pi_spi_receive_ucode_set (struct pi_device *device, uint8_t *ucode, uint32_t ucode_size)
 
void pi_spi_receive_ucode_set_addr_info (struct pi_device *device, uint8_t *ucode, uint32_t ucode_size)
 
void * pi_spi_send_ucode_set (struct pi_device *device, uint8_t *ucode, uint32_t ucode_size)
 
void pi_spi_send_ucode_set_addr_info (struct pi_device *device, uint8_t *ucode, uint32_t ucode_size)
 
void pi_spi_copy (struct pi_device *device, uint32_t addr, void *data, uint32_t size, pi_spi_flags_e flags)
 
void pi_spi_copy_async (struct pi_device *device, uint32_t addr, void *data, uint32_t size, pi_spi_flags_e flags, pi_task_t *task)
 
void pi_spi_copy_2d (struct pi_device *device, uint32_t addr, void *data, uint32_t size, uint32_t stride, uint32_t length, pi_spi_flags_e flags)
 
void pi_spi_copy_2d_async (struct pi_device *device, uint32_t addr, void *data, uint32_t size, uint32_t stride, uint32_t length, pi_spi_flags_e flags, pi_task_t *task)
 

Macro Definition Documentation

#define DEBUG_PRINTF (   ...)
#define SPI_UCODE_CMD_DUMMY (   cycles)
#define SPI_UCODE_CMD_SEND_ADDR (   bits,
  qpi 
)
#define SPI_UCODE_CMD_SEND_CMD (   cmd,
  bits,
  qpi 
)

Function Documentation

void pi_spi_close ( struct pi_device *  device)

References __pi_spi_close(), and restore_irq().

void pi_spi_copy ( struct pi_device *  device,
uint32_t  addr,
void *  data,
uint32_t  size,
pi_spi_flags_e  flags 
)
void pi_spi_copy_2d ( struct pi_device *  device,
uint32_t  addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
pi_spi_flags_e  flags 
)
void pi_spi_copy_2d_async ( struct pi_device *  device,
uint32_t  addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
pi_spi_flags_e  flags,
pi_task_t task 
)
void pi_spi_copy_async ( struct pi_device *  device,
uint32_t  addr,
void *  data,
uint32_t  size,
pi_spi_flags_e  flags,
pi_task_t task 
)

References __pi_spi_copy_async().

uint32_t pi_spi_get_config ( struct pi_device *  device)

References __pi_spi_get_config().

void pi_spi_ioctl ( struct pi_device *  device,
uint32_t  cmd,
void *  arg 
)
int pi_spi_open ( struct pi_device *  device)

References __pi_spi_open(), and restore_irq().

void pi_spi_receive ( struct pi_device *  device,
void *  data,
size_t  len,
pi_spi_flags_e  flag 
)
void pi_spi_receive_async ( struct pi_device *  device,
void *  data,
size_t  len,
pi_spi_flags_e  flag,
pi_task_t task 
)

References __pi_spi_receive_async().

Referenced by pi_spi_receive().

void* pi_spi_receive_ucode_set ( struct pi_device *  device,
uint8_t *  ucode,
uint32_t  ucode_size 
)
void pi_spi_receive_ucode_set_addr_info ( struct pi_device *  device,
uint8_t *  ucode,
uint32_t  ucode_size 
)
void pi_spi_receive_with_ucode ( struct pi_device *  device,
void *  data,
size_t  len,
pi_spi_flags_e  flags,
int  ucode_size,
void *  ucode 
)
void pi_spi_send ( struct pi_device *  device,
void *  data,
size_t  len,
pi_spi_flags_e  flag 
)
void pi_spi_send_async ( struct pi_device *  device,
void *  data,
size_t  len,
pi_spi_flags_e  flag,
pi_task_t task 
)

References __pi_spi_send_async().

Referenced by pi_spi_send().

void* pi_spi_send_ucode_set ( struct pi_device *  device,
uint8_t *  ucode,
uint32_t  ucode_size 
)
void pi_spi_send_ucode_set_addr_info ( struct pi_device *  device,
uint8_t *  ucode,
uint32_t  ucode_size 
)
void pi_spi_send_with_ucode ( struct pi_device *  device,
void *  data,
size_t  len,
pi_spi_flags_e  flags,
int  ucode_size,
void *  ucode 
)
void pi_spi_transfer ( struct pi_device *  device,
void *  tx_data,
void *  rx_data,
size_t  len,
pi_spi_flags_e  flag 
)
void pi_spi_transfer_async ( struct pi_device *  device,
void *  tx_data,
void *  rx_data,
size_t  len,
pi_spi_flags_e  flag,
pi_task_t task 
)

References __pi_spi_xfer_async().

Referenced by pi_spi_transfer().