#include <string.h>
#include <stddef.h>
#include <ctype.h>
#include <sys/heap.h>
#include <sys/event.h>
#include <sys/thread.h>
#include <sys/device.h>
#include <dev/ide.h>
#include <fs/fat.h>
#include <fs/typedefs.h>
Go to the source code of this file.
#define FAT_ERROR_EOF -2 |
Definition at line 97 of file fat.c.
Referenced by FATFileRead().
#define FAT_ERROR_IDE -3 |
Definition at line 98 of file fat.c.
Referenced by FATFileRead().
#define NUTDEV_ERROR -1 |
Definition at line 104 of file fat.c.
Referenced by FATFileRead(), and FATFileSize().
typedef struct _FAT32FileDataTime FAT32_FILEDATETIME |
typedef struct _FAT32FileDataTime * PFAT32_FILEDATETIME |
typedef struct _FAT32DirectoryEntry FAT32_DIRECTORY_ENTRY |
typedef struct _FAT32DirectoryEntryLong FAT32_DIRECTORY_ENTRY_LONG |
typedef struct _FAT32FileSystemInformation FAT32_FSINFO |
typedef struct _FAT32PartitionEntry FAT32_PARTITION_ENTRY |
typedef struct _FAT32PartionTable FAT32_PARTITION_TABLE |
typedef union _bpboffset36 BPBOFFSET36 |
typedef struct _FAT32BootRecord FAT32_BOOT_RECORD |
typedef struct _FAT32BootRecord * PFAT32_BOOT_RECORD |
typedef struct _fat_entry_table16 FAT_ENTRY_TABLE16 |
typedef struct _fat_entry_table32 FAT_ENTRY_TABLE32 |
typedef union _fat_dir_table FAT_DIR_TABLE |
typedef struct _drive_info DRIVE_INFO |
typedef struct _atapi_pvd ATAPI_PVD |
typedef struct _ATAPIDirectoryRecord ATAPI2_DIRECTORY_RECORD |
void FATLock | ( | void | ) |
Definition at line 433 of file fat.c.
References NutEventWait().
Referenced by FATFileRead(), and FATFileSize().
void FATFree | ( | void | ) |
Definition at line 441 of file fat.c.
References NutEventPost().
Referenced by FATFileRead(), and FATFileSize().
void FATSemaInit | ( | void | ) |
Definition at line 449 of file fat.c.
References NutEventPost().
long FATFileSize | ( | NUTFILE * | hNUTFile | ) |
Definition at line 1553 of file fat.c.
References _fhandle::dwFileSize, FATFree(), FATLock(), _NUTFILE::nf_fcb, and NUTDEV_ERROR.
int FATFileRead | ( | NUTFILE * | hNUTFile, |
void * | pData, | ||
int | nSize | ||
) |
Definition at line 1632 of file fat.c.
References _drive_info::bDevice, _fhandle::dwClusterPointer, _drive_info::dwClusterSize, _fhandle::dwFilePointer, _fhandle::dwFileSize, _fhandle::dwReadCluster, FAT_ERROR_EOF, FAT_ERROR_IDE, FATFree(), FATLock(), IDE_OK, IDEReadSectors(), memcpy(), _fhandle::nEOF, _NUTFILE::nf_fcb, _fhandle::nLastError, NUTDEV_ERROR, _fhandle::pDrive, TRUE, and _drive_info::wSectorSize.
{ 0, {'F', 'A', 'T', '_', 'C', 0, 0, 0, 0} , IFTYP_STREAM, 2, 0, 0, 0, FATInit, 0, FATFileRead, FATFileWrite, FATFileWriteP, FATFileOpen, FATFileClose, FATFileSize }