SdFat
Public Member Functions | List of all members
SdSpiSoftDriver Class Referenceabstract

Base class for external soft SPI. More...

#include <SdSpiSoftDriver.h>

Inheritance diagram for SdSpiSoftDriver:
Inheritance graph
[legend]

Public Member Functions

void activate ()
 
virtual void begin ()=0
 
void begin (SdSpiConfig spiConfig)
 
void deactivate ()
 
virtual uint8_t receive ()=0
 
uint8_t receive (uint8_t *buf, size_t count)
 
void send (const uint8_t *buf, size_t count)
 
virtual void send (uint8_t data)=0
 
void setSckSpeed (uint32_t maxSck)
 

Detailed Description

Base class for external soft SPI.

Member Function Documentation

◆ activate()

void SdSpiSoftDriver::activate ( )
inline

Activate SPI hardware.

◆ begin() [1/2]

virtual void SdSpiSoftDriver::begin ( )
pure virtual

Initialize the SPI bus.

Implemented in SoftSpiDriver< MisoPin, MosiPin, SckPin >.

◆ begin() [2/2]

void SdSpiSoftDriver::begin ( SdSpiConfig  spiConfig)
inline

Initialize the SPI bus.

Parameters
[in]spiConfigSD card configuration.

◆ deactivate()

void SdSpiSoftDriver::deactivate ( )
inline

Deactivate SPI hardware.

◆ receive() [1/2]

virtual uint8_t SdSpiSoftDriver::receive ( )
pure virtual

Receive a byte.

Returns
The byte.

Implemented in SoftSpiDriver< MisoPin, MosiPin, SckPin >.

◆ receive() [2/2]

uint8_t SdSpiSoftDriver::receive ( uint8_t *  buf,
size_t  count 
)
inline

Receive multiple bytes.

Parameters
[out]bufBuffer to receive the data.
[in]countNumber of bytes to receive.
Returns
Zero for no error or nonzero error code.

◆ send() [1/2]

void SdSpiSoftDriver::send ( const uint8_t *  buf,
size_t  count 
)
inline

Send multiple bytes.

Parameters
[in]bufBuffer for data to be sent.
[in]countNumber of bytes to send.

◆ send() [2/2]

virtual void SdSpiSoftDriver::send ( uint8_t  data)
pure virtual

Send a byte.

Parameters
[in]dataByte to send

Implemented in SoftSpiDriver< MisoPin, MosiPin, SckPin >.

◆ setSckSpeed()

void SdSpiSoftDriver::setSckSpeed ( uint32_t  maxSck)
inline

Save high speed SPISettings after SD initialization.

Parameters
[in]maxSckMaximum SCK frequency.

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