SdFs
Public Member Functions | List of all members
SdSpiAltDriver Class Reference

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

#include <SdSpiDriver.h>

Public Member Functions

void activate ()
 
void begin (SdSpiConfig spiConfig)
 
void deactivate ()
 
void end ()
 
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

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

Member Function Documentation

void SdSpiAltDriver::activate ( )

Activate SPI hardware.

void SdSpiAltDriver::begin ( SdSpiConfig  spiConfig)

Initialize the SPI bus.

Parameters
[in]spiConfigSD card configuration.
void SdSpiAltDriver::deactivate ( )

Deactivate SPI hardware.

void SdSpiAltDriver::end ( )

deactivate SPI driver.

uint8_t SdSpiAltDriver::receive ( )

Receive a byte.

Returns
The byte.
uint8_t SdSpiAltDriver::receive ( uint8_t *  buf,
size_t  n 
)

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.
void SdSpiAltDriver::select ( )
inline

Set CS low.

void SdSpiAltDriver::send ( uint8_t  data)

Send a byte.

Parameters
[in]dataByte to send
void SdSpiAltDriver::send ( const uint8_t *  buf,
size_t  n 
)

Send multiple bytes.

Parameters
[in]bufBuffer for data to be sent.
[in]nNumber of bytes to send.
void SdSpiAltDriver::setSpiSettings ( SPISettings  spiSettings)
inline

Save SPISettings.

Parameters
[in]spiSettingsSPI speed, mode, and byte order.
void SdSpiAltDriver::unselect ( )
inline

Set CS high.


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