Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
USBHostMSD Class Reference
A class to communicate a USB flash disk. More...
#include <USBHostMSD.h>
Inherits IUSBEnumerator, and FATFileSystem.
Public Member Functions | |
USBHostMSD (const char *rootdir) | |
Constructor. | |
bool | connected () |
Check if a MSD device is connected. | |
bool | connect () |
Try to connect to a MSD device. | |
virtual FileHandle * | open (const char *name, int flags) |
Opens a file on the filesystem. | |
virtual int | remove (const char *filename) |
Removes a file path. | |
virtual int | rename (const char *oldname, const char *newname) |
Renames a file. | |
virtual int | format () |
Formats a logical drive, FDISK artitioning rule, 512 bytes per cluster. | |
virtual DirHandle * | opendir (const char *name) |
Opens a directory on the filesystem. | |
virtual int | mkdir (const char *name, mode_t mode) |
Creates a directory path. | |
virtual int | mount () |
Mounts the filesystem. | |
virtual int | unmount () |
Unmounts the filesystem. |
Detailed Description
A class to communicate a USB flash disk.
Definition at line 30 of file USBHostMSD.h.
Constructor & Destructor Documentation
USBHostMSD | ( | const char * | rootdir ) |
Member Function Documentation
bool connect | ( | void | ) |
Try to connect to a MSD device.
- Returns:
- true if connection was successful
Definition at line 59 of file USBHostMSD.cpp.
bool connected | ( | ) |
Check if a MSD device is connected.
- Returns:
- true if a MSD device is connected
Definition at line 54 of file USBHostMSD.cpp.
int format | ( | ) | [virtual, inherited] |
Formats a logical drive, FDISK artitioning rule, 512 bytes per cluster.
Definition at line 153 of file FATFileSystem.cpp.
int mkdir | ( | const char * | name, |
mode_t | mode | ||
) | [virtual, inherited] |
Creates a directory path.
Reimplemented from FileSystemLike.
Definition at line 178 of file FATFileSystem.cpp.
int mount | ( | ) | [virtual, inherited] |
Mounts the filesystem.
Definition at line 185 of file FATFileSystem.cpp.
FileHandle * open | ( | const char * | name, |
int | flags | ||
) | [virtual, inherited] |
Opens a file on the filesystem.
Implements FileSystemLike.
Definition at line 91 of file FATFileSystem.cpp.
DirHandle * opendir | ( | const char * | name ) | [virtual, inherited] |
Opens a directory on the filesystem.
Reimplemented from FileSystemLike.
Definition at line 165 of file FATFileSystem.cpp.
int remove | ( | const char * | filename ) | [virtual, inherited] |
Removes a file path.
Reimplemented from FileSystemLike.
Definition at line 129 of file FATFileSystem.cpp.
int rename | ( | const char * | oldname, |
const char * | newname | ||
) | [virtual, inherited] |
Renames a file.
Reimplemented from FileSystemLike.
Definition at line 141 of file FATFileSystem.cpp.
int unmount | ( | ) | [virtual, inherited] |
Unmounts the filesystem.
Definition at line 192 of file FATFileSystem.cpp.
Generated on Tue Jul 12 2022 17:35:14 by
