The SD class provides functions for accessing the SD card and manipulating its files and directories. Also, this class also provides the USB Mass storage function. More...
#include <SDHCI.h>
Public Member Functions | |
boolean | begin (uint8_t dummy=0) |
Initialize the SD library. More... | |
int | beginUsbMsc () |
Start USB Mass Storage Class. | |
int | endUsbMsc () |
Stop USB Mass Storage Class. | |
int | format (uint8_t fattype=32) |
Format the SD card. 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] |
The SD class provides functions for accessing the SD card and manipulating its files and directories. Also, this class also provides the USB Mass storage function.
boolean SDClass::begin | ( | uint8_t | dummy = 0 | ) |
Initialize the SD library.
This will check that the SD card is inserted and mounted or not. This needs to be called to set up the connection to the SD card before other methods are used.
[in] | dummy | dummy argument to keep compatibility with Arduino SD library |
int SDClass::format | ( | uint8_t | fattype = 32 | ) |
Format the SD card.
This will format the unformatted SD card to FAT file system.
[in] | fattype | FAT type: 12 or 16 or 32 (default 32) |