SD Card Interface class. Log raw data bytes to memory addresses of your choice, or format the card and use the FAT file system to write files.
Diff: FATFileSystem/Interface/FATFileSystem.h
- Revision:
- 4:9a5878d316d5
- Parent:
- 3:210eb67b260c
- Child:
- 6:ddf09d859ed7
diff -r 210eb67b260c -r 9a5878d316d5 FATFileSystem/Interface/FATFileSystem.h --- a/FATFileSystem/Interface/FATFileSystem.h Mon Aug 23 07:12:13 2010 +0000 +++ b/FATFileSystem/Interface/FATFileSystem.h Fri Aug 27 00:59:28 2010 +0000 @@ -1,46 +1,47 @@ -/* mbed Microcontroller Library - FATFileSystem - Copyright (c) 2008, sford */ - -//Modified by Thomas Hamilton, Copyright 2010 - -#ifndef MBED_FATFILESYSTEM_H -#define MBED_FATFILESYSTEM_H - -#include "ff.h" -#include "mbed.h" -#include "FileSystemLike.h" -#include "FATFileHandle.h" -#include "FATDirHandle.h" -#include <stdio.h> - -class FATFileSystem : public FileSystemLike -{ - private: - FATFS FileSystemObject; - unsigned char Drive; - - public: - static FATFileSystem* DriveArray[_DRIVES]; - - FATFileSystem(const char* SystemName); - virtual ~FATFileSystem(); - - virtual FileHandle* open(const char* filename, int flags); - virtual int remove(const char* filename); - virtual int rename(const char* oldname, const char* newname); - virtual DirHandle* opendir(const char* name); - virtual int mkdir(const char* name, mode_t mode); - - virtual unsigned char disk_initialize() { return 0x00; } - virtual unsigned char disk_status() { return 0x00; } - virtual unsigned char disk_read(unsigned char* buff, - unsigned long sector, unsigned char count) = 0; - virtual unsigned char disk_write(const unsigned char* buff, - unsigned long sector, unsigned char count) = 0; - virtual unsigned char disk_sync() { return 0x00; } - virtual unsigned long disk_sector_count() = 0; - virtual unsigned short disk_sector_size() { return 512; } - virtual unsigned long disk_block_size() { return 1; } -}; - +/* mbed Microcontroller Library - FATFileSystem + Copyright (c) 2008, sford */ + +//Modified by Thomas Hamilton, Copyright 2010 + +#ifndef MBED_FATFILESYSTEM_H +#define MBED_FATFILESYSTEM_H + +#include "stdint.h" +#include "ff.h" +#include "mbed.h" +#include "FileSystemLike.h" +#include "FATFileHandle.h" +#include "FATDirHandle.h" +#include <stdio.h> + +class FATFileSystem : public FileSystemLike +{ + private: + FATFS FileSystemObject; + unsigned char Drive; + + public: + static FATFileSystem* DriveArray[_DRIVES]; + + FATFileSystem(const char* SystemName); + virtual ~FATFileSystem(); + + virtual FileHandle* open(const char* filename, int flags); + virtual int remove(const char* filename); + virtual int rename(const char* oldname, const char* newname); + virtual DirHandle* opendir(const char* name); + virtual int mkdir(const char* name, mode_t mode); + + virtual unsigned char disk_initialize() { return 0x00; } + virtual unsigned char disk_status() { return 0x00; } + virtual unsigned char disk_read(unsigned char* buff, + unsigned long sector, unsigned char count) = 0; + virtual unsigned char disk_write(const unsigned char* buff, + unsigned long sector, unsigned char count) = 0; + virtual unsigned char disk_sync() { return 0x00; } + virtual unsigned long disk_sector_count() = 0; + virtual unsigned short disk_sector_size() { return 512; } + virtual unsigned long disk_block_size() { return 1; } +}; + #endif \ No newline at end of file