#include <FAT16.hh>
|
static bool | begin (SD *sd, uint8_t partion) |
|
static bool | begin (SD *sd) |
|
static void | ls (IOStream &outs, uint8_t flags=0) |
|
static bool | rm (const char *fileName) |
|
|
static uint8_t | DIR_IS_LONG_NAME (const dir_t *dir) |
|
static uint8_t | DIR_IS_FILE (const dir_t *dir) |
|
static uint8_t | DIR_IS_SUBDIR (const dir_t *dir) |
|
static uint8_t | DIR_IS_FILE_OR_SUBDIR (const dir_t *dir) |
|
static bool | make83Name (const char *str, uint8_t *name) |
|
static uint8_t | blockOfCluster (uint32_t position) |
|
static uint16_t | cacheDataOffset (uint32_t position) |
|
static dir_t * | cacheDirEntry (uint16_t index, uint8_t action=0) |
|
static uint8_t | cacheRawBlock (uint32_t blockNumber, uint8_t action=0) |
|
static uint8_t | cacheFlush (void) |
|
static void | cacheSetDirty (void) |
|
static uint32_t | dataBlockLba (fat_t cluster, uint8_t blockOfCluster) |
|
static bool | fatGet (fat_t cluster, fat_t *value) |
|
static bool | fatPut (fat_t cluster, fat_t value) |
|
static bool | read (dir_t *dir, uint16_t *index, uint8_t skip=DIR_ATT_SKIP) |
|
static void | printDirName (IOStream &outs, const dir_t &dir, uint8_t width) |
|
Definition at line 41 of file FAT16.hh.
The directory list function output selectors.
Enumerator |
---|
LS_DATE |
|
LS_SIZE |
|
Definition at line 713 of file FAT16.hh.
bool FAT16::begin |
( |
SD * |
sd, |
|
|
uint8_t |
partion |
|
) |
| |
|
static |
Initialize a FAT16 volume.
- Parameters
-
[in] | dev | SD device where the volume is located. |
[in] | part | partition to be used. Legal values for part are 1-4 to use the corresponding partition on a device formatted with a MBR, Master Boot Record, or zero if the device is formatted as a super floppy with the FAT boot sector in block zero. |
- Returns
- The value one, true, is returned for success and the value zero, false, is returned for failure. reasons for failure include not finding a valid FAT16 file system in the specified partition, a call to begin() after a volume has been successful initialized or an I/O error.
Definition at line 68 of file FAT16.cpp.
bool FAT16::begin |
( |
SD * |
sd | ) |
|
|
static |
Initialize a FAT16 volume. First try partition 1 then try super floppy format.
- Parameters
-
[in] | dev | Sd device where the volume is located. |
- Returns
- The value one, true, is returned for success and the value zero, false, is returned for failure. reasons for failure include not finding a valid FAT16 file system, a call to begin() after a volume has been successful initialized or an I/O error.
Definition at line 115 of file FAT16.cpp.
static uint8_t FAT16::blockOfCluster |
( |
uint32_t |
position | ) |
|
|
inlinestaticprotected |
static uint16_t FAT16::cacheDataOffset |
( |
uint32_t |
position | ) |
|
|
inlinestaticprotected |
FAT16::dir_t * FAT16::cacheDirEntry |
( |
uint16_t |
index, |
|
|
uint8_t |
action = 0 |
|
) |
| |
|
staticprotected |
uint8_t FAT16::cacheFlush |
( |
void |
| ) |
|
|
staticprotected |
uint8_t FAT16::cacheRawBlock |
( |
uint32_t |
blockNumber, |
|
|
uint8_t |
action = 0 |
|
) |
| |
|
staticprotected |
static void FAT16::cacheSetDirty |
( |
void |
| ) |
|
|
inlinestaticprotected |
static uint32_t FAT16::dataBlockLba |
( |
fat_t |
cluster, |
|
|
uint8_t |
blockOfCluster |
|
) |
| |
|
inlinestaticprotected |
static uint8_t FAT16::DIR_IS_FILE |
( |
const dir_t * |
dir | ) |
|
|
inlinestaticprotected |
Directory entry is for a file
Definition at line 441 of file FAT16.hh.
static uint8_t FAT16::DIR_IS_FILE_OR_SUBDIR |
( |
const dir_t * |
dir | ) |
|
|
inlinestaticprotected |
Directory entry is for a file or subdirectory
Definition at line 457 of file FAT16.hh.
static uint8_t FAT16::DIR_IS_LONG_NAME |
( |
const dir_t * |
dir | ) |
|
|
inlinestaticprotected |
Directory entry is part of a long name
Definition at line 433 of file FAT16.hh.
static uint8_t FAT16::DIR_IS_SUBDIR |
( |
const dir_t * |
dir | ) |
|
|
inlinestaticprotected |
Directory entry is for a subdirectory
Definition at line 449 of file FAT16.hh.
bool FAT16::fatGet |
( |
fat_t |
cluster, |
|
|
fat_t * |
value |
|
) |
| |
|
staticprotected |
void FAT16::ls |
( |
IOStream & |
outs, |
|
|
uint8_t |
flags = 0 |
|
) |
| |
|
static |
List directory contents to given iostream with selected information.
- Parameters
-
[in] | outs | output stream. |
[in] | flags | The inclusive OR of LS_DATE (file modification date) and LS_SIZE (file size). |
Definition at line 506 of file FAT16.cpp.
bool FAT16::make83Name |
( |
const char * |
str, |
|
|
uint8_t * |
name |
|
) |
| |
|
staticprotected |
void FAT16::printDirName |
( |
IOStream & |
outs, |
|
|
const dir_t & |
dir, |
|
|
uint8_t |
width |
|
) |
| |
|
staticprotected |
static bool FAT16::rm |
( |
const char * |
fileName | ) |
|
|
inlinestatic |
Remove a file. The directory entry and all data for the file are deleted.
- Parameters
-
[in] | fileName | name of the file to be removed. |
- Note
- this function should not be used to delete the 8.3 version of a file that has a long name. For example if a file has the long name "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
- Returns
- The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include the file is read only, fileName is not found or an I/O error occurred.
Definition at line 767 of file FAT16.hh.
Output stream operator for FAT date value
Definition at line 638 of file FAT16.cpp.
Output stream operator for FAT time value
Definition at line 651 of file FAT16.cpp.
uint8_t FAT16::blocksPerCluster |
|
staticprotected |
uint8_t const FAT16::BOOTSIG0 = 0X55 |
|
staticprotected |
Value for byte 510 of boot block or MBR
Definition at line 44 of file FAT16.hh.
uint8_t const FAT16::BOOTSIG1 = 0XAA |
|
staticprotected |
Value for byte 511 of boot block or MBR
Definition at line 47 of file FAT16.hh.
uint8_t const FAT16::CACHE_FOR_READ = 0 |
|
staticprotected |
uint8_t const FAT16::CACHE_FOR_WRITE = 1 |
|
staticprotected |
uint32_t FAT16::cacheBlockNumber = 0XFFFFFFFF |
|
staticprotected |
uint8_t FAT16::cacheDirty = 0 |
|
staticprotected |
uint32_t FAT16::cacheMirrorBlock = 0 |
|
staticprotected |
uint32_t FAT16::dataStartBlock |
|
staticprotected |
void(* FAT16::dateTime)(uint16_t *date, uint16_t *time) = NULL |
|
staticprotected |
const uint16_t FAT16::DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1 |
|
staticprotected |
Default date for file timestamps is 1 Jan 2000
Definition at line 551 of file FAT16.hh.
const uint16_t FAT16::DEFAULT_TIME = (1 << 11) |
|
staticprotected |
Default time for file timestamp is 1 am
Definition at line 554 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_ARCHIVE = 0X20 |
|
staticprotected |
Old DOS archive bit for backup support
Definition at line 419 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_DEFINED_BITS = 0X3F |
|
staticprotected |
defined attribute bits
Definition at line 425 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_DIRECTORY = 0X10 |
|
staticprotected |
Entry is for a directory
Definition at line 417 of file FAT16.hh.
Mask for file/subdirectory tests
Definition at line 427 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_HIDDEN = 0X02 |
|
staticprotected |
File should hidden in directory listings
Definition at line 411 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_LONG_NAME = 0X0F |
|
staticprotected |
Test value for long name entry
Definition at line 421 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_LONG_NAME_MASK = 0X3F |
|
staticprotected |
Test mask for long name entry
Definition at line 423 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_READ_ONLY = 0X01 |
|
staticprotected |
file is read-only
Definition at line 409 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_SYSTEM = 0X04 |
|
staticprotected |
Entry is for a system file
Definition at line 413 of file FAT16.hh.
uint8_t const FAT16::DIR_ATT_VOLUME_ID = 0X08 |
|
staticprotected |
Directory entry contains the volume label
Definition at line 415 of file FAT16.hh.
uint8_t const FAT16::DIR_NAME_0XE5 = 0X05 |
|
staticprotected |
Type name for directoryEntry escape for name[0] = 0XE5
Definition at line 402 of file FAT16.hh.
uint8_t const FAT16::DIR_NAME_DELETED = 0XE5 |
|
staticprotected |
name[0] value for entry that is free after being "deleted"
Definition at line 404 of file FAT16.hh.
uint8_t const FAT16::DIR_NAME_FREE = 0X00 |
|
staticprotected |
name[0] value for entry that is free and no allocated entries follow
Definition at line 406 of file FAT16.hh.
uint32_t const FAT16::ENTRY32_MASK = 0X0FFFFFFF |
|
staticprotected |
Mask a for FAT32 entry. Entries are 28 bits.
Definition at line 332 of file FAT16.hh.
uint16_t const FAT16::EOC16 = 0XFFFF |
|
staticprotected |
FAT16 end of chain value used by Microsoft.
Definition at line 320 of file FAT16.hh.
uint16_t const FAT16::EOC16_MIN = 0XFFF8 |
|
staticprotected |
Minimum value for FAT16 EOC. Use to test for EOC.
Definition at line 323 of file FAT16.hh.
uint32_t const FAT16::EOC32 = 0X0FFFFFFF |
|
staticprotected |
FAT32 end of chain value used by Microsoft.
Definition at line 326 of file FAT16.hh.
uint32_t const FAT16::EOC32_MIN = 0X0FFFFFF8 |
|
staticprotected |
Minimum value for FAT32 EOC. Use to test for EOC.
Definition at line 329 of file FAT16.hh.
uint8_t const FAT16::F_FILE_DIR_DIRTY = 0X80 |
|
staticprotected |
uint32_t FAT16::fatStartBlock |
|
staticprotected |
uint16_t FAT16::rootDirEntryCount |
|
staticprotected |
uint32_t FAT16::rootDirStartBlock |
|
staticprotected |
bool FAT16::volumeInitialized = 0 |
|
staticprotected |
The documentation for this class was generated from the following files: