Dependents:
SD
« Back to documentation index
SdFat.h File Reference
SdFile and SdVolume classes.
More...
Go to the source code of this file.
Data Structures
class SdFile
Access FAT16 and FAT32 files on SD and SDHC cards. More...
union cache_t
Cache for an SD data block. More...
class SdVolume
Access FAT16 and FAT32 volumes on SD and SDHC cards. More...
Functions
static uint16_t FAT_DATE (uint16_t year, uint8_t month, uint8_t day)
date field for FAT directory entry
static uint16_t FAT_YEAR (uint16_t fatDate)
year part of FAT directory date field
static uint8_t FAT_MONTH (uint16_t fatDate)
month part of FAT directory date field
static uint8_t FAT_DAY (uint16_t fatDate)
day part of FAT directory date field
static uint16_t FAT_TIME (uint8_t hour, uint8_t minute, uint8_t second)
time field for FAT directory entry
static uint8_t FAT_HOUR (uint16_t fatTime)
hour part of FAT directory time field
static uint8_t FAT_MINUTE (uint16_t fatTime)
minute part of FAT directory time field
static uint8_t FAT_SECOND (uint16_t fatTime)
second part of FAT directory time field
Variables
uint8_t const LS_DATE = 1
ls() flag to print modify date
uint8_t const LS_SIZE = 2
ls() flag to print file size
uint8_t const LS_R = 4
ls() flag for recursive list of subdirectories
uint8_t const O_READ = 0X01
open() oflag for reading
uint8_t const O_RDONLY = O_READ
open() oflag - same as O_READ
uint8_t const O_WRITE = 0X02
open() oflag for write
uint8_t const O_WRONLY = O_WRITE
open() oflag - same as O_WRITE
uint8_t const O_RDWR = (O_READ | O_WRITE )
open() oflag for reading and writing
uint8_t const O_ACCMODE = (O_READ | O_WRITE )
open() oflag mask for access modes
uint8_t const O_APPEND = 0X04
The file offset shall be set to the end of the file prior to each write.
uint8_t const O_SYNC = 0X08
synchronous writes - call sync() after each write
uint8_t const O_CREAT = 0X10
create the file if nonexistent
uint8_t const O_EXCL = 0X20
If O_CREAT and O_EXCL are set, open() shall fail if the file exists.
uint8_t const O_TRUNC = 0X40
truncate the file to zero length
uint8_t const T_ACCESS = 1
set the file's last access date
uint8_t const T_CREATE = 2
set the file's creation date and time
uint8_t const T_WRITE = 4
Set the file's write date and time.
uint8_t const FAT_FILE_TYPE_CLOSED = 0
This SdFile has not been opened.
uint8_t const FAT_FILE_TYPE_NORMAL = 1
SdFile for a file.
uint8_t const FAT_FILE_TYPE_ROOT16 = 2
SdFile for a FAT16 root directory.
uint8_t const FAT_FILE_TYPE_ROOT32 = 3
SdFile for a FAT32 root directory.
uint8_t const FAT_FILE_TYPE_SUBDIR = 4
SdFile for a subdirectory.
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT16
Test value for directory type.
uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1
Default date for file timestamps is 1 Jan 2000.
uint16_t const FAT_DEFAULT_TIME = (1 << 11)
Default time for file timestamp is 1 am.
Detailed Description
SdFile and SdVolume classes.
Definition in file SdFat.h .
Function Documentation
static uint16_t FAT_DATE
(
uint16_t
year ,
uint8_t
month ,
uint8_t
day
)
[static]
date field for FAT directory entry
Definition at line 95 of file SdFat.h .
static uint8_t FAT_DAY
(
uint16_t
fatDate )
[static]
day part of FAT directory date field
Definition at line 107 of file SdFat.h .
static uint8_t FAT_HOUR
(
uint16_t
fatTime )
[static]
hour part of FAT directory time field
Definition at line 115 of file SdFat.h .
static uint8_t FAT_MINUTE
(
uint16_t
fatTime )
[static]
minute part of FAT directory time field
Definition at line 119 of file SdFat.h .
static uint8_t FAT_MONTH
(
uint16_t
fatDate )
[static]
month part of FAT directory date field
Definition at line 103 of file SdFat.h .
static uint8_t FAT_SECOND
(
uint16_t
fatTime )
[static]
second part of FAT directory time field
Definition at line 123 of file SdFat.h .
static uint16_t FAT_TIME
(
uint8_t
hour ,
uint8_t
minute ,
uint8_t
second
)
[static]
time field for FAT directory entry
Definition at line 111 of file SdFat.h .
static uint16_t FAT_YEAR
(
uint16_t
fatDate )
[static]
year part of FAT directory date field
Definition at line 99 of file SdFat.h .
Variable Documentation
Default date for file timestamps is 1 Jan 2000.
Definition at line 127 of file SdFat.h .
Default time for file timestamp is 1 am.
Definition at line 129 of file SdFat.h .
Test value for directory type.
Definition at line 92 of file SdFat.h .
ls() flag to print modify date
Definition at line 43 of file SdFat.h .
ls() flag for recursive list of subdirectories
Definition at line 47 of file SdFat.h .
ls() flag to print file size
Definition at line 45 of file SdFat.h .
open() oflag mask for access modes
Definition at line 61 of file SdFat.h .
The file offset shall be set to the end of the file prior to each write.
Definition at line 63 of file SdFat.h .
create the file if nonexistent
Definition at line 67 of file SdFat.h .
If O_CREAT and O_EXCL are set, open() shall fail if the file exists.
Definition at line 69 of file SdFat.h .
open() oflag - same as O_READ
Definition at line 53 of file SdFat.h .
open() oflag for reading and writing
Definition at line 59 of file SdFat.h .
open() oflag for reading
Definition at line 51 of file SdFat.h .
synchronous writes - call sync() after each write
Definition at line 65 of file SdFat.h .
truncate the file to zero length
Definition at line 71 of file SdFat.h .
open() oflag for write
Definition at line 55 of file SdFat.h .
open() oflag - same as O_WRITE
Definition at line 57 of file SdFat.h .
set the file's last access date
Definition at line 75 of file SdFat.h .
set the file's creation date and time
Definition at line 77 of file SdFat.h .
Set the file's write date and time.
Definition at line 79 of file SdFat.h .