modules/dosfs/dosfs.h File Reference

#include <stdint.h>

Data Structures

struct  _tagDIRENT
struct  _tagPTINFO
struct  _tagMBR
struct  _tagBPB
struct  _tagEBPB
struct  _tagEBPB32
struct  _tagLBR
struct  _tagVOLINFO
struct  _tagDIRINFO
struct  _tagFILEINFO

Defines

#define MAX_PATH   64
#define DIR_SEPARATOR   '/'
#define DFS_OK   0
#define DFS_EOF   1
#define DFS_WRITEPROT   2
#define DFS_NOTFOUND   3
#define DFS_PATHLEN   4
#define DFS_ALLOCNEW   5
#define DFS_ERRMISC   0xffffffff
#define DFS_READ   1
#define DFS_WRITE   2
#define SECTOR_SIZE   512
#define FAT12   0
#define FAT16   1
#define FAT32   2
#define ATTR_READ_ONLY   0x01
#define ATTR_HIDDEN   0x02
#define ATTR_SYSTEM   0x04
#define ATTR_VOLUME_ID   0x08
#define ATTR_DIRECTORY   0x10
#define ATTR_ARCHIVE   0x20
#define ATTR_LONG_NAME   (ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID)
#define DFS_DI_BLANKENT   0x01

Typedefs

typedef _tagDIRENT DIRENT
typedef _tagDIRENTPDIRENT
typedef _tagPTINFO PTINFO
typedef _tagPTINFOPPTINFO
typedef _tagMBR MBR
typedef _tagMBRPMBR
typedef _tagBPB BPB
typedef _tagBPBPBPB
typedef _tagEBPB EBPB
typedef _tagEBPBPEBPB
typedef _tagEBPB32 EBPB32
typedef _tagEBPB32PEBPB32
typedef _tagLBR LBR
typedef _tagLBRPLBR
typedef _tagVOLINFO VOLINFO
typedef _tagVOLINFOPVOLINFO
typedef _tagDIRINFO DIRINFO
typedef _tagDIRINFOPDIRINFO
typedef _tagFILEINFO FILEINFO
typedef _tagFILEINFOPFILEINFO

Functions

uint32_t DFS_ReadSector (uint8_t unit, uint8_t *buffer, uint32_t sector, uint32_t count)
uint32_t DFS_WriteSector (uint8_t unit, uint8_t *buffer, uint32_t sector, uint32_t count)
uint32_t DFS_GetPtnStart (uint8_t unit, uint8_t *scratchsector, uint8_t pnum, uint8_t *pactive, uint8_t *pptype, uint32_t *psize)
uint32_t DFS_GetVolInfo (uint8_t unit, uint8_t *scratchsector, uint32_t startsector, PVOLINFO volinfo)
uint32_t DFS_OpenDir (PVOLINFO volinfo, uint8_t *dirname, PDIRINFO dirinfo)
uint32_t DFS_GetNext (PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent)
uint32_t DFS_OpenFile (PVOLINFO volinfo, uint8_t *path, uint8_t mode, uint8_t *scratch, PFILEINFO fileinfo)
uint32_t DFS_ReadFile (PFILEINFO fileinfo, uint8_t *scratch, uint8_t *buffer, uint32_t *successcount, uint32_t len)
uint32_t DFS_WriteFile (PFILEINFO fileinfo, uint8_t *scratch, uint8_t *buffer, uint32_t *successcount, uint32_t len)
void DFS_Seek (PFILEINFO fileinfo, uint32_t offset, uint8_t *scratch)
uint32_t DFS_UnlinkFile (PVOLINFO volinfo, uint8_t *path, uint8_t *scratch)
uint32_t DFS_Close (PFILEINFO fileinfo)
void DFS_CachingEnabledSet (uint8_t enable)
char * DFS_DirToCanonical (char *dest, char *src)

Define Documentation

#define ATTR_ARCHIVE   0x20

#define ATTR_DIRECTORY   0x10

#define ATTR_HIDDEN   0x02

#define ATTR_LONG_NAME   (ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID)

#define ATTR_READ_ONLY   0x01

#define ATTR_SYSTEM   0x04

#define ATTR_VOLUME_ID   0x08

#define DFS_ALLOCNEW   5

#define DFS_DI_BLANKENT   0x01

#define DFS_EOF   1

#define DFS_ERRMISC   0xffffffff

#define DFS_NOTFOUND   3

#define DFS_OK   0

#define DFS_PATHLEN   4

#define DFS_READ   1

#define DFS_WRITE   2

#define DFS_WRITEPROT   2

#define DIR_SEPARATOR   '/'

#define FAT12   0

#define FAT16   1

#define FAT32   2

#define MAX_PATH   64

#define SECTOR_SIZE   512


Typedef Documentation

typedef struct _tagBPB BPB

typedef struct _tagDIRENT DIRENT

typedef struct _tagDIRINFO DIRINFO

typedef struct _tagEBPB EBPB

typedef struct _tagEBPB32 EBPB32

typedef struct _tagFILEINFO FILEINFO

typedef struct _tagLBR LBR

typedef struct _tagMBR MBR

typedef struct _tagBPB * PBPB

typedef struct _tagDIRENT * PDIRENT

typedef struct _tagDIRINFO * PDIRINFO

typedef struct _tagEBPB * PEBPB

typedef struct _tagEBPB32 * PEBPB32

typedef struct _tagFILEINFO * PFILEINFO

typedef struct _tagLBR * PLBR

typedef struct _tagMBR * PMBR

typedef struct _tagPTINFO * PPTINFO

typedef struct _tagPTINFO PTINFO

typedef struct _tagVOLINFO * PVOLINFO

typedef struct _tagVOLINFO VOLINFO


Function Documentation

void DFS_CachingEnabledSet ( uint8_t  enable  ) 

uint32_t DFS_Close ( PFILEINFO  fileinfo  ) 

char* DFS_DirToCanonical ( char *  dest,
char *  src 
)

uint32_t DFS_GetNext ( PVOLINFO  volinfo,
PDIRINFO  dirinfo,
PDIRENT  dirent 
)

uint32_t DFS_GetPtnStart ( uint8_t  unit,
uint8_t *  scratchsector,
uint8_t  pnum,
uint8_t *  pactive,
uint8_t *  pptype,
uint32_t *  psize 
)

uint32_t DFS_GetVolInfo ( uint8_t  unit,
uint8_t *  scratchsector,
uint32_t  startsector,
PVOLINFO  volinfo 
)

uint32_t DFS_OpenDir ( PVOLINFO  volinfo,
uint8_t *  dirname,
PDIRINFO  dirinfo 
)

uint32_t DFS_OpenFile ( PVOLINFO  volinfo,
uint8_t *  path,
uint8_t  mode,
uint8_t *  scratch,
PFILEINFO  fileinfo 
)

uint32_t DFS_ReadFile ( PFILEINFO  fileinfo,
uint8_t *  scratch,
uint8_t *  buffer,
uint32_t *  successcount,
uint32_t  len 
)

uint32_t DFS_ReadSector ( uint8_t  unit,
uint8_t *  buffer,
uint32_t  sector,
uint32_t  count 
)

void DFS_Seek ( PFILEINFO  fileinfo,
uint32_t  offset,
uint8_t *  scratch 
)

uint32_t DFS_UnlinkFile ( PVOLINFO  volinfo,
uint8_t *  path,
uint8_t *  scratch 
)

uint32_t DFS_WriteFile ( PFILEINFO  fileinfo,
uint8_t *  scratch,
uint8_t *  buffer,
uint32_t *  successcount,
uint32_t  len 
)

uint32_t DFS_WriteSector ( uint8_t  unit,
uint8_t *  buffer,
uint32_t  sector,
uint32_t  count 
)


Generated on Tue May 1 19:42:14 2012 for MIOS32 by  doxygen 1.4.7