# SdFat: MySpiClass Class Reference

MySpiClass Class Reference

Sample external SPI class. More...

`#include <SdSpiBaseClass.h>`

Inheritance diagram for MySpiClass:
[legend]
Collaboration diagram for MySpiClass:
[legend]

## Public Member Functions

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

Sample external SPI class.

## Member Function Documentation

## activate()

void MySpiClass::activate | ( |  | ) |

inlinevirtual

Activate SPI hardware.

Reimplemented from SdSpiBaseClass.

## begin()

void MySpiClass::begin | ( |  | ) |

inlinevirtual

Initialize the SPI bus.

Implements SdSpiBaseClass.

## deactivate()

void MySpiClass::deactivate | ( |  | ) |

inlinevirtual

Deactivate SPI hardware.

Reimplemented from SdSpiBaseClass.

## receive() [1/2]

uint8_t MySpiClass::receive | ( |  | ) |

inlinevirtual

Receive a byte.

Returns
  The byte.

Implements SdSpiBaseClass.

## receive() [2/2]

uint8_t MySpiClass::receive | ( | uint8_t * | buf,
|  | size_t | count
| ) |  |

inlinevirtual

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.

Implements SdSpiBaseClass.

## send() [1/2]

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

inlinevirtual

Send multiple bytes.

Parameters

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

Implements SdSpiBaseClass.

## send() [2/2]

void MySpiClass::send | ( | uint8_t | data | ) |

inlinevirtual

Send a byte.

Parameters

  [in] | data | Byte to send

Implements SdSpiBaseClass.

## setSckSpeed()

void MySpiClass::setSckSpeed | ( | uint32_t | maxSck | ) |

inlinevirtual

Save high speed SPISettings after SD initialization.

Parameters

  [in] | maxSck | Maximum SCK frequency.

Reimplemented from SdSpiBaseClass.

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

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