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

ESP32 Virtual File System for SPI SD. The default mount point is "/sdcard" DRAFT implementation: not tested See https://github.com/espressif/esp-idf/tree/master/examples/storage/sd_card/sdspi. More...

#include <VFS_SDSPI.h>

Inheritance diagram for VFS_SDSPI:
VFS

Public Member Functions

 VFS_SDSPI (const char *mountPoint="/sd")
 
 VFS_SDSPI (int CS, int MOSI, int MISO, int SCK, const char *mountPoint="/sd")
 
bool begin ()
 mount the file systems
 
void end ()
 unmount the file system
 
bool exists (const char *path)
 
bool exists (const std::string &path)
 
bool mkdir (const char *path)
 
bool mkdir (const std::string &path)
 
const charmountPoint ()
 provides the actual mount point
 
VFSFile open (const char *file, FileMode mode=VFS_FILE_READ)
 
VFSFile open (const std::string &path, FileMode mode=VFS_FILE_READ)
 
bool remove (const char *path)
 
bool remove (const std::string &path)
 
bool rename (const char *pathFrom, const char *pathTo)
 
bool rename (const std::string &pathFrom, const std::string &pathTo)
 
bool rmdir (const char *path)
 
bool rmdir (const std::string &path)
 
void setAllocationUnitSize (int size)
 
void setClk (int pin)
 
void setCS (int pin)
 
void setFormatIfMountFailed (bool format)
 
void setMaxFiles (int files)
 
void setMiso (int pin)
 
void setMosi (int pin)
 
void setMountPoint (const char *mp)
 provide the mount point (root directory for the file system)
 
void setPins (int CS, int MOSI, int MISO, int SCK)
 

Protected Member Functions

const charexpand (const char *file)
 expands the file name with the mount point
 

Protected Attributes

int allocation_unit_size = 16 * 1024
 
sdmmc_card_tcard = nullptr
 
bool format_if_mount_failed = false
 
sdmmc_host_t host
 
int max_files = 5
 
int max_transfer_sz = 4000
 
const charmount_point = "/"
 
gpio_num_t pin_clk = (gpio_num_t) SCK
 
gpio_num_t pin_cs = (gpio_num_t) SS
 
gpio_num_t pin_miso = (gpio_num_t) MISO
 
gpio_num_t pin_mosi = (gpio_num_t) MOSI
 
sd_pwr_ctrl_handle_t pwr_ctrl_handle
 
Str tmp
 

Detailed Description

ESP32 Virtual File System for SPI SD. The default mount point is "/sdcard" DRAFT implementation: not tested See https://github.com/espressif/esp-idf/tree/master/examples/storage/sd_card/sdspi.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ VFS_SDSPI() [1/2]

VFS_SDSPI ( const char mountPoint = "/sd")
inline

◆ VFS_SDSPI() [2/2]

VFS_SDSPI ( int  CS,
int  MOSI,
int  MISO,
int  SCK,
const char mountPoint = "/sd" 
)
inline

Member Function Documentation

◆ begin()

bool begin ( )
inlinevirtual

mount the file systems

Reimplemented from VFS.

◆ end()

void end ( )
inlinevirtual

unmount the file system

Reimplemented from VFS.

◆ exists() [1/2]

bool exists ( const char path)
inlineinherited

◆ exists() [2/2]

bool exists ( const std::string &  path)
inlineinherited

◆ expand()

const char * expand ( const char file)
inlineprotectedinherited

expands the file name with the mount point

◆ mkdir() [1/2]

bool mkdir ( const char path)
inlineinherited

◆ mkdir() [2/2]

bool mkdir ( const std::string &  path)
inlineinherited

◆ mountPoint()

const char * mountPoint ( )
inlineinherited

provides the actual mount point

◆ open() [1/2]

VFSFile open ( const char file,
FileMode  mode = VFS_FILE_READ 
)
inlineinherited

◆ open() [2/2]

VFSFile open ( const std::string &  path,
FileMode  mode = VFS_FILE_READ 
)
inlineinherited

◆ remove() [1/2]

bool remove ( const char path)
inlineinherited

◆ remove() [2/2]

bool remove ( const std::string &  path)
inlineinherited

◆ rename() [1/2]

bool rename ( const char pathFrom,
const char pathTo 
)
inlineinherited

◆ rename() [2/2]

bool rename ( const std::string &  pathFrom,
const std::string &  pathTo 
)
inlineinherited

◆ rmdir() [1/2]

bool rmdir ( const char path)
inlineinherited

◆ rmdir() [2/2]

bool rmdir ( const std::string &  path)
inlineinherited

◆ setAllocationUnitSize()

void setAllocationUnitSize ( int  size)
inline

◆ setClk()

void setClk ( int  pin)
inline

◆ setCS()

void setCS ( int  pin)
inline

◆ setFormatIfMountFailed()

void setFormatIfMountFailed ( bool  format)
inline

◆ setMaxFiles()

void setMaxFiles ( int  files)
inline

◆ setMiso()

void setMiso ( int  pin)
inline

◆ setMosi()

void setMosi ( int  pin)
inline

◆ setMountPoint()

void setMountPoint ( const char mp)
inlinevirtual

provide the mount point (root directory for the file system)

Reimplemented from VFS.

◆ setPins()

void setPins ( int  CS,
int  MOSI,
int  MISO,
int  SCK 
)
inline

Member Data Documentation

◆ allocation_unit_size

int allocation_unit_size = 16 * 1024
protected

◆ card

sdmmc_card_t* card = nullptr
protected

◆ format_if_mount_failed

bool format_if_mount_failed = false
protected

◆ host

sdmmc_host_t host
protected

◆ max_files

int max_files = 5
protected

◆ max_transfer_sz

int max_transfer_sz = 4000
protected

◆ mount_point

const char* mount_point = "/"
protectedinherited

◆ pin_clk

gpio_num_t pin_clk = (gpio_num_t) SCK
protected

◆ pin_cs

gpio_num_t pin_cs = (gpio_num_t) SS
protected

◆ pin_miso

gpio_num_t pin_miso = (gpio_num_t) MISO
protected

◆ pin_mosi

gpio_num_t pin_mosi = (gpio_num_t) MOSI
protected

◆ pwr_ctrl_handle

sd_pwr_ctrl_handle_t pwr_ctrl_handle
protected

◆ tmp

Str tmp
protectedinherited

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