SdFat
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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>

Public Member Functions

virtual void begin ()=0
 
virtual void init (uint8_t divisor)
 
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
 
virtual bool useSpiTransactions ()=0
 

Detailed Description

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

Member Function Documentation

virtual void SdSpiBase::begin ( )
pure virtual

Initialize the SPI bus

virtual void SdSpiBase::init ( uint8_t  divisor)
virtual

Set SPI options for access to SD/SDHC cards.

Parameters
[in]divisorSCK clock divider relative to the system clock.
virtual uint8_t SdSpiBase::receive ( )
pure virtual

Receive a byte.

Returns
The byte.
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.
virtual void SdSpiBase::send ( uint8_t  data)
pure virtual

Send a byte.

Parameters
[in]dataByte to send
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.
virtual bool SdSpiBase::useSpiTransactions ( )
pure virtual
Returns
true if hardware SPI else false

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