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

Virtual SPI class for access to SD and SDHC flash memory cards. More...

#include <SdSpi.h>

Inheritance diagram for SdSpiBase:
Inheritance graph
[legend]

Public Member Functions

virtual void begin (uint8_t chipSelectPin)=0
 
virtual void beginTransaction (uint8_t divisor)
 
virtual void endTransaction ()
 
virtual uint8_t receive ()=0
 
virtual uint8_t receive (uint8_t *buf, size_t n)=0
 
virtual void send (uint8_t data)=0
 
virtual void send (const uint8_t *buf, size_t n)=0
 

Detailed Description

Virtual SPI class for access to SD and SDHC flash memory cards.

Member Function Documentation

virtual void SdSpiBase::begin ( uint8_t  chipSelectPin)
pure virtual

Initialize the SPI bus.

Parameters
[in]chipSelectPinSD card chip select pin.

Implemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBase::beginTransaction ( uint8_t  divisor)
virtual

Set SPI options for access to SD/SDHC cards.

Parameters
[in]divisorSCK clock divider relative to the system clock.

Reimplemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBase::endTransaction ( )
virtual

End SPI transaction.

Reimplemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.

virtual uint8_t SdSpiBase::receive ( )
pure virtual

Receive a byte.

Returns
The byte.

Implemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.

virtual uint8_t SdSpiBase::receive ( uint8_t *  buf,
size_t  n 
)
pure virtual

Receive multiple bytes.

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

Implemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.

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

Send a byte.

Parameters
[in]dataByte to send

Implemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBase::send ( const uint8_t *  buf,
size_t  n 
)
pure virtual

Send multiple bytes.

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

Implemented in SdSpiSoft< MisoPin, MosiPin, SckPin >.


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