SdFat: SdSpiArduinoDriver Class Reference

SdFat

Public Member Functions | List of all members
SdSpiArduinoDriver Class Reference

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

`#include <SdSpiArduinoDriver.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 count)
void | send (const uint8_t *buf, size_t count)
void | send (uint8_t data)
void | setSckSpeed (uint32_t maxSck)

## Detailed Description

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

## Member Function Documentation

## ◆ activate()

void SdSpiArduinoDriver::activate | ( |  | ) |
| inline

Activate SPI hardware.

## ◆ begin()

void SdSpiArduinoDriver::begin | ( | SdSpiConfig | spiConfig | ) |
| inline

Initialize the SPI bus.

Parameters

  [in] | spiConfig | SD card configuration.

## ◆ deactivate()

void SdSpiArduinoDriver::deactivate | ( |  | ) |
| inline

Deactivate SPI hardware.

## ◆ end()

void SdSpiArduinoDriver::end | ( |  | ) |

End use of SPI driver after begin() call.

## ◆ receive() [1/2]

uint8_t SdSpiArduinoDriver::receive | ( |  | ) |
| inline

Receive a byte.

Returns
  The byte.

## ◆ receive() [2/2]

uint8_t SdSpiArduinoDriver::receive | ( | uint8_t * | buf,
|  | size_t | count
| ) |  |
| inline

Receive multiple bytes.

Parameters

  [out] | buf | Buffer to receive the data.
  [in] | count | Number of bytes to receive.

Returns
  Zero for no error or nonzero error code.

## ◆ send() [1/2]

void SdSpiArduinoDriver::send | ( | const uint8_t * | buf,
|  | size_t | count
| ) |  |
| inline

Send multiple bytes.

Parameters

  [in] | buf | Buffer for data to be sent.
  [in] | count | Number of bytes to send.

## ◆ send() [2/2]

void SdSpiArduinoDriver::send | ( | uint8_t | data | ) |
| inline

Send a byte.

Parameters

  [in] | data | Byte to send

## ◆ setSckSpeed()

void SdSpiArduinoDriver::setSckSpeed | ( | uint32_t | maxSck | ) |
| inline

Save high speed SPISettings after SD initialization.

Parameters

  [in] | maxSck | Maximum SCK frequency.

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

- ArduinoSdFat/libraries/SdFat/src/SpiDriver/SdSpiArduinoDriver.h
- ArduinoSdFat/libraries/SdFat/src/SpiDriver/SdSpiAvr.h
- ArduinoSdFat/libraries/SdFat/src/SpiDriver/SdSpiLibDriver.h