SdFat
Public Member Functions | List of all members
MySpiClass Class Reference

Sample external SPI class. More...

#include <SdSpiBaseClass.h>

Inheritance diagram for MySpiClass:
Inheritance graph
[legend]
Collaboration diagram for MySpiClass:
Collaboration graph
[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]bufBuffer to receive the data.
[in]countNumber 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]bufBuffer for data to be sent.
[in]countNumber of bytes to send.

Implements SdSpiBaseClass.

◆ send() [2/2]

void MySpiClass::send ( uint8_t  data)
inlinevirtual

Send a byte.

Parameters
[in]dataByte to send

Implements SdSpiBaseClass.

◆ setSckSpeed()

void MySpiClass::setSckSpeed ( uint32_t  maxSck)
inlinevirtual

Save high speed SPISettings after SD initialization.

Parameters
[in]maxSckMaximum SCK frequency.

Reimplemented from SdSpiBaseClass.


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