SdFat

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

Class for external soft SPI. More...

`#include <SdSpiSoftDriver.h>`

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

## Public Member Functions
void | activate ()
void | begin ()
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

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

Class for external soft SPI.

## Member Function Documentation

## ◆ activate()

void SdSpiSoftDriver::activate | ( |  | ) |
| inline inherited

Activate SPI hardware.

## ◆ begin() [1/2]

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>

void SoftSpiDriver< MisoPin, MosiPin, SckPin >::begin | ( |  | ) |
| inline virtual

Initialize the SPI bus.

Implements SdSpiSoftDriver.

## ◆ begin() [2/2]

void SdSpiSoftDriver::begin | ( | SdSpiConfig | spiConfig | ) |
| inline inherited

Initialize the SPI bus.

Parameters

  [in] | spiConfig | SD card configuration.

## ◆ deactivate()

void SdSpiSoftDriver::deactivate | ( |  | ) |
| inline inherited

Deactivate SPI hardware.

## ◆ end()

void SdSpiSoftDriver::end | ( |  | ) |
| inline inherited

deactivate SPI driver.

## ◆ receive() [1/2]

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>

uint8_t SoftSpiDriver< MisoPin, MosiPin, SckPin >::receive | ( |  | ) |
| inline virtual

Receive a byte.

Returns
  The byte.

Implements SdSpiSoftDriver.

## ◆ receive() [2/2]

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

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 SdSpiSoftDriver::send | ( | const uint8_t * | buf,
|  | size_t | count
| ) |  |
| inline inherited

Send multiple bytes.

Parameters

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

## ◆ send() [2/2]

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>

void SoftSpiDriver< MisoPin, MosiPin, SckPin >::send | ( | uint8_t | data | ) |
| inline virtual

Send a byte.

Parameters

  [in] | data | Byte to send

Implements SdSpiSoftDriver.

## ◆ setSckSpeed()

void SdSpiSoftDriver::setSckSpeed | ( | uint32_t | maxSck | ) |
| inline inherited

Save high speed SPISettings after SD initialization.

Parameters

  [in] | maxSck | Maximum SCK frequency.

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

- ArduinoSdFat/libraries/SdFat/src/SpiDriver/SdSpiSoftDriver.h