SPISoft Class Reference
#include <SPISoft.h>
Inheritance diagram for SPISoft:
Collaboration diagram for SPISoft:
Public Member Functions | |
SPISoft (uint16_t miso, uint16_t mosi, uint16_t sck, uint8_t delay) | |
bool | begin () override |
Initialize the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high. More... | |
void | end () override |
Disable the SPI bus (leaving pin modes unchanged). More... | |
void | transfer (uint8_t *buffer, size_t size) override |
Send/receive a variable-length block of data. More... | |
void | setDelay (uint8_t dly) |
Set microsecond delay for the SCK signal. Impacts SPI speed. More... | |
![]() | |
virtual | ~SPIBase () |
void | beginTransaction (SPISettings &settings) |
Initialize the SPI bus using the defined SPISettings. More... | |
void | beginTransaction (const SPISettings &settings) |
virtual void | endTransaction () |
Stop using the SPI bus. Normally this is called after de-asserting the chip select, to allow other libraries to use the SPI bus. More... | |
virtual uint8_t | read8 () |
Read one byte from SPI without setting up registers. More... | |
uint8_t | transfer (uint8_t val) |
Send/receive one bytes of data. More... | |
uint16_t | transfer16 (uint16_t val) |
Send/receive one 16-bit word of data. More... | |
virtual uint32_t | transfer32 (uint32_t val, uint8_t bits=32) |
Send/receive a word of variable size. More... | |
Protected Member Functions | |
void | prepare (SPISettings &settings) override |
Prepare/configure with settings. More... | |
Additional Inherited Members | |
![]() | |
SPISettings | SPIDefaultSettings |
Default settings used by the SPI bus until reset by beginTransaction(SPISettings) More... | |
Constructor & Destructor Documentation
◆ SPISoft()
Member 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.
◆ prepare()
|
inlineoverrideprotectedvirtual |
Prepare/configure with settings.
- Parameters
-
settings include frequency, byte order and SPI mode
Implements SPIBase.
◆ setDelay()
|
inline |
Set microsecond delay for the SCK signal. Impacts SPI speed.
◆ 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.
The documentation for this class was generated from the following file: