SdFat
Public Member Functions | List of all members
SdSpiLibDriver Class Reference

SdSpiLibDriver - use standard SPI library. More...

#include <SdSpiDriver.h>

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

SdSpiLibDriver - use standard SPI library.

Member Function Documentation

void SdSpiLibDriver::activate ( )
inline

Activate SPI hardware.

void SdSpiLibDriver::begin ( uint8_t  csPin)
inline

Initialize the SPI bus.

Parameters
[in]csPinSD card chip select pin.
void SdSpiLibDriver::deactivate ( )
inline

Deactivate SPI hardware.

uint8_t SdSpiLibDriver::receive ( )
inline

Receive a byte.

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

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 SdSpiLibDriver::select ( )
inline

Set CS low.

void SdSpiLibDriver::send ( uint8_t  data)
inline

Send a byte.

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

Send multiple bytes.

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

Save SPISettings.

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

Set CS high.


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