SPISoft.h
Go to the documentation of this file.
54 SPISoft(uint8_t miso, uint8_t mosi, uint8_t sck, uint8_t delay = 0) : SPISoft({sck, miso, mosi}, delay)
Definition: SPIBase.h:51
uint8_t transfer(uint8_t val)
Send/receive one byte of data.
Definition: SPIBase.h:143
Definition: SPISettings.h:74
void setDelay(uint8_t delay)
Set delay factor for the SCK signal. Impacts SPI speed.
Definition: SPISoft.h:99
bool begin() override
Initialize the SPI bus by setting SCK and MOSI to outputs, pulling SCK and MOSI low.
void endTransaction() override
Stop using the SPI bus. Normally this is called after de-asserting the chip select,...
void end() override
Disable the SPI bus (leaving pin modes unchanged).
Definition: SPISoft.h:80
bool loopback(bool enable) override
For testing, tie MISO <-> MOSI internally.
Definition: SPISoft.h:104
SPISoft(uint8_t miso, uint8_t mosi, uint8_t sck, uint8_t delay=0)
Specify pins to use plus optional delay.
Definition: SPISoft.h:54
uint32_t transfer32(uint32_t val, uint8_t bits=32) override
Send/receive a word of variable size.
SPISoft(const SpiPins &pins, uint8_t delay=0)
Specify pins plus optional delay.
Definition: SPISoft.h:61
void transfer(uint8_t *buffer, size_t size) override
Send/receive a variable-length block of data.
void enable(Handler &commandHandler, HardwareSerial &serial)