spi_read
Prev | Chapter 9. Serial Peripheral Interface (SPI) | Next

## Name

spi_read — SPI synchronous read

## Synopsis

`int spi_read (` | struct spi_device * spi,
| void * buf,
| size_t len`)`;

## Arguments

`spi`

  device from which data will be read

`buf`

  data buffer

`len`

  data buffer size

## Context

can sleep

## Description

This reads the buffer and returns zero or a negative error code. Callable only from contexts that can sleep.

Prev | Up | Next
spi_write | Home | spi_sync_transfer