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

Base class for external SPI drivers. More...

#include <SdSpiBaseClass.h>

Public Member Functions

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

Detailed Description

Base class for external SPI drivers.

Member Function Documentation

◆ activate()

virtual void SdSpiBaseClass::activate ( )
inlinevirtual

Activate SPI hardware.

◆ begin()

virtual void SdSpiBaseClass::begin ( SdSpiConfig  config)
pure virtual

Initialize the SPI bus.

Parameters
[in]configSPI configuration.

◆ deactivate()

virtual void SdSpiBaseClass::deactivate ( )
inlinevirtual

Deactivate SPI hardware.

◆ receive() [1/2]

virtual uint8_t SdSpiBaseClass::receive ( )
pure virtual

Receive a byte.

Returns
The byte.

◆ receive() [2/2]

virtual uint8_t SdSpiBaseClass::receive ( uint8_t *  buf,
size_t  count 
)
pure virtual

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]

virtual void SdSpiBaseClass::send ( const uint8_t *  buf,
size_t  count 
)
pure virtual

Send multiple bytes.

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

◆ send() [2/2]

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

Send a byte.

Parameters
[in]dataByte to send

◆ setSckSpeed()

virtual void SdSpiBaseClass::setSckSpeed ( uint32_t  maxSck)
inlinevirtual

Save high speed SPISettings after SD initialization.

Parameters
[in]maxSckMaximum SCK frequency.

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