# SdFat: SdSpiBaseClass Class Reference

SdSpiBaseClass Class Referenceabstract

Base class for external SPI drivers. More...

`#include <SdSpiBaseClass.h>`

Inheritance diagram for SdSpiBaseClass:
[legend]

## Public Member Functions

virtual void | activate ()
virtual void | begin ()=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 | ( |  | ) |

inlinevirtual

Activate SPI hardware.

Reimplemented in MySpiClass.

## begin()

virtual void SdSpiBaseClass::begin | ( |  | ) |

pure virtual

Initialize the SPI bus.

Implemented in MySpiClass.

## deactivate()

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

inlinevirtual

Deactivate SPI hardware.

Reimplemented in MySpiClass.

## receive() [1/2]

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

pure virtual

Receive a byte.

Returns
  The byte.

Implemented in MySpiClass.

## 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.

Implemented in MySpiClass.

## 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.

Implemented in MySpiClass.

## send() [2/2]

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

pure virtual

Send a byte.

Parameters

  [in] | data | Byte to send

Implemented in MySpiClass.

## setSckSpeed()

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

inlinevirtual

Save high speed SPISettings after SD initialization.

Parameters

  [in] | maxSck | Maximum SCK frequency.

Reimplemented in MySpiClass.

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

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