92#if (RH_PLATFORM == RH_PLATFORM_MONGOOSE_OS)
97 virtual uint8_t transfer2B(uint8_t byte0, uint8_t byte1) = 0;
104 virtual uint8_t spiBurstRead(uint8_t reg, uint8_t* dest, uint8_t len) = 0;
111 virtual uint8_t spiBurstWrite(uint8_t reg,
const uint8_t* src, uint8_t len) = 0;
169 (void)interruptNumber;
Base class for SPI interfaces.
Definition RHGenericSPI.h:31
Frequency _frequency
The configure SPI Bus frequency, one of RHGenericSPI::Frequency.
Definition RHGenericSPI.h:175
DataMode _dataMode
SPI bus mode, one of RHGenericSPI::DataMode.
Definition RHGenericSPI.h:181
virtual uint8_t transfer(uint8_t data)=0
DataMode
Defines constants for different SPI modes.
Definition RHGenericSPI.h:41
@ DataMode0
SPI Mode 0: CPOL = 0, CPHA = 0.
Definition RHGenericSPI.h:42
@ DataMode2
SPI Mode 2: CPOL = 1, CPHA = 0.
Definition RHGenericSPI.h:44
@ DataMode3
SPI Mode 3: CPOL = 1, CPHA = 1.
Definition RHGenericSPI.h:45
@ DataMode1
SPI Mode 1: CPOL = 0, CPHA = 1.
Definition RHGenericSPI.h:43
virtual void usingInterrupt(uint8_t interruptNumber)
Definition RHGenericSPI.h:168
BitOrder
Defines constants for different SPI endianness.
Definition RHGenericSPI.h:71
@ BitOrderMSBFirst
SPI MSB first.
Definition RHGenericSPI.h:72
@ BitOrderLSBFirst
SPI LSB first.
Definition RHGenericSPI.h:73
virtual void setBitOrder(BitOrder bitOrder)
Definition RHGenericSPI.cpp:17
virtual void setDataMode(DataMode dataMode)
Definition RHGenericSPI.cpp:22
virtual void endTransaction()
Definition RHGenericSPI.h:160
virtual void setFrequency(Frequency frequency)
Definition RHGenericSPI.cpp:27
BitOrder _bitOrder
Bit order, one of RHGenericSPI::BitOrder.
Definition RHGenericSPI.h:178
virtual void attachInterrupt()
Definition RHGenericSPI.h:118
virtual void beginTransaction()
Definition RHGenericSPI.h:155
Frequency
Defines constants for different SPI bus frequencies.
Definition RHGenericSPI.h:56
@ Frequency8MHz
SPI bus frequency close to 8MHz.
Definition RHGenericSPI.h:60
@ Frequency2MHz
SPI bus frequency close to 2MHz.
Definition RHGenericSPI.h:58
@ Frequency1MHz
SPI bus frequency close to 1MHz.
Definition RHGenericSPI.h:57
@ Frequency16MHz
SPI bus frequency close to 16MHz.
Definition RHGenericSPI.h:61
@ Frequency4MHz
SPI bus frequency close to 4MHz.
Definition RHGenericSPI.h:59
virtual void detachInterrupt()
Definition RHGenericSPI.h:122