arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ZephyrSDClass Class Reference

Arduino SD API for Zephyr. More...

#include <ZephyrSD.h>

Public Member Functions

 ZephyrSDClass ()=default
 
 ~ZephyrSDClass ()
 
bool begin (const char *diskName, fs_mount_t mountInfo)
 
bool begin (const char *diskName="SD", const char *mountPoint="/SD")
 
void end ()
 
bool exists (const char *path) const
 
size_t fileSize (const char *path) const
 
bool isDirectory (const char *path)
 
bool isMounted () const
 
bool mkdir (const char *path)
 
fs_mount_tmountInfo ()
 
const charmountPoint ()
 
ZephyrFile open (const char *path, const char *mode="r", bool create=false)
 
ZephyrFile open (const char *path, fs_mode_t mode)
 
bool remove (const char *path)
 
bool rename (const char *from, const char *to)
 
bool rmdir (const char *path)
 

Protected Member Functions

bool logErr (int ret, const char *op, const char *a, const char *b)
 
bool logErr (int ret, const char *op, const char *path)
 
bool mountSD ()
 
fs_mode_t parseMode (const char *mode, bool create)
 
void unmountSD ()
 

Protected Attributes

std::string disk_name
 
bool mounted = false
 
fs_mount_t mp
 

Detailed Description

Arduino SD API for Zephyr.

Note
Supported by all Zephyr platforms with FS support: CONFIG_FILE_SYSTEM=y
Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ ZephyrSDClass()

ZephyrSDClass ( )
default

◆ ~ZephyrSDClass()

~ZephyrSDClass ( )
inline

Member Function Documentation

◆ begin() [1/2]

bool begin ( const char diskName,
fs_mount_t  mountInfo 
)
inline

◆ begin() [2/2]

bool begin ( const char diskName = "SD",
const char mountPoint = "/SD" 
)
inline

◆ end()

void end ( )
inline

◆ exists()

bool exists ( const char path) const
inline

◆ fileSize()

size_t fileSize ( const char path) const
inline

◆ isDirectory()

bool isDirectory ( const char path)
inline

◆ isMounted()

bool isMounted ( ) const
inline

◆ logErr() [1/2]

bool logErr ( int  ret,
const char op,
const char a,
const char b 
)
inlineprotected

◆ logErr() [2/2]

bool logErr ( int  ret,
const char op,
const char path 
)
inlineprotected

◆ mkdir()

bool mkdir ( const char path)
inline

◆ mountInfo()

fs_mount_t & mountInfo ( )
inline

◆ mountPoint()

const char * mountPoint ( )
inline

◆ mountSD()

bool mountSD ( )
inlineprotected

◆ open() [1/2]

ZephyrFile open ( const char path,
const char mode = "r",
bool  create = false 
)
inline

◆ open() [2/2]

ZephyrFile open ( const char path,
fs_mode_t  mode 
)
inline

◆ parseMode()

fs_mode_t parseMode ( const char mode,
bool  create 
)
inlineprotected

◆ remove()

bool remove ( const char path)
inline

◆ rename()

bool rename ( const char from,
const char to 
)
inline

◆ rmdir()

bool rmdir ( const char path)
inline

◆ unmountSD()

void unmountSD ( )
inlineprotected

Member Data Documentation

◆ disk_name

std::string disk_name
protected

◆ mounted

bool mounted = false
protected

◆ mp

fs_mount_t mp
protected
Initial value:
= {
.type = FS_FATFS,
.mnt_point = "/SD",
.fs_data = nullptr
}
size_t writeData(Print *p_out, T *data, int samples, int maxSamples=512)
Definition AudioTypes.h:508

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