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 (SdCsPin_t csPin, uint32_t maxSck)
 
bool begin (SdCsPin_t csPin=SS)
 
bool begin (SdioConfig sdioConfig)
 
bool begin (SdSpiConfig spiConfig)
 
SdCardcard ()
 
bool cardBegin (SdioConfig sdioConfig)
 
bool cardBegin (SdSpiConfig spiConfig)
 
void errorHalt ()
 
void errorHalt (const __FlashStringHelper *msg)
 
void errorHalt (const char *msg)
 
void errorHalt (print_t *pr)
 
void errorHalt (print_t *pr, const __FlashStringHelper *msg)
 
void errorHalt (print_t *pr, const char *msg)
 
void errorPrint (const __FlashStringHelper *msg)
 
void errorPrint (const char *msg)
 
void errorPrint (Print *pr, const __FlashStringHelper *msg)
 
void errorPrint (print_t *pr)
 
void errorPrint (print_t *pr, char const *msg)
 
void initErrorHalt ()
 
void initErrorHalt (const __FlashStringHelper *msg)
 
void initErrorHalt (const char *msg)
 
void initErrorHalt (Print *pr, const __FlashStringHelper *msg)
 
void initErrorHalt (print_t *pr)
 
void initErrorHalt (print_t *pr, const char *msg)
 
void initErrorPrint ()
 
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/4]

template<class Vol>
bool SdBase< Vol >::begin ( SdCsPin_t  csPin,
uint32_t  maxSck 
)
inline

Initialize SD card and file system.

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

◆ begin() [2/4]

template<class Vol>
bool SdBase< Vol >::begin ( SdCsPin_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() [3/4]

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.

◆ begin() [4/4]

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.

◆ 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 ( SdioConfig  sdioConfig)
inline

Initialize SD card in SDIO mode.

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

◆ cardBegin() [2/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.

◆ errorHalt() [1/6]

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

Print error info to Serial and halt.

◆ errorHalt() [2/6]

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

Print msg to Serial and halt.

Parameters
[in]msgMessage to print.

◆ errorHalt() [3/6]

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

Print error info and halt.

Parameters
[in]msgMessage to print.

◆ errorHalt() [4/6]

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

Print error info and halt.

Parameters
[in]prPrint destination.

◆ errorHalt() [5/6]

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.

◆ errorHalt() [6/6]

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.

◆ errorPrint() [1/5]

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

Print msg, any SD error code.

Parameters
[in]msgMessage to print.

◆ errorPrint() [2/5]

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

Print msg, any SD error code.

Parameters
[in]msgMessage to print.

◆ errorPrint() [3/5]

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.

◆ errorPrint() [4/5]

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

Print SD errorCode and errorData.

Parameters
[in]prPrint destination.

◆ errorPrint() [5/5]

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.

◆ initErrorHalt() [1/6]

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

Print error info and halt.

◆ initErrorHalt() [2/6]

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

Print error info and halt.

Parameters
[in]msgMessage to print.

◆ initErrorHalt() [3/6]

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

Print error info and halt.

Parameters
[in]msgMessage to print.

◆ initErrorHalt() [4/6]

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.

◆ initErrorHalt() [5/6]

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

Print error info and halt.

Parameters
[in]prPrint destination.

◆ initErrorHalt() [6/6]

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.

◆ initErrorPrint() [1/2]

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

Print error details after begin() fails.

◆ initErrorPrint() [2/2]

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: