---
name: "spi_sync_transfer"
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_sync_transfer"
---

# spi\_sync\_transfer(9)

synchronous SPI data transfer

## NAME

spi\_sync\_transfer - synchronous SPI data transfer

## SYNOPSIS

**int spi\_sync\_transfer(struct spi\_device \*** *spi***, struct spi\_transfer \*** *xfers***, unsigned int** *num\_xfers***);**

## ARGUMENTS

*spi*

device with which data will be exchanged

*xfers*

An array of spi\_transfers

*num\_xfers*

Number of items in the xfer array

## CONTEXT

can sleep

## DESCRIPTION

Does a synchronous SPI data transfer of the given spi\_transfer array.

For more specific semantics see **spi\_sync**.

It returns zero on success, else a negative error code.

## COPYRIGHT
