Pulse Oximeter (NONIN) communicates with mbed via Bluetooth dongle and sends Heart Rate and Oxygen Saturation via GPRS module
Dependencies: C12832 GPS GSM mbed
Fork of myBlueUSB_localfix by
FATFileSystem/FATFileSystem.h@3:55a622e3dbb5, 2015-04-14 (annotated)
- Committer:
- samialshorman
- Date:
- Tue Apr 14 21:48:07 2015 +0000
- Revision:
- 3:55a622e3dbb5
- Parent:
- 0:003889bc474f
Nonin (Pulse Oximeter) connected to mbed lpc 1768 by Bluetooth dongle and sends SMS including Heart Rate and Oxygen saturation by GPRS module
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nobukuma | 0:003889bc474f | 1 | /* mbed Microcontroller Library - FATFileSystem |
nobukuma | 0:003889bc474f | 2 | * Copyright (c) 2008, sford |
nobukuma | 0:003889bc474f | 3 | */ |
nobukuma | 0:003889bc474f | 4 | |
nobukuma | 0:003889bc474f | 5 | /* Library: FATFileSystem.h |
nobukuma | 0:003889bc474f | 6 | * A library of stuff to make a fat filesystem on top of a block device |
nobukuma | 0:003889bc474f | 7 | */ |
nobukuma | 0:003889bc474f | 8 | |
nobukuma | 0:003889bc474f | 9 | #ifndef MBED_FATFILESYSTEM_H |
nobukuma | 0:003889bc474f | 10 | #define MBED_FATFILESYSTEM_H |
nobukuma | 0:003889bc474f | 11 | |
nobukuma | 0:003889bc474f | 12 | #ifndef FFSDEBUG_ENABLED |
nobukuma | 0:003889bc474f | 13 | #define FFSDEBUG_ENABLED 0 |
nobukuma | 0:003889bc474f | 14 | #endif |
nobukuma | 0:003889bc474f | 15 | |
nobukuma | 0:003889bc474f | 16 | #if FFSDEBUG_ENABLED |
nobukuma | 0:003889bc474f | 17 | #define FFSDEBUG(FMT, ...) printf(FMT, ##__VA_ARGS__) |
nobukuma | 0:003889bc474f | 18 | #else |
nobukuma | 0:003889bc474f | 19 | #define FFSDEBUG(FMT, ...) |
nobukuma | 0:003889bc474f | 20 | #endif |
nobukuma | 0:003889bc474f | 21 | |
nobukuma | 0:003889bc474f | 22 | #include "FileSystemLike.h" |
nobukuma | 0:003889bc474f | 23 | #include "FileHandle.h" |
nobukuma | 0:003889bc474f | 24 | #include "ff.h" |
nobukuma | 0:003889bc474f | 25 | #include "diskio.h" |
nobukuma | 0:003889bc474f | 26 | |
nobukuma | 0:003889bc474f | 27 | namespace mbed { |
nobukuma | 0:003889bc474f | 28 | /* Class: FATFileSystem |
nobukuma | 0:003889bc474f | 29 | * The class itself |
nobukuma | 0:003889bc474f | 30 | */ |
nobukuma | 0:003889bc474f | 31 | class FATFileSystem : public FileSystemLike { |
nobukuma | 0:003889bc474f | 32 | public: |
nobukuma | 0:003889bc474f | 33 | |
nobukuma | 0:003889bc474f | 34 | FATFileSystem(const char* n); |
nobukuma | 0:003889bc474f | 35 | virtual ~FATFileSystem(); |
nobukuma | 0:003889bc474f | 36 | |
nobukuma | 0:003889bc474f | 37 | /* Function: open |
nobukuma | 0:003889bc474f | 38 | * open a file on the filesystem. never called directly |
nobukuma | 0:003889bc474f | 39 | */ |
nobukuma | 0:003889bc474f | 40 | virtual FileHandle *open(const char* name, int flags); |
nobukuma | 0:003889bc474f | 41 | virtual int remove(const char *filename); |
nobukuma | 0:003889bc474f | 42 | virtual int format(); |
nobukuma | 0:003889bc474f | 43 | virtual DirHandle *opendir(const char *name); |
nobukuma | 0:003889bc474f | 44 | virtual int mkdir(const char *name, mode_t mode); |
nobukuma | 0:003889bc474f | 45 | |
nobukuma | 0:003889bc474f | 46 | FATFS _fs; // Work area (file system object) for logical drive |
nobukuma | 0:003889bc474f | 47 | static FATFileSystem *_ffs[_DRIVES]; // FATFileSystem objects, as parallel to FatFs drives array |
nobukuma | 0:003889bc474f | 48 | int _fsid; |
nobukuma | 0:003889bc474f | 49 | |
nobukuma | 0:003889bc474f | 50 | virtual int disk_initialize() { return 0; } |
nobukuma | 0:003889bc474f | 51 | virtual int disk_status() { return 0; } |
nobukuma | 0:003889bc474f | 52 | virtual int disk_read(char *buffer, int sector) = 0; |
nobukuma | 0:003889bc474f | 53 | virtual int disk_write(const char *buffer, int sector) = 0; |
nobukuma | 0:003889bc474f | 54 | virtual int disk_sync() { return 0; } |
nobukuma | 0:003889bc474f | 55 | virtual int disk_sectors() = 0; |
nobukuma | 0:003889bc474f | 56 | |
nobukuma | 0:003889bc474f | 57 | }; |
nobukuma | 0:003889bc474f | 58 | |
nobukuma | 0:003889bc474f | 59 | } |
nobukuma | 0:003889bc474f | 60 | |
nobukuma | 0:003889bc474f | 61 | #endif |