Function rc_spi_read#

Function Documentation#

int rc_spi_read(int bus, int slave, uint8_t *data, size_t bytes)#

Reads data from a specified slave.

Parameters:
  • bus[in] SPI bus to use

  • slave[in] slave id

  • data – data poitner

  • bytes[in] number of bytes to read

Returns:

number of bytes read or -1 on failure