function spi_slave_tx

int spi_slave_tx(
     struct spi_device *spi,
     const void *buffer,
     int len,
     completion_cb slave_completetion_cb
)

SPI slave 发送数据

Parameters:

  • spi slave设备, 详细说明请参考 spi_device
  • buffer 接收数据地址
  • len 接收数据长度, byte为单位
  • slave_completetion_cb 接收完成回调接口,如果为NULL, 则使用阻塞模式接收; 回调函数在中断中执行;

Returns:

int 接收是否成功

Return value:

  • 0 成功
  • -1 失败

results matching ""

    No results matching ""