SdFat
Public Member Functions | List of all members
SdSpiSoftDriver< MisoPin, MosiPin, SckPin > Class Template Reference

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

#include <SdSpiDriver.h>

Inheritance diagram for SdSpiSoftDriver< MisoPin, MosiPin, SckPin >:
Inheritance graph
[legend]
Collaboration diagram for SdSpiSoftDriver< MisoPin, MosiPin, SckPin >:
Collaboration graph
[legend]

Public Member Functions

void activate ()
 
void begin (uint8_t csPin)
 
void deactivate ()
 
uint8_t receive ()
 
uint8_t receive (uint8_t *buf, size_t n)
 
void select ()
 
void send (uint8_t data)
 
void send (const uint8_t *buf, size_t n)
 
void setSpiSettings (SPISettings spiSettings)
 
void unselect ()
 

Detailed Description

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
class SdSpiSoftDriver< MisoPin, MosiPin, SckPin >

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

Member Function Documentation

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::activate ( )
inlinevirtual

Dummy activate SPI hardware for software SPI

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::begin ( uint8_t  csPin)
inlinevirtual

Initialize the SPI bus.

Parameters
[in]csPinSD card chip select pin.

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::deactivate ( )
inlinevirtual

Dummy deactivate SPI hardware for software SPI

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
uint8_t SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::receive ( )
inlinevirtual

Receive a byte.

Returns
The byte.

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
uint8_t SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::receive ( uint8_t *  buf,
size_t  n 
)
inlinevirtual

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.

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::select ( )
inlinevirtual

Set CS low.

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::send ( uint8_t  data)
inlinevirtual

Send a byte.

Parameters
[in]dataByte to send

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::send ( const uint8_t *  buf,
size_t  n 
)
inlinevirtual

Send multiple bytes.

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

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::setSpiSettings ( SPISettings  spiSettings)
inlinevirtual

Save SPISettings.

Parameters
[in]spiSettingsSPI speed, mode, and byte order.

Implements SdSpiBaseDriver.

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SdSpiSoftDriver< MisoPin, MosiPin, SckPin >::unselect ( )
inlinevirtual

Set CS high.

Implements SdSpiBaseDriver.


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