#include <SPIBase.h>

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

Public Member Functions

 SPIBase ()
 
virtual ~SPIBase ()
 
virtual void begin ()=0
 begin(): Initializes the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high. More...
 
virtual void end ()=0
 end(): Disables the SPI bus (leaving pin modes unchanged). More...
 
virtual void beginTransaction (SPISettings mySettings)=0
 beginTransaction(): Initializes the SPI bus using the defined SPISettings. More...
 
virtual void endTransaction ()=0
 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 unsigned char transfer (unsigned char val)=0
 transfer(), transfer16() More...
 
virtual unsigned short transfer16 (unsigned short val)=0
 
virtual void transfer (uint8_t *buffer, size_t size)=0
 

Public Attributes

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

Constructor & Destructor Documentation

◆ SPIBase()

SPIBase::SPIBase ( )
inline

◆ ~SPIBase()

virtual SPIBase::~SPIBase ( )
inlinevirtual

Member Function Documentation

◆ begin()

virtual void SPIBase::begin ( )
pure virtual

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

Implemented in SPIClass, and SPISoft.

◆ beginTransaction()

virtual void SPIBase::beginTransaction ( SPISettings  mySettings)
pure virtual

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

Implemented in SPIClass, and SPISoft.

◆ end()

virtual void SPIBase::end ( )
pure virtual

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

Implemented in SPIClass, and SPISoft.

◆ endTransaction()

virtual void SPIBase::endTransaction ( )
pure virtual

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.

Implemented in SPIClass, and SPISoft.

◆ transfer() [1/2]

virtual unsigned char SPIBase::transfer ( unsigned char  val)
pure virtual

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)

Implemented in SPIClass, and SPISoft.

◆ transfer() [2/2]

virtual void SPIBase::transfer ( uint8_t *  buffer,
size_t  size 
)
pure virtual

Implemented in SPIClass, and SPISoft.

◆ transfer16()

virtual unsigned short SPIBase::transfer16 ( unsigned short  val)
pure virtual

Implemented in SPIClass, and SPISoft.

Member Data Documentation

◆ SPIDefaultSettings

SPISettings SPIBase::SPIDefaultSettings

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: