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

Base class for external SPI drivers. More...

#include <SdSpiBaseClass.h>

Inheritance diagram for SdSpiBaseClass:
Inheritance graph
[legend]

Public Member Functions

virtual void activate ()
 
virtual void begin ()=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.

Reimplemented in MySpiClass.

◆ begin()

virtual void SdSpiBaseClass::begin ( )
pure virtual

Initialize the SPI bus.

Implemented in MySpiClass.

◆ deactivate()

virtual void SdSpiBaseClass::deactivate ( )
inlinevirtual

Deactivate SPI hardware.

Reimplemented in MySpiClass.

◆ receive() [1/2]

virtual uint8_t SdSpiBaseClass::receive ( )
pure virtual

Receive a byte.

Returns
The byte.

Implemented in MySpiClass.

◆ 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.

Implemented in MySpiClass.

◆ 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.

Implemented in MySpiClass.

◆ send() [2/2]

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

Send a byte.

Parameters
[in]dataByte to send

Implemented in MySpiClass.

◆ setSckSpeed()

virtual void SdSpiBaseClass::setSckSpeed ( uint32_t  maxSck)
inlinevirtual

Save high speed SPISettings after SD initialization.

Parameters
[in]maxSckMaximum SCK frequency.

Reimplemented in MySpiClass.


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