Package comm
Class SPI

Public Method readRXBuffer

static int readRXBuffer()

Throws:

static int readRXBuffer(int[] rxBuf)

Throws:

static int readRXBuffer(int[] rxBuf, int offs, int len)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

readRXBuffer() method:

This method reads from the RX buffer and returns the value of the stored data frame. -1 is returned if there are no new data frames available in RX buffer.

Returns Description
val frame from the RX buffer


readRXBuffer(int[] rxBuf) method:

Parameter Description
rxBuf destination array

The rxBuf contains the read data frames from the RX buffer. The rxBuf is filled with data frames from the RX buffer starting at the beginning of the rxBuf array. This method returns the number of frames read from the RX buffer.

Returns Description
val number of returned data frames


readRXBuffer(int[] rxBuf, int offs, int nrOfFrames) method:

Parameter Description
rxBuf destination array
offs offset in rxBuf
nrOfFrames number of data frames

The rxBuf contains the read data frames from the RX buffer. The offs parameter specifies the offset between the first frame of the rxBuf and the first frame read into the rxBuf from the RX buffer. This method returns the number of frames read from the RX buffer.

Returns Description
val number of returned data frames

Example

   int[] data = new int[10];

   int ret;

   ret = SPI.readRXBuffer(data);

The example above reads 10 frames into the data array and returns the number of read data frames.


Note