Provides hardware SPI support. More...
Namespaces | |
HSPI | |
Classes | |
class | SPIClass |
struct | SpiPins |
SPI pin connections. More... | |
class | HSPI::Controller |
Manages access to SPI hardware. More... | |
struct | HSPI::Data |
Specifies a block incoming or outgoing data. More... | |
class | HSPI::Device |
Manages a specific SPI device instance attached to a controller. More... | |
class | HSPI::MemoryDevice |
Base class for read/write addressable devices. More... | |
class | HSPI::RAM::IS62_65 |
IS62/65WVS2568GALL fast serial RAM. More... | |
class | HSPI::RAM::PSRAM64 |
PSRAM64(H) pseudo-SRAM. More... | |
struct | HSPI::Request |
Defines an SPI Request Packet. More... | |
class | HSPI::StreamAdapter |
Helper class for streaming data to/from SPI devices. More... | |
Typedefs | |
typedef void(* | HSPI::Callback) (Request &request) |
SPI completion callback routine. More... | |
Enumerations | |
enum | SpiBus { SpiBus::INVALID = 0, SpiBus::MIN = 1, SpiBus::FSPI = 1, SpiBus::HSPI = 2, SpiBus::VSPI = 3, SpiBus::MAX = 3 } |
Identifies bus selection. More... | |
Functions | |
bool | SPIClass::begin () override |
Initialize the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high. More... | |
void | SPIClass::end () override |
Disable the SPI bus (leaving pin modes unchanged). More... | |
uint8_t | SPIClass::read8 () override |
Read one byte from SPI without setting up registers. More... | |
uint32_t | SPIClass::transfer32 (uint32_t val, uint8_t bits=32) override |
Send/receive a word of variable size. More... | |
void | SPIClass::transfer (uint8_t *buffer, size_t numberBytes) override |
Send/receive a variable-length block of data. More... | |
void | SPIClass::prepare (SPISettings &settings) override |
Prepare/configure with settings. More... | |
SPIClass::SPIClass (SpiBus id=SpiBus::VSPI) | |
SPIClass::SPIClass (SpiBus id, SpiPins pins) | |
BusInfo & | SPIClass::getBusInfo () |
Variables | |
SPIClass | SPI |
Global instance of SPI class. More... | |
SPIClass | SPI |
Global instance of SPI class. More... | |
uint8_t | SpiPins::sck {SPI_PIN_DEFAULT} |
uint8_t | SpiPins::miso {SPI_PIN_DEFAULT} |
uint8_t | SpiPins::mosi {SPI_PIN_DEFAULT} |
uint8_t | SpiPins::ss {SPI_PIN_DEFAULT} |
static BusInfo | SPIClass::busInfo [] |
SpiBus | SPIClass::busId |
SpiPins | SPIClass::pins |
SPIClass | SPI |
Global instance of SPI class. More... | |
Detailed Description
Provides hardware SPI support.
Hardware SPI object.
Typedef Documentation
◆ Callback
typedef void(* HSPI::Callback) (Request &request) |
SPI completion callback routine.
Enumeration Type Documentation
◆ SpiBus
|
strong |
Function Documentation
◆ begin()
|
overridevirtual |
Initialize the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high.
Implements SPIBase.
◆ end()
|
inlineoverridevirtual |
Disable the SPI bus (leaving pin modes unchanged).
Implements SPIBase.
◆ getBusInfo()
|
protected |
◆ prepare()
|
overrideprotectedvirtual |
Prepare/configure with settings.
- Parameters
-
settings include frequency, byte order and SPI mode
Implements SPIBase.
◆ read8()
|
overridevirtual |
Read one byte from SPI without setting up registers.
- Parameters
-
none
- Return values
-
byte received
used for performance tuning when doing continuous reads this method does not reset the registers , so make sure that a regular transfer(data) call was performed
Note: this method is not found on the Arduino API
USE WITH CARE !!
Reimplemented from SPIBase.
◆ SPIClass() [1/2]
|
inline |
◆ SPIClass() [2/2]
◆ transfer()
|
overridevirtual |
Send/receive a variable-length block of data.
- Parameters
-
buffer IN: The data to send; OUT: The received data size Number of bytes to transfer
Implements SPIBase.
◆ transfer32()
|
overridevirtual |
Send/receive a word of variable size.
- Parameters
-
val Word to send bits Number of bits to send
SPI transfer is based on a simultaneous send and receive: the received data is returned in receivedVal (or receivedVal16).
receivedVal = SPI.transfer(val) : single byte receivedVal16 = SPI.transfer16(val16) : single short
Reimplemented from SPIBase.
Variable Documentation
◆ busId
|
protected |
◆ busInfo
|
staticprotected |
◆ miso
uint8_t SpiPins::miso {SPI_PIN_DEFAULT} |
◆ mosi
uint8_t SpiPins::mosi {SPI_PIN_DEFAULT} |
◆ pins
|
protected |
◆ sck
uint8_t SpiPins::sck {SPI_PIN_DEFAULT} |
◆ SPI [1/3]
SPIClass SPI |
Global instance of SPI class.
◆ SPI [2/3]
SPIClass SPI |
Global instance of SPI class.
◆ SPI [3/3]
SPIClass SPI |
Global instance of SPI class.
◆ ss
uint8_t SpiPins::ss {SPI_PIN_DEFAULT} |