パラメータを適応変化させる事により圧縮率を向上させた動的ライス・ゴロム符号を利用した可逆圧縮方式。圧縮ソフト、圧縮率のMATLABシミュレーションは詳細はInterface誌2011年8月号に掲載されるRX62Nマイコン連動特集にて掲載予定。
MSCFileSystem.h@0:d920d64db582, 2011-03-30 (annotated)
- Committer:
- lynxeyed_atsu
- Date:
- Wed Mar 30 06:05:24 2011 +0000
- Revision:
- 0:d920d64db582
alpha
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lynxeyed_atsu | 0:d920d64db582 | 1 | /* USB Mass Storage device file system |
lynxeyed_atsu | 0:d920d64db582 | 2 | * Copyrigh (c) 2010, Igor Skochinsky |
lynxeyed_atsu | 0:d920d64db582 | 3 | * based on SDFileStorage |
lynxeyed_atsu | 0:d920d64db582 | 4 | * Copyright (c) 2008-2009, sford |
lynxeyed_atsu | 0:d920d64db582 | 5 | */ |
lynxeyed_atsu | 0:d920d64db582 | 6 | |
lynxeyed_atsu | 0:d920d64db582 | 7 | #ifndef MSCFILESYSTEM_H |
lynxeyed_atsu | 0:d920d64db582 | 8 | #define MSCFILESYSTEM_H |
lynxeyed_atsu | 0:d920d64db582 | 9 | |
lynxeyed_atsu | 0:d920d64db582 | 10 | #include "mbed.h" |
lynxeyed_atsu | 0:d920d64db582 | 11 | #include "FATFileSystem.h" |
lynxeyed_atsu | 0:d920d64db582 | 12 | |
lynxeyed_atsu | 0:d920d64db582 | 13 | /* Class: MSCFileSystem |
lynxeyed_atsu | 0:d920d64db582 | 14 | * Access the filesystem on an attached USB mass storage device (e.g. a memory stick) |
lynxeyed_atsu | 0:d920d64db582 | 15 | * |
lynxeyed_atsu | 0:d920d64db582 | 16 | * Example: |
lynxeyed_atsu | 0:d920d64db582 | 17 | * > MSCFileSystem msc("msc"); |
lynxeyed_atsu | 0:d920d64db582 | 18 | * > |
lynxeyed_atsu | 0:d920d64db582 | 19 | * > int main() { |
lynxeyed_atsu | 0:d920d64db582 | 20 | * > FILE *fp = fopen("/msc/myfile.txt", "w"); |
lynxeyed_atsu | 0:d920d64db582 | 21 | * > fprintf(fp, "Hello World!\n"); |
lynxeyed_atsu | 0:d920d64db582 | 22 | * > fclose(fp); |
lynxeyed_atsu | 0:d920d64db582 | 23 | * > } |
lynxeyed_atsu | 0:d920d64db582 | 24 | */ |
lynxeyed_atsu | 0:d920d64db582 | 25 | class MSCFileSystem : public FATFileSystem { |
lynxeyed_atsu | 0:d920d64db582 | 26 | public: |
lynxeyed_atsu | 0:d920d64db582 | 27 | |
lynxeyed_atsu | 0:d920d64db582 | 28 | /* Constructor: MSCFileSystem |
lynxeyed_atsu | 0:d920d64db582 | 29 | * Create the File System for accessing a USB mass storage device |
lynxeyed_atsu | 0:d920d64db582 | 30 | * |
lynxeyed_atsu | 0:d920d64db582 | 31 | * Parameters: |
lynxeyed_atsu | 0:d920d64db582 | 32 | * name - The name used to access the filesystem |
lynxeyed_atsu | 0:d920d64db582 | 33 | */ |
lynxeyed_atsu | 0:d920d64db582 | 34 | MSCFileSystem(const char* name); |
lynxeyed_atsu | 0:d920d64db582 | 35 | virtual int disk_initialize(); |
lynxeyed_atsu | 0:d920d64db582 | 36 | virtual int disk_write(const char *buffer, int block_number); |
lynxeyed_atsu | 0:d920d64db582 | 37 | virtual int disk_read(char *buffer, int block_number); |
lynxeyed_atsu | 0:d920d64db582 | 38 | virtual int disk_status(); |
lynxeyed_atsu | 0:d920d64db582 | 39 | virtual int disk_sync(); |
lynxeyed_atsu | 0:d920d64db582 | 40 | virtual int disk_sectors(); |
lynxeyed_atsu | 0:d920d64db582 | 41 | |
lynxeyed_atsu | 0:d920d64db582 | 42 | protected: |
lynxeyed_atsu | 0:d920d64db582 | 43 | |
lynxeyed_atsu | 0:d920d64db582 | 44 | int initialise_msc(); |
lynxeyed_atsu | 0:d920d64db582 | 45 | uint32_t _numBlks; |
lynxeyed_atsu | 0:d920d64db582 | 46 | uint32_t _blkSize; |
lynxeyed_atsu | 0:d920d64db582 | 47 | }; |
lynxeyed_atsu | 0:d920d64db582 | 48 | |
lynxeyed_atsu | 0:d920d64db582 | 49 | #endif |