[Overview][Resource strings][Constants][Types][Classes][Index] |
Bidirectional read and write
Source position: fpspi.pas line 78
public procedure TSPIDevice.ReadAndWrite( |
const aWriteBuffer; |
aWriteCount: LongInt; |
var aReadBuffer; |
aReadCount: LongInt |
); virtual; abstract; |
aWriteBuffer |
|
Data written to the bus |
aWriteCount |
|
Count of bytes in buffer |
aReadBuffer |
|
Data received from the bus |
aReadCount |
|
Maximum bytes read |
This method allows simultanous read and write acces to the SPI bus.
The buffer sizes may not be equal. If the write buffer is the smaller one, all futher bytes will be filled with zeroes. If the read buffer is the smaller one, more bytes may be read from the device but will not be reported back to the caller.
Remark: | Please check your SPI device's manual, if this behaviour is supported. Otherwise provide read and write buffers with the same length and handle them in your application's code. |