28 #include <linux/spi/spidev.h>
65 int transfer(
unsigned char *send,
unsigned char *receive,
73 int setMode(
unsigned char mode);
97 unsigned char numBits;
100 struct spi_ioc_transfer transaction;
101 int openDevice(
const char* device);
const char * device
device path to the device file (e.g.: /dev/spidev2.1)
Definition: Spi.h:40
int transfer(unsigned char *send, unsigned char *receive, size_t numBytes)
Definition: Spi.cpp:123
int setNumBits(unsigned char numBits)
Definition: Spi.cpp:103
int setSpeed(unsigned long speed)
Definition: Spi.cpp:113
unsigned int mode
SPI mode (e.g.: Spi::MODE3). This is not a Mode because the user can specify a custom mode by OR'ing ...
Definition: Spi.h:44
void cleanup()
Definition: Spi.cpp:141
unsigned short delay
delay after the last bit transfer before deselecting the device
Definition: Spi.h:42
int setMode(unsigned char mode)
Definition: Spi.cpp:94
unsigned char numBits
numBits No. of bits per transaction. 8, 16, 24 or 32
Definition: Spi.h:43
int setup(const Settings &settings)
Definition: Spi.cpp:38
unsigned long speed
requested clock rate in Hz
Definition: Spi.h:41