---
name: "spi_w8r8"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/spi_w8r8"
---

# spi\_w8r8(9)

SPI synchronous 8 bit write followed by 8 bit read

## 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.

## COPYRIGHT
