-`data` data can be either a string, a table or an integer number.<br/>Each data item is considered with `databits` number of bits.
#### Returns
-`wrote` number of written bytes
-`rdata` received data when configured with `spi.FULLDUPLEX`<br/>Same data type as corresponding data parameter.
#### Example
```lua
=spi.send(1,0,255,255,255)
4255192320
x={spi.send(1,0,255,255,255)}
=x[1]
4
=x[2]
255
=x[3]
192
=x[4]
32
=x[5]
0
=x[6]
nil
=#x
5
_,_,x=spi.send(1,0,{255,255,255})
=x[1]
192
=x[2]
32
=x[3]
0
```
#### See also
-[spi.setup()](#spisetup)
-[spi.recv()](#spirecv)
## spi.setup()
Set up the SPI configuration.
Refer to [Serial Peripheral Interface Bus](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Clock_polarity_and_phase) for details regarding the clock polarity and phase definition.