SPI_master_read_write_byte

Description

Simultaniously read and write a byte from and to the SPI bus as the bus master.

NOTE: the SPI bus must have been previously aquired by this processor and the processor must be the bus master for this operation to succead.

Definition

uint SPI_master_read_write_byte(ubyte data_out)

Library

LIB/spi_bb_lib.bas

Usage

On entry:
data_out is the byte to be written to the SPI bus
On exit:
return the byte read from the SPI bus or an error code. If the value returned is less 256 then the value is valid data otherwise it is an error code.