Developer World
Spresense Arduino Library v3.2.0-77d75a4
eMMCClass Class Reference

The eMMC class provides functions for accessing the eMMC and manipulating its files and directories. Also, this class also provides the USB Mass storage function. More...

#include <eMMC.h>

Inheritance diagram for eMMCClass:
Collaboration diagram for eMMCClass:

Public Member Functions

boolean begin ()
 Initialize the eMMC library. More...
 
boolean begin (uint8_t)
 Initialize the eMMC library with Power on PIN. More...
 
boolean end ()
 Finalize the eMMC library. More...
 
int beginUsbMsc ()
 Start USB Mass Storage Class.
 
int endUsbMsc ()
 Stop USB Mass Storage Class.
 
int format (uint8_t fattype=32)
 Format the eMMC device. More...
 
- Public Member Functions inherited from StorageClass
 StorageClass (const char *str)
 
File open (const char *filename, uint8_t mode=FILE_READ)
 Opens a file on the Flash. More...
 
File open (const String &filename, uint8_t mode=FILE_READ)
 Opens a file on the Flash. More...
 
boolean exists (const char *filepath)
 Tests whether a file or directory exists on the Flash. More...
 
boolean exists (const String &filepath)
 Tests whether a file or directory exists on the Flash. More...
 
boolean mkdir (const char *filepath)
 Create a directory on the Flash. More...
 
boolean mkdir (const String &filepath)
 Create a directory on the Flash. More...
 
boolean remove (const char *filepath)
 Remove a file from the Flash. More...
 
boolean remove (const String &filepath)
 Remove a file from the Flash. More...
 
boolean rmdir (const char *filepath)
 Remove a directory from the Flash. More...
 
boolean rmdir (const String &filepath)
 Remove a directory from the Flash. More...
 

Additional Inherited Members

- Protected Attributes inherited from StorageClass
char mountdir [16]
 

Detailed Description

The eMMC class provides functions for accessing the eMMC and manipulating its files and directories. Also, this class also provides the USB Mass storage function.

Member Function Documentation

◆ begin() [1/2]

boolean eMMCClass::begin ( )

Initialize the eMMC library.

This will check that the eMMC is mounted or not after being initialized it. This needs to be called to set up the connection to the eMMC before other methods are used.

Returns
true if the eMMC is mounted, false if not

◆ begin() [2/2]

boolean eMMCClass::begin ( uint8_t  )

Initialize the eMMC library with Power on PIN.

This will check that the eMMC is mounted or not after being initialized it. This needs to be called to set up the connection to the eMMC before other methods are used.

Parameters
[in]Powercontrol pin for eMMC
Returns
true if the eMMC is mounted, false if not

◆ end()

boolean eMMCClass::end ( )

Finalize the eMMC library.

This function unmount, finalize device and power off device.

Returns
true if the eMMC finalization complete, false if not

◆ format()

int eMMCClass::format ( uint8_t  fattype = 32)

Format the eMMC device.

This will format the unformatted eMMC device to FAT file system.

Parameters
[in]fattypeFAT type: 12 or 16 or 32 (default 32)
Returns
0 if the eMMC format is successful, error code if not

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