spi_w8r8
Prev | Chapter 26. Serial Peripheral Interface (SPI) | Next

## Name

spi_w8r8 — SPI synchronous 8 bit write followed by 8 bit read

## Synopsis

`ssize_t spi_w8r8 (` | struct spi_device * | spi,
| u8 | cmd`)`;

## Arguments

`spi`

  device with which data will be exchanged

`cmd`

  command to be written before data is read back

## Context

can sleep

## Description

This returns the (unsigned) eight bit number returned by the device, or else a negative error code. Callable only from contexts that can sleep.

Prev | Up | Next
spi_read | Home | spi_w8r16