SdFat
Public Member Functions | List of all members
SoftSpiDriver< MisoPin, MosiPin, SckPin > Class Template Reference

Class for external soft SPI. More...

#include <SdSpiSoftDriver.h>

Inheritance diagram for SoftSpiDriver< MisoPin, MosiPin, SckPin >:
Inheritance graph
[legend]
Collaboration diagram for SoftSpiDriver< MisoPin, MosiPin, SckPin >:
Collaboration graph
[legend]

Public Member Functions

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

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
class SoftSpiDriver< MisoPin, MosiPin, SckPin >

Class for external soft SPI.

Member Function Documentation

◆ activate()

void SdSpiSoftDriver::activate ( )
inlineinherited

Activate SPI hardware.

◆ begin() [1/2]

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SoftSpiDriver< MisoPin, MosiPin, SckPin >::begin ( )
inlinevirtual

Initialize the SPI bus.

Implements SdSpiSoftDriver.

◆ begin() [2/2]

void SdSpiSoftDriver::begin ( SdSpiConfig  spiConfig)
inlineinherited

Initialize the SPI bus.

Parameters
[in]spiConfigSD card configuration.

◆ deactivate()

void SdSpiSoftDriver::deactivate ( )
inlineinherited

Deactivate SPI hardware.

◆ receive() [1/2]

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
uint8_t SoftSpiDriver< MisoPin, MosiPin, SckPin >::receive ( )
inlinevirtual

Receive a byte.

Returns
The byte.

Implements SdSpiSoftDriver.

◆ receive() [2/2]

uint8_t SdSpiSoftDriver::receive ( uint8_t *  buf,
size_t  count 
)
inlineinherited

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.

◆ send() [1/2]

void SdSpiSoftDriver::send ( const uint8_t *  buf,
size_t  count 
)
inlineinherited

Send multiple bytes.

Parameters
[in]bufBuffer for data to be sent.
[in]countNumber of bytes to send.

◆ send() [2/2]

template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
void SoftSpiDriver< MisoPin, MosiPin, SckPin >::send ( uint8_t  data)
inlinevirtual

Send a byte.

Parameters
[in]dataByte to send

Implements SdSpiSoftDriver.

◆ setSckSpeed()

void SdSpiSoftDriver::setSckSpeed ( uint32_t  maxSck)
inlineinherited

Save high speed SPISettings after SD initialization.

Parameters
[in]maxSckMaximum SCK frequency.

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