Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FATFileSystem.h
00001 /* mbed Microcontroller Library - FATFileSystem 00002 Copyright (c) 2008, sford */ 00003 00004 //Modified by Thomas Hamilton, Copyright 2010 00005 00006 #ifndef MBED_FATFILESYSTEM_H 00007 #define MBED_FATFILESYSTEM_H 00008 00009 #include "stdint.h" 00010 #include "ff.h" 00011 #include "mbed.h" 00012 #include "FileSystemLike.h" 00013 #include "FATFileHandle.h" 00014 #include "FATDirHandle.h" 00015 #include <stdio.h> 00016 00017 class FATFileSystem : public FileSystemLike 00018 { 00019 private: 00020 FATFS FileSystemObject; 00021 unsigned char Drive; 00022 00023 public: 00024 static FATFileSystem* DriveArray[_DRIVES]; 00025 00026 FATFileSystem(const char* SystemName); 00027 virtual ~FATFileSystem(); 00028 00029 int format(unsigned int allocationunit); 00030 00031 virtual FileHandle* open(const char* filename, int flags); 00032 virtual int remove(const char* filename); 00033 virtual int rename(const char* oldname, const char* newname); 00034 virtual DirHandle* opendir(const char* name); 00035 virtual int mkdir(const char* name, mode_t mode); 00036 00037 virtual int disk_initialize() { return 0x00; } 00038 virtual int disk_status() { return 0x00; } 00039 virtual int disk_read(unsigned char* buff, 00040 unsigned long sector, unsigned char count) = 0; 00041 virtual int disk_write(const unsigned char* buff, 00042 unsigned long sector, unsigned char count) = 0; 00043 virtual int disk_sync() { return 0x00; } 00044 virtual unsigned long disk_sector_count() = 0; 00045 virtual unsigned short disk_sector_size() { return 512; } 00046 virtual unsigned long disk_block_size() { return 1; } 00047 }; 00048 00049 #endif
Generated on Wed Jul 13 2022 08:04:37 by
1.7.2