J&W / Mbed 2 deprecated Rejestrator

Dependencies:   mbed Rejestrator

Dependents:   Rejestrator

Embed: (wiki syntax)

« Back to documentation index

USBHostMSD Class Reference

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 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.

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 )

Constructor.

Parameters:
rootdirmount name

Definition at line 32 of file USBHostMSD.cpp.


Member Function Documentation

bool connect (  )

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 111 of file FATFileSystem.cpp.

int mkdir ( const char *  name,
mode_t  mode 
) [virtual, inherited]

Creates a directory path.

Definition at line 129 of file FATFileSystem.cpp.

FileHandle * open ( const char *  name,
int  flags 
) [virtual, inherited]

Opens a file on the filesystem.

Definition at line 68 of file FATFileSystem.cpp.

DirHandle * opendir ( const char *  name ) [virtual, inherited]

Opens a directory on the filesystem.

Definition at line 120 of file FATFileSystem.cpp.

int remove ( const char *  filename ) [virtual, inherited]

Removes a file path.

Definition at line 102 of file FATFileSystem.cpp.