Soldered SD Card Arduino Library 1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
Loading...
Searching...
No Matches
FsStructs.h File Reference

Go to the source code of this file.

Classes

struct  mbrPartition
 
struct  masterBootRecordSector
 
struct  partitionBootSector
 
struct  DirGeneric_t
 
struct  fspos_t
 
struct  biosParameterBlockFat16
 
struct  biosParameterBlockFat32
 
struct  partitionBootSectorFat
 
struct  FsInfoSector
 
struct  DirFat_t
 
struct  DirLfn_t
 
struct  biosParameterBlockExFat
 
struct  ExFatBootSector
 
struct  DirBitmap_t
 
struct  DirUpcase_t
 
struct  DirLabel_t
 
struct  DirFile_t
 
struct  DirStream_t
 
struct  DirName_t
 

Typedefs

typedef struct mbrPartition MbrPart_t
 
typedef struct masterBootRecordSector MbrSector_t
 
typedef struct partitionBootSector pbs_t
 
typedef struct biosParameterBlockFat16 BpbFat16_t
 
typedef struct biosParameterBlockFat32 BpbFat32_t
 
typedef struct partitionBootSectorFat PbsFat_t
 
typedef struct FsInfoSector FsInfo_t
 
typedef struct biosParameterBlockExFat BpbExFat_t
 
typedef struct ExFatBootSector ExFatPbs_t
 

Functions

void lbaToMbrChs (uint8_t *chs, uint32_t capacityMB, uint32_t lba)
 
uint16_t getLe16 (const uint8_t *src)
 
uint32_t getLe32 (const uint8_t *src)
 
uint64_t getLe64 (const uint8_t *src)
 
void setLe16 (uint8_t *dst, uint16_t src)
 
void setLe32 (uint8_t *dst, uint32_t src)
 
void setLe64 (uint8_t *dst, uint64_t src)
 
static bool isFileDir (const DirFat_t *dir)
 
static bool isFileOrSubdir (const DirFat_t *dir)
 
static uint8_t isLongName (const DirFat_t *dir)
 
static bool isSubdir (const DirFat_t *dir)
 
uint32_t exFatChecksum (uint32_t sum, uint8_t data)
 

Variables

const uint16_t MBR_SIGNATURE = 0xAA55
 
const uint16_t PBR_SIGNATURE = 0xAA55
 
const uint8_t EXTENDED_BOOT_SIGNATURE = 0X29
 
const uint32_t FSINFO_LEAD_SIGNATURE = 0X41615252
 
const uint32_t FSINFO_STRUCT_SIGNATURE = 0x61417272
 
const uint32_t FSINFO_TRAIL_SIGNATURE = 0xAA550000
 
const uint8_t FAT_NAME_DELETED = 0XE5
 
const uint8_t FAT_NAME_FREE = 0X00
 
const uint8_t FAT_ATTRIB_READ_ONLY = 0x01
 
const uint8_t FAT_ATTRIB_HIDDEN = 0x02
 
const uint8_t FAT_ATTRIB_SYSTEM = 0x04
 
const uint8_t FAT_ATTRIB_LABEL = 0x08
 
const uint8_t FAT_ATTRIB_DIRECTORY = 0x10
 
const uint8_t FAT_ATTRIB_ARCHIVE = 0x20
 
const uint8_t FAT_ATTRIB_LONG_NAME = 0X0F
 
const uint8_t FAT_CASE_LC_BASE = 0X08
 
const uint8_t FAT_CASE_LC_EXT = 0X10
 
const uint8_t FAT_ORDER_LAST_LONG_ENTRY = 0X40
 
const uint32_t EXFAT_EOC = 0XFFFFFFFF
 
const uint8_t EXFAT_TYPE_BITMAP = 0X81
 
const uint8_t EXFAT_TYPE_UPCASE = 0X82
 
const uint8_t EXFAT_TYPE_LABEL = 0X83
 
const uint8_t EXFAT_TYPE_FILE = 0X85
 
const uint8_t EXFAT_ATTRIB_READ_ONLY = 0x01
 
const uint8_t EXFAT_ATTRIB_HIDDEN = 0x02
 
const uint8_t EXFAT_ATTRIB_SYSTEM = 0x04
 
const uint8_t EXFAT_ATTRIB_RESERVED = 0x08
 
const uint8_t EXFAT_ATTRIB_DIRECTORY = 0x10
 
const uint8_t EXFAT_ATTRIB_ARCHIVE = 0x20
 
const uint8_t EXFAT_TYPE_STREAM = 0XC0
 
const uint8_t EXFAT_FLAG_ALWAYS1 = 0x01
 
const uint8_t EXFAT_FLAG_CONTIGUOUS = 0x02
 
const uint8_t EXFAT_TYPE_NAME = 0XC1
 
const uint8_t EXFAT_MAX_NAME_LENGTH = 255
 

Typedef Documentation

◆ BpbExFat_t

◆ BpbFat16_t

◆ BpbFat32_t

◆ ExFatPbs_t

typedef struct ExFatBootSector ExFatPbs_t

◆ FsInfo_t

typedef struct FsInfoSector FsInfo_t

◆ MbrPart_t

typedef struct mbrPartition MbrPart_t

◆ MbrSector_t

◆ pbs_t

typedef struct partitionBootSector pbs_t

◆ PbsFat_t

Function Documentation

◆ exFatChecksum()

uint32_t exFatChecksum ( uint32_t  sum,
uint8_t  data 
)
inline

◆ getLe16()

uint16_t getLe16 ( const uint8_t *  src)
inline

◆ getLe32()

uint32_t getLe32 ( const uint8_t *  src)
inline

◆ getLe64()

uint64_t getLe64 ( const uint8_t *  src)
inline

◆ isFileDir()

static bool isFileDir ( const DirFat_t dir)
inlinestatic

◆ isFileOrSubdir()

static bool isFileOrSubdir ( const DirFat_t dir)
inlinestatic

◆ isLongName()

static uint8_t isLongName ( const DirFat_t dir)
inlinestatic

◆ isSubdir()

static bool isSubdir ( const DirFat_t dir)
inlinestatic

◆ lbaToMbrChs()

void lbaToMbrChs ( uint8_t *  chs,
uint32_t  capacityMB,
uint32_t  lba 
)

Copyright (c) 2011-2020 Bill Greiman This file is part of the SdFat library for SD memory cards.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

◆ setLe16()

void setLe16 ( uint8_t *  dst,
uint16_t  src 
)
inline

◆ setLe32()

void setLe32 ( uint8_t *  dst,
uint32_t  src 
)
inline

◆ setLe64()

void setLe64 ( uint8_t *  dst,
uint64_t  src 
)
inline

Variable Documentation

◆ EXFAT_ATTRIB_ARCHIVE

const uint8_t EXFAT_ATTRIB_ARCHIVE = 0x20

◆ EXFAT_ATTRIB_DIRECTORY

const uint8_t EXFAT_ATTRIB_DIRECTORY = 0x10

◆ EXFAT_ATTRIB_HIDDEN

const uint8_t EXFAT_ATTRIB_HIDDEN = 0x02

◆ EXFAT_ATTRIB_READ_ONLY

const uint8_t EXFAT_ATTRIB_READ_ONLY = 0x01

◆ EXFAT_ATTRIB_RESERVED

const uint8_t EXFAT_ATTRIB_RESERVED = 0x08

◆ EXFAT_ATTRIB_SYSTEM

const uint8_t EXFAT_ATTRIB_SYSTEM = 0x04

◆ EXFAT_EOC

const uint32_t EXFAT_EOC = 0XFFFFFFFF

◆ EXFAT_FLAG_ALWAYS1

const uint8_t EXFAT_FLAG_ALWAYS1 = 0x01

◆ EXFAT_FLAG_CONTIGUOUS

const uint8_t EXFAT_FLAG_CONTIGUOUS = 0x02

◆ EXFAT_MAX_NAME_LENGTH

const uint8_t EXFAT_MAX_NAME_LENGTH = 255

◆ EXFAT_TYPE_BITMAP

const uint8_t EXFAT_TYPE_BITMAP = 0X81

◆ EXFAT_TYPE_FILE

const uint8_t EXFAT_TYPE_FILE = 0X85

◆ EXFAT_TYPE_LABEL

const uint8_t EXFAT_TYPE_LABEL = 0X83

◆ EXFAT_TYPE_NAME

const uint8_t EXFAT_TYPE_NAME = 0XC1

◆ EXFAT_TYPE_STREAM

const uint8_t EXFAT_TYPE_STREAM = 0XC0

◆ EXFAT_TYPE_UPCASE

const uint8_t EXFAT_TYPE_UPCASE = 0X82

◆ EXTENDED_BOOT_SIGNATURE

const uint8_t EXTENDED_BOOT_SIGNATURE = 0X29

◆ FAT_ATTRIB_ARCHIVE

const uint8_t FAT_ATTRIB_ARCHIVE = 0x20

◆ FAT_ATTRIB_DIRECTORY

const uint8_t FAT_ATTRIB_DIRECTORY = 0x10

◆ FAT_ATTRIB_HIDDEN

const uint8_t FAT_ATTRIB_HIDDEN = 0x02

◆ FAT_ATTRIB_LABEL

const uint8_t FAT_ATTRIB_LABEL = 0x08

◆ FAT_ATTRIB_LONG_NAME

const uint8_t FAT_ATTRIB_LONG_NAME = 0X0F

◆ FAT_ATTRIB_READ_ONLY

const uint8_t FAT_ATTRIB_READ_ONLY = 0x01

◆ FAT_ATTRIB_SYSTEM

const uint8_t FAT_ATTRIB_SYSTEM = 0x04

◆ FAT_CASE_LC_BASE

const uint8_t FAT_CASE_LC_BASE = 0X08

Filename base-name is all lower case

◆ FAT_CASE_LC_EXT

const uint8_t FAT_CASE_LC_EXT = 0X10

Filename extension is all lower case.

◆ FAT_NAME_DELETED

const uint8_t FAT_NAME_DELETED = 0XE5

name[0] value for entry that is free after being "deleted"

◆ FAT_NAME_FREE

const uint8_t FAT_NAME_FREE = 0X00

name[0] value for entry that is free and no allocated entries follow

◆ FAT_ORDER_LAST_LONG_ENTRY

const uint8_t FAT_ORDER_LAST_LONG_ENTRY = 0X40

Order mask that indicates the entry is the last long dir entry in a set of long dir entries. All valid sets of long dir entries must begin with an entry having this mask.

◆ FSINFO_LEAD_SIGNATURE

const uint32_t FSINFO_LEAD_SIGNATURE = 0X41615252

◆ FSINFO_STRUCT_SIGNATURE

const uint32_t FSINFO_STRUCT_SIGNATURE = 0x61417272

◆ FSINFO_TRAIL_SIGNATURE

const uint32_t FSINFO_TRAIL_SIGNATURE = 0xAA550000

◆ MBR_SIGNATURE

const uint16_t MBR_SIGNATURE = 0xAA55

◆ PBR_SIGNATURE

const uint16_t PBR_SIGNATURE = 0xAA55