Engduino  3.1.0
A fun device for learning coding
Classes | Macros | Variables
SdFat.h File Reference
#include "Sd2Card.h"
#include "FatStructs.h"
#include "Print.h"

Go to the source code of this file.

Classes

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

Macros

#define ALLOW_DEPRECATED_FUNCTIONS   1
 

Variables

uint8_t const LS_DATE = 1
 
uint8_t const LS_SIZE = 2
 
uint8_t const LS_R = 4
 
uint8_t const O_READ = 0X01
 
uint8_t const O_RDONLY = O_READ
 
uint8_t const O_WRITE = 0X02
 
uint8_t const O_WRONLY = O_WRITE
 
uint8_t const O_RDWR = (O_READ | O_WRITE)
 
uint8_t const O_ACCMODE = (O_READ | O_WRITE)
 
uint8_t const O_APPEND = 0X04
 
uint8_t const O_SYNC = 0X08
 
uint8_t const O_CREAT = 0X10
 
uint8_t const O_EXCL = 0X20
 
uint8_t const O_TRUNC = 0X40
 
uint8_t const T_ACCESS = 1
 
uint8_t const T_CREATE = 2
 
uint8_t const T_WRITE = 4
 
uint8_t const FAT_FILE_TYPE_CLOSED = 0
 
uint8_t const FAT_FILE_TYPE_NORMAL = 1
 
uint8_t const FAT_FILE_TYPE_ROOT16 = 2
 
uint8_t const FAT_FILE_TYPE_ROOT32 = 3
 
uint8_t const FAT_FILE_TYPE_SUBDIR = 4
 
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT16
 
uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1
 
uint16_t const FAT_DEFAULT_TIME = (1 << 11)
 

Detailed Description

SdFile and SdVolume classes

Macro Definition Documentation

#define ALLOW_DEPRECATED_FUNCTIONS   1

Allow use of deprecated functions if non-zero

Variable Documentation

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

uint8_t const FAT_FILE_TYPE_CLOSED = 0

This SdFile has not been opened.

uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT16

Test value for directory type

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 LS_DATE = 1

ls() flag to print modify date

uint8_t const LS_R = 4

ls() flag for recursive list of subdirectories

uint8_t const LS_SIZE = 2

ls() flag to print file size

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_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_RDONLY = O_READ

open() oflag - same as O_READ

uint8_t const O_RDWR = (O_READ | O_WRITE)

open() oflag for reading and writing

uint8_t const O_READ = 0X01

open() oflag for reading

uint8_t const O_SYNC = 0X08

synchronous writes - call sync() after each write

uint8_t const O_TRUNC = 0X40

truncate the file to zero length

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