<< Previous | Next >>

SPIWrRd

void SPIWrRd( void * SrcAddr, void * DstAddr, int ByteCount );

Description

Read and Write a block of bytes from/to the SPI port.

Note for Master: the receiving device Chip Select must already be active.

Parameters

SrcAddr
Address of data to write.

DstAddr
Address to put received data.

ByteCount
Number of bytes to read/write. The maximum value is 255 bytes. This limit is not checked! The receive buffer MUST be at least as large as the number of bytes!

Return value

Master: none.
Slave: 0 = no CS signal, no received/transmitted bytes.
           1 = CS, bytes received/transmitted.

Library

SPI.LIB

See Also

SPIinit, SPIRead, SPIWrite


Dynamic C Functions << Previous | Next >> rabbit.com