---
name: "spi_w8r16be"
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_w8r16be"
---

# spi\_w8r16be(9)

SPI synchronous 8 bit write followed by 16 bit big-endian read

## NAME

spi\_w8r16be - SPI synchronous 8 bit write followed by 16 bit big-endian read

## SYNOPSIS

**ssize\_t spi\_w8r16be(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) sixteen bit number returned by the device in cpu endianness, or else a negative error code. Callable only from contexts that can sleep.

This function is similar to spi\_w8r16, with the exception that it will convert the read 16 bit data word from big-endian to native endianness.

## COPYRIGHT
