SdFat

Public Member Functions | List of all members
SdSpiBaseClass Class Referenceabstract

Base class for external SPI drivers. More...

`#include <SdSpiBaseClass.h>`

## Public Member Functions
virtual void | activate ()
virtual void | begin (SdSpiConfig config)=0
virtual void | deactivate ()
virtual uint8_t | receive ()=0
virtual uint8_t | receive (uint8_t *buf, size_t count)=0
virtual void | send (const uint8_t *buf, size_t count)=0
virtual void | send (uint8_t data)=0
virtual void | setSckSpeed (uint32_t maxSck)

## Detailed Description

Base class for external SPI drivers.

## Member Function Documentation

## ◆ activate()

virtual void SdSpiBaseClass::activate | ( |  | ) |
| inline virtual

Activate SPI hardware.

## ◆ begin()

virtual void SdSpiBaseClass::begin | ( | SdSpiConfig | config | ) |
| pure virtual

Initialize the SPI bus.

Parameters

  [in] | config | SPI configuration.

## ◆ deactivate()

virtual void SdSpiBaseClass::deactivate | ( |  | ) |
| inline virtual

Deactivate SPI hardware.

## ◆ receive() [1/2]

virtual uint8_t SdSpiBaseClass::receive | ( |  | ) |
| pure virtual

Receive a byte.

Returns
  The byte.

## ◆ receive() [2/2]

virtual uint8_t SdSpiBaseClass::receive | ( | uint8_t * | buf,
|  | size_t | count
| ) |  |
| pure virtual

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]

virtual void SdSpiBaseClass::send | ( | const uint8_t * | buf,
|  | size_t | count
| ) |  |
| pure virtual

Send multiple bytes.

Parameters

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

## ◆ send() [2/2]

virtual void SdSpiBaseClass::send | ( | uint8_t | data | ) |
| pure virtual

Send a byte.

Parameters

  [in] | data | Byte to send

## ◆ setSckSpeed()

virtual void SdSpiBaseClass::setSckSpeed | ( | uint32_t | maxSck | ) |
| inline virtual

Save high speed SPISettings after SD initialization.

Parameters

  [in] | maxSck | Maximum SCK frequency.

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

- Arduino/libraries/SdFat/src/SpiDriver/SdSpiBaseClass.h