Optimized High Speed NRF24L01+ Driver Class Documenation  V1.0
TMRh20 2014 - Optimized Fork of NRF24L01+ Driver
Functions | Variables
Porting: SPI

Functions

 SPI ()
 
void begin (int busNo)
 
uint8_t transfer (uint8_t tx_)
 
void transfernb (char *tbuf, char *rbuf, uint32_t len)
 
void transfern (char *buf, uint32_t len)
 
virtual ~SPI ()
 

Variables

string device
 
uint8_t mode
 
uint8_t bits
 
uint32_t speed
 
int fd
 

Detailed Description

Example of spi.h class declaration for SPI portability

Function Documentation

SPI ( )

SPI constructor

Examples:
timingSearch3pin.ino.
void begin ( int  busNo)

Start SPI

Examples:
timingSearch3pin.ino.
uint8_t transfer ( uint8_t  tx_)

Transfer a single byte

Parameters
tx_Byte to send
Returns
Data returned via spi
Examples:
timingSearch3pin.ino.
void transfernb ( char *  tbuf,
char *  rbuf,
uint32_t  len 
)

Transfer a buffer of data

Parameters
tbufTransmit buffer
rbufReceive buffer
lenLength of the data
void transfern ( char *  buf,
uint32_t  len 
)

Transfer a buffer of data without an rx buffer

Parameters
bufPointer to a buffer of data
lenLength of the data
virtual ~SPI ( )
virtual

Variable Documentation

string device

Default SPI device

Definition at line 68 of file spi.h.

uint8_t mode

SPI Mode set

Examples:
timingSearch3pin.ino.

Definition at line 70 of file spi.h.

uint8_t bits

word size

Definition at line 72 of file spi.h.

uint32_t speed

Set SPI speed

Definition at line 74 of file spi.h.

int fd

Definition at line 75 of file spi.h.