SdSpiBaseDriver Class Referenceabstract

SPI base driver. More...

`#include <SdSpiBaseDriver.h>`

Inheritance diagram for SdSpiBaseDriver:
[legend]

## Public Member Functions

virtual void | activate ()=0
virtual void | begin (uint8_t chipSelectPin)=0
virtual void | deactivate ()=0
virtual uint8_t | receive ()=0
virtual uint8_t | receive (uint8_t *buf, size_t n)=0
virtual void | select ()=0
virtual void | send (uint8_t data)=0
virtual void | send (const uint8_t *buf, size_t n)=0
virtual void | setSpiSettings (SPISettings spiSettings)=0
virtual void | unselect ()=0

## Detailed Description

SPI base driver.

## Member Function Documentation

virtual void SdSpiBaseDriver::activate | ( |  | ) |

pure virtual

Set SPI options for access to SD/SDHC cards.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBaseDriver::begin | ( | uint8_t | chipSelectPin | ) |

pure virtual

Initialize the SPI bus.

Parameters

  [in] | chipSelectPin | SD card chip select pin.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBaseDriver::deactivate | ( |  | ) |

pure virtual

End SPI transaction.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual uint8_t SdSpiBaseDriver::receive | ( |  | ) |

pure virtual

Receive a byte.

Returns
  The byte.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual uint8_t SdSpiBaseDriver::receive | ( | uint8_t * | buf,
|  | size_t | n
| ) |  |

pure virtual

Receive multiple bytes.

Parameters

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

Returns
  Zero for no error or nonzero error code.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBaseDriver::select | ( |  | ) |

pure virtual

Set CS low.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

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

pure virtual

Send a byte.

Parameters

  [in] | data | Byte to send

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBaseDriver::send | ( | const uint8_t * | buf,
|  | size_t | n
| ) |  |

pure virtual

Send multiple bytes.

Parameters

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

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBaseDriver::setSpiSettings | ( | SPISettings | spiSettings | ) |

pure virtual

Save SPI settings.

Parameters

  [in] | spiSettings | SPI speed, mode, and bit order.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

virtual void SdSpiBaseDriver::unselect | ( |  | ) |

pure virtual

Set CS high.

Implemented in SdSpiSoftDriver< MisoPin, MosiPin, SckPin >.

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

- Arduino/libraries/SdFat/src/SdSpiCard/SdSpiBaseDriver.h