#include <SPISoft.h>

Inheritance diagram for SPISoft:
[legend]
Collaboration diagram for SPISoft:
[legend]

Public Member Functions

 SPISoft (uint16_t miso, uint16_t mosi, uint16_t sck, uint8_t delay)
 
void begin () override
 begin(): Initializes the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high. More...
 
void end () override
 end(): Disables the SPI bus (leaving pin modes unchanged). More...
 
void beginTransaction (SPISettings mySettings) override
 beginTransaction(): Initializes the SPI bus using the defined SPISettings. More...
 
void endTransaction () override
 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...
 
void transfer (uint8_t *buffer, size_t size) override
 
unsigned char transfer (unsigned char val) override
 transfer(), transfer16() More...
 
unsigned short transfer16 (unsigned short val) override
 
void setDelay (uint8_t dly)
 Set microsecond delay for the SCK signal. Impacts SPI speed. More...
 

Public Attributes

SPISettings SPIDefaultSettings
 Default settings used by the SPI bus until reset by beginTransaction(SPISettings) More...
 

Constructor & Destructor Documentation

◆ SPISoft()

SPISoft::SPISoft ( uint16_t  miso,
uint16_t  mosi,
uint16_t  sck,
uint8_t  delay 
)
inline

Member Function Documentation

◆ begin()

void SPISoft::begin ( )
overridevirtual

begin(): Initializes the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high.

Implements SPIBase.

◆ beginTransaction()

void SPISoft::beginTransaction ( SPISettings  mySettings)
inlineoverridevirtual

beginTransaction(): Initializes the SPI bus using the defined SPISettings.

Implements SPIBase.

◆ end()

void SPISoft::end ( )
inlineoverridevirtual

end(): Disables the SPI bus (leaving pin modes unchanged).

Implements SPIBase.

◆ endTransaction()

void SPISoft::endTransaction ( )
inlineoverridevirtual

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.

Implements SPIBase.

◆ setDelay()

void SPISoft::setDelay ( uint8_t  dly)
inline

Set microsecond delay for the SCK signal. Impacts SPI speed.

◆ transfer() [1/2]

void SPISoft::transfer ( uint8_t *  buffer,
size_t  size 
)
overridevirtual

Implements SPIBase.

◆ transfer() [2/2]

unsigned char SPISoft::transfer ( unsigned char  val)
inlineoverridevirtual

transfer(), transfer16()

SPI transfer is based on a simultaneous send and receive: the received data is returned in receivedVal (or receivedVal16). In case of buffer transfers the received data is stored in the buffer in-place (the old data is replaced with the data received).

    receivedVal = SPI.transfer(val)
    receivedVal16 = SPI.transfer16(val16)
    SPI.transfer(buffer, size)

Implements SPIBase.

◆ transfer16()

unsigned short SPISoft::transfer16 ( unsigned short  val)
inlineoverridevirtual

Implements SPIBase.

Member Data Documentation

◆ SPIDefaultSettings

SPISettings SPIBase::SPIDefaultSettings
inherited

Default settings used by the SPI bus until reset by beginTransaction(SPISettings)

Note: not included in std Arduino lib


The documentation for this class was generated from the following file: