SdFat
Public Member Functions | List of all members
SdBase< Vol > Class Template Reference

base SD file system template class. More...

#include <SdFat.h>

Inheritance diagram for SdBase< Vol >:
Inheritance graph
[legend]
Collaboration diagram for SdBase< Vol >:
Collaboration graph
[legend]

Public Member Functions

bool begin (uint8_t csPin=SS)
 
bool begin (SdSpiConfig spiConfig)
 
bool begin (SdioConfig sdioConfig)
 
SdCardcard ()
 
bool cardBegin (SdSpiConfig spiConfig)
 
bool cardBegin (SdioConfig sdioConfig)
 
void errorHalt (print_t *pr)
 
void errorHalt (print_t *pr, const char *msg)
 
void errorHalt (print_t *pr, const __FlashStringHelper *msg)
 
void errorPrint (print_t *pr)
 
void errorPrint (print_t *pr, char const *msg)
 
void errorPrint (Print *pr, const __FlashStringHelper *msg)
 
void initErrorHalt (print_t *pr)
 
void initErrorHalt (print_t *pr, const char *msg)
 
void initErrorHalt (Print *pr, const __FlashStringHelper *msg)
 
void initErrorPrint (Print *pr)
 
void printFatType (print_t *pr)
 
void printSdError (print_t *pr)
 
uint8_t sdErrorCode ()
 
uint8_t sdErrorData ()
 
Vol * vol ()
 
bool volumeBegin ()
 

Detailed Description

template<class Vol>
class SdBase< Vol >

base SD file system template class.

Member Function Documentation

◆ begin() [1/3]

template<class Vol>
bool SdBase< Vol >::begin ( uint8_t  csPin = SS)
inline

Initialize SD card and file system.

Parameters
[in]csPinSD card chip select pin.
Returns
true for success or false for failure.

◆ begin() [2/3]

template<class Vol>
bool SdBase< Vol >::begin ( SdSpiConfig  spiConfig)
inline

Initialize SD card and file system for SPI mode.

Parameters
[in]spiConfigSPI configuration.
Returns
true for success or false for failure.

◆ begin() [3/3]

template<class Vol>
bool SdBase< Vol >::begin ( SdioConfig  sdioConfig)
inline

Initialize SD card and file system for SDIO mode.

Parameters
[in]sdioConfigSDIO configuration.
Returns
true for success or false for failure.

◆ card()

template<class Vol>
SdCard* SdBase< Vol >::card ( )
inline
Returns
Pointer to SD card object.

◆ cardBegin() [1/2]

template<class Vol>
bool SdBase< Vol >::cardBegin ( SdSpiConfig  spiConfig)
inline

Initialize SD card in SPI mode.

Parameters
[in]spiConfigSPI configuration.
Returns
true for success or false for failure.

◆ cardBegin() [2/2]

template<class Vol>
bool SdBase< Vol >::cardBegin ( SdioConfig  sdioConfig)
inline

Initialize SD card in SDIO mode.

Parameters
[in]sdioConfigSDIO configuration.
Returns
true for success or false for failure.

◆ errorHalt() [1/3]

template<class Vol>
void SdBase< Vol >::errorHalt ( print_t pr)
inline

Print error info and halt.

Parameters
[in]prPrint destination.

◆ errorHalt() [2/3]

template<class Vol>
void SdBase< Vol >::errorHalt ( print_t pr,
const char *  msg 
)
inline

Print error info and halt.

Parameters
[in]prPrint destination.
[in]msgMessage to print.

◆ errorHalt() [3/3]

template<class Vol>
void SdBase< Vol >::errorHalt ( print_t pr,
const __FlashStringHelper *  msg 
)
inline

Print msg and halt.

Parameters
[in]prPrint destination.
[in]msgMessage to print.

◆ errorPrint() [1/3]

template<class Vol>
void SdBase< Vol >::errorPrint ( print_t pr)
inline

Print SD errorCode and errorData.

Parameters
[in]prPrint destination.

◆ errorPrint() [2/3]

template<class Vol>
void SdBase< Vol >::errorPrint ( print_t pr,
char const *  msg 
)
inline

Print msg, any SD error code.

Parameters
[in]prPrint destination.
[in]msgMessage to print.

◆ errorPrint() [3/3]

template<class Vol>
void SdBase< Vol >::errorPrint ( Print *  pr,
const __FlashStringHelper *  msg 
)
inline

Print msg, any SD error code.

Parameters
[in]prPrint destination.
[in]msgMessage to print.

◆ initErrorHalt() [1/3]

template<class Vol>
void SdBase< Vol >::initErrorHalt ( print_t pr)
inline

Print error info and halt.

Parameters
[in]prPrint destination.

◆ initErrorHalt() [2/3]

template<class Vol>
void SdBase< Vol >::initErrorHalt ( print_t pr,
const char *  msg 
)
inline

Print error info and halt.

Parameters
[in]prPrint destination.
[in]msgMessage to print.

◆ initErrorHalt() [3/3]

template<class Vol>
void SdBase< Vol >::initErrorHalt ( Print *  pr,
const __FlashStringHelper *  msg 
)
inline

Print error info and halt.

Parameters
[in]prPrint destination.
[in]msgMessage to print.

◆ initErrorPrint()

template<class Vol>
void SdBase< Vol >::initErrorPrint ( Print *  pr)
inline

Print error details after begin() fails.

Parameters
[in]prPrint destination.

◆ printFatType()

template<class Vol>
void SdBase< Vol >::printFatType ( print_t pr)
inline

Print volume FAT/exFAT type.

Parameters
[in]prPrint destination.

◆ printSdError()

template<class Vol>
void SdBase< Vol >::printSdError ( print_t pr)
inline

Print error info and return.

Parameters
[in]prPrint destination.

◆ sdErrorCode()

template<class Vol>
uint8_t SdBase< Vol >::sdErrorCode ( )
inline
Returns
SD card error code.

◆ sdErrorData()

template<class Vol>
uint8_t SdBase< Vol >::sdErrorData ( )
inline
Returns
SD card error data.

◆ vol()

template<class Vol>
Vol* SdBase< Vol >::vol ( )
inline
Returns
pointer to base volume

◆ volumeBegin()

template<class Vol>
bool SdBase< Vol >::volumeBegin ( )
inline

Initialize file system after call to cardBegin.

Returns
true for success or false for failure.

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