31 #define SPI_PATH "/dev/spidev"
33 namespace exploringBB{
52 SPIDevice(
unsigned int bus,
unsigned int device);
54 virtual unsigned char readRegister(
unsigned int registerAddress);
55 virtual unsigned char* readRegisters(
unsigned int number,
unsigned int fromAddress=0);
56 virtual int writeRegister(
unsigned int registerAddress,
unsigned char value);
57 virtual void debugDumpRegisters(
unsigned int number = 0xff);
58 virtual int write(
unsigned char value);
59 virtual int write(
unsigned char value[],
int length);
60 virtual int setSpeed(uint32_t speed);
62 virtual int setBitsPerWord(uint8_t bits);
65 virtual int transfer(
unsigned char read[],
unsigned char write[],
int length);
int write(string path, string filename, string value)
Definition: util.cpp:40
SPIMODE
The SPI Mode.
Definition: SPIDevice.h:42
Generic SPI Device class that can be used to connect to any type of SPI device and read or write to i...
Definition: SPIDevice.h:39
This class is the parent of I2C and SPI devices, so that devices that use both SPI and I2C interfaces...
Definition: BusDevice.h:37
string read(string path, string filename)
Definition: util.cpp:57