Dependencies: PinDetect TextLCD mbed mRotaryEncoder
FATFileSystem/Core/ff.h@0:afb2650fb49a, 2012-02-13 (annotated)
- Committer:
- cicklaus
- Date:
- Mon Feb 13 02:11:20 2012 +0000
- Revision:
- 0:afb2650fb49a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cicklaus | 0:afb2650fb49a | 1 | /*---------------------------------------------------------------------------/ |
cicklaus | 0:afb2650fb49a | 2 | / FatFs - FAT file system module include file R0.08 (C)ChaN, 2010 |
cicklaus | 0:afb2650fb49a | 3 | /----------------------------------------------------------------------------/ |
cicklaus | 0:afb2650fb49a | 4 | / FatFs module is a generic FAT file system module for small embedded systems. |
cicklaus | 0:afb2650fb49a | 5 | / This is a free software that opened for education, research and commercial |
cicklaus | 0:afb2650fb49a | 6 | / developments under license policy of following trems. |
cicklaus | 0:afb2650fb49a | 7 | / |
cicklaus | 0:afb2650fb49a | 8 | / Copyright (C) 2010, ChaN, all right reserved. |
cicklaus | 0:afb2650fb49a | 9 | / |
cicklaus | 0:afb2650fb49a | 10 | / * The FatFs module is a free software and there is NO WARRANTY. |
cicklaus | 0:afb2650fb49a | 11 | / * No restriction on use. You can use, modify and redistribute it for |
cicklaus | 0:afb2650fb49a | 12 | / personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. |
cicklaus | 0:afb2650fb49a | 13 | / * Redistributions of source code must retain the above copyright notice. |
cicklaus | 0:afb2650fb49a | 14 | / |
cicklaus | 0:afb2650fb49a | 15 | /----------------------------------------------------------------------------*/ |
cicklaus | 0:afb2650fb49a | 16 | |
cicklaus | 0:afb2650fb49a | 17 | //Modified by Thomas Hamilton, Copyright 2010 |
cicklaus | 0:afb2650fb49a | 18 | |
cicklaus | 0:afb2650fb49a | 19 | #ifndef _FATFS |
cicklaus | 0:afb2650fb49a | 20 | #define _FATFS 8085 /* Revision ID */ |
cicklaus | 0:afb2650fb49a | 21 | |
cicklaus | 0:afb2650fb49a | 22 | #ifdef __cplusplus |
cicklaus | 0:afb2650fb49a | 23 | extern "C" { |
cicklaus | 0:afb2650fb49a | 24 | #endif |
cicklaus | 0:afb2650fb49a | 25 | |
cicklaus | 0:afb2650fb49a | 26 | #include "integer.h" /* Basic integer types */ |
cicklaus | 0:afb2650fb49a | 27 | #include "ffconf.h" /* FatFs configuration options */ |
cicklaus | 0:afb2650fb49a | 28 | |
cicklaus | 0:afb2650fb49a | 29 | #if _FATFS != _FFCONF |
cicklaus | 0:afb2650fb49a | 30 | #error Wrong configuration file (ffconf.h). |
cicklaus | 0:afb2650fb49a | 31 | #endif |
cicklaus | 0:afb2650fb49a | 32 | |
cicklaus | 0:afb2650fb49a | 33 | |
cicklaus | 0:afb2650fb49a | 34 | /* DBCS code ranges and SBCS extend char conversion table */ |
cicklaus | 0:afb2650fb49a | 35 | |
cicklaus | 0:afb2650fb49a | 36 | #if _CODE_PAGE == 932 /* Japanese Shift-JIS */ |
cicklaus | 0:afb2650fb49a | 37 | #define _DF1S 0x81 /* DBC 1st byte range 1 start */ |
cicklaus | 0:afb2650fb49a | 38 | #define _DF1E 0x9F /* DBC 1st byte range 1 end */ |
cicklaus | 0:afb2650fb49a | 39 | #define _DF2S 0xE0 /* DBC 1st byte range 2 start */ |
cicklaus | 0:afb2650fb49a | 40 | #define _DF2E 0xFC /* DBC 1st byte range 2 end */ |
cicklaus | 0:afb2650fb49a | 41 | #define _DS1S 0x40 /* DBC 2nd byte range 1 start */ |
cicklaus | 0:afb2650fb49a | 42 | #define _DS1E 0x7E /* DBC 2nd byte range 1 end */ |
cicklaus | 0:afb2650fb49a | 43 | #define _DS2S 0x80 /* DBC 2nd byte range 2 start */ |
cicklaus | 0:afb2650fb49a | 44 | #define _DS2E 0xFC /* DBC 2nd byte range 2 end */ |
cicklaus | 0:afb2650fb49a | 45 | |
cicklaus | 0:afb2650fb49a | 46 | #elif _CODE_PAGE == 936 /* Simplified Chinese GBK */ |
cicklaus | 0:afb2650fb49a | 47 | #define _DF1S 0x81 |
cicklaus | 0:afb2650fb49a | 48 | #define _DF1E 0xFE |
cicklaus | 0:afb2650fb49a | 49 | #define _DS1S 0x40 |
cicklaus | 0:afb2650fb49a | 50 | #define _DS1E 0x7E |
cicklaus | 0:afb2650fb49a | 51 | #define _DS2S 0x80 |
cicklaus | 0:afb2650fb49a | 52 | #define _DS2E 0xFE |
cicklaus | 0:afb2650fb49a | 53 | |
cicklaus | 0:afb2650fb49a | 54 | #elif _CODE_PAGE == 949 /* Korean */ |
cicklaus | 0:afb2650fb49a | 55 | #define _DF1S 0x81 |
cicklaus | 0:afb2650fb49a | 56 | #define _DF1E 0xFE |
cicklaus | 0:afb2650fb49a | 57 | #define _DS1S 0x41 |
cicklaus | 0:afb2650fb49a | 58 | #define _DS1E 0x5A |
cicklaus | 0:afb2650fb49a | 59 | #define _DS2S 0x61 |
cicklaus | 0:afb2650fb49a | 60 | #define _DS2E 0x7A |
cicklaus | 0:afb2650fb49a | 61 | #define _DS3S 0x81 |
cicklaus | 0:afb2650fb49a | 62 | #define _DS3E 0xFE |
cicklaus | 0:afb2650fb49a | 63 | |
cicklaus | 0:afb2650fb49a | 64 | #elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */ |
cicklaus | 0:afb2650fb49a | 65 | #define _DF1S 0x81 |
cicklaus | 0:afb2650fb49a | 66 | #define _DF1E 0xFE |
cicklaus | 0:afb2650fb49a | 67 | #define _DS1S 0x40 |
cicklaus | 0:afb2650fb49a | 68 | #define _DS1E 0x7E |
cicklaus | 0:afb2650fb49a | 69 | #define _DS2S 0xA1 |
cicklaus | 0:afb2650fb49a | 70 | #define _DS2E 0xFE |
cicklaus | 0:afb2650fb49a | 71 | |
cicklaus | 0:afb2650fb49a | 72 | #elif _CODE_PAGE == 437 /* U.S. (OEM) */ |
cicklaus | 0:afb2650fb49a | 73 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 74 | #define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 75 | 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 76 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 77 | 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 78 | |
cicklaus | 0:afb2650fb49a | 79 | #elif _CODE_PAGE == 720 /* Arabic (OEM) */ |
cicklaus | 0:afb2650fb49a | 80 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 81 | #define _EXCVT {0x80,0x81,0x45,0x41,0x84,0x41,0x86,0x43,0x45,0x45,0x45,0x49,0x49,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x49,0x49,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 82 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 83 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 84 | 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 85 | |
cicklaus | 0:afb2650fb49a | 86 | #elif _CODE_PAGE == 737 /* Greek (OEM) */ |
cicklaus | 0:afb2650fb49a | 87 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 88 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x92,0x92,0x93,0x94,0x95,0x96,0x97,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, \ |
cicklaus | 0:afb2650fb49a | 89 | 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0xAA,0x92,0x93,0x94,0x95,0x96,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 90 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 91 | 0x97,0xEA,0xEB,0xEC,0xE4,0xED,0xEE,0xE7,0xE8,0xF1,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 92 | |
cicklaus | 0:afb2650fb49a | 93 | #elif _CODE_PAGE == 775 /* Baltic (OEM) */ |
cicklaus | 0:afb2650fb49a | 94 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 95 | #define _EXCVT {0x80,0x9A,0x91,0xA0,0x8E,0x95,0x8F,0x80,0xAD,0xED,0x8A,0x8A,0xA1,0x8D,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0x95,0x96,0x97,0x97,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 96 | 0xA0,0xA1,0xE0,0xA3,0xA3,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 97 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xB5,0xB6,0xB7,0xB8,0xBD,0xBE,0xC6,0xC7,0xA5,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 98 | 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE3,0xE8,0xE8,0xEA,0xEA,0xEE,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 99 | |
cicklaus | 0:afb2650fb49a | 100 | #elif _CODE_PAGE == 850 /* Multilingual Latin 1 (OEM) */ |
cicklaus | 0:afb2650fb49a | 101 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 102 | #define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0xDE,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x59,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 103 | 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 104 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 105 | 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 106 | |
cicklaus | 0:afb2650fb49a | 107 | #elif _CODE_PAGE == 852 /* Latin 2 (OEM) */ |
cicklaus | 0:afb2650fb49a | 108 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 109 | #define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F,0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 110 | 0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xB8,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBD,0xBF, \ |
cicklaus | 0:afb2650fb49a | 111 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 112 | 0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 113 | |
cicklaus | 0:afb2650fb49a | 114 | #elif _CODE_PAGE == 855 /* Cyrillic (OEM) */ |
cicklaus | 0:afb2650fb49a | 115 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 116 | #define _EXCVT {0x81,0x81,0x83,0x83,0x85,0x85,0x87,0x87,0x89,0x89,0x8B,0x8B,0x8D,0x8D,0x8F,0x8F,0x91,0x91,0x93,0x93,0x95,0x95,0x97,0x97,0x99,0x99,0x9B,0x9B,0x9D,0x9D,0x9F,0x9F, \ |
cicklaus | 0:afb2650fb49a | 117 | 0xA1,0xA1,0xA3,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAB,0xAB,0xAD,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB6,0xB6,0xB8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 118 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xDD,0xD9,0xDA,0xDB,0xDC,0xDD,0xE0,0xDF, \ |
cicklaus | 0:afb2650fb49a | 119 | 0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE,0xEF,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 120 | |
cicklaus | 0:afb2650fb49a | 121 | #elif _CODE_PAGE == 857 /* Turkish (OEM) */ |
cicklaus | 0:afb2650fb49a | 122 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 123 | #define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0x98,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x98,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9E, \ |
cicklaus | 0:afb2650fb49a | 124 | 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA6,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 125 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 126 | 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xDE,0x59,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 127 | |
cicklaus | 0:afb2650fb49a | 128 | #elif _CODE_PAGE == 858 /* Multilingual Latin 1 + Euro (OEM) */ |
cicklaus | 0:afb2650fb49a | 129 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 130 | #define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0xDE,0x8E,0x8F,0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x59,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 131 | 0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 132 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD1,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 133 | 0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE7,0xE9,0xEA,0xEB,0xED,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 134 | |
cicklaus | 0:afb2650fb49a | 135 | #elif _CODE_PAGE == 862 /* Hebrew (OEM) */ |
cicklaus | 0:afb2650fb49a | 136 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 137 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 138 | 0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 139 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 140 | 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 141 | |
cicklaus | 0:afb2650fb49a | 142 | #elif _CODE_PAGE == 866 /* Russian (OEM) */ |
cicklaus | 0:afb2650fb49a | 143 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 144 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 145 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 146 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 147 | 0x90,0x91,0x92,0x93,0x9d,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 148 | |
cicklaus | 0:afb2650fb49a | 149 | #elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */ |
cicklaus | 0:afb2650fb49a | 150 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 151 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 152 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 153 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 154 | 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 155 | |
cicklaus | 0:afb2650fb49a | 156 | #elif _CODE_PAGE == 1250 /* Central Europe (Windows) */ |
cicklaus | 0:afb2650fb49a | 157 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 158 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \ |
cicklaus | 0:afb2650fb49a | 159 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF, \ |
cicklaus | 0:afb2650fb49a | 160 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 161 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF} |
cicklaus | 0:afb2650fb49a | 162 | |
cicklaus | 0:afb2650fb49a | 163 | #elif _CODE_PAGE == 1251 /* Cyrillic (Windows) */ |
cicklaus | 0:afb2650fb49a | 164 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 165 | #define _EXCVT {0x80,0x81,0x82,0x82,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F, \ |
cicklaus | 0:afb2650fb49a | 166 | 0xA0,0xA2,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF, \ |
cicklaus | 0:afb2650fb49a | 167 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 168 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF} |
cicklaus | 0:afb2650fb49a | 169 | |
cicklaus | 0:afb2650fb49a | 170 | #elif _CODE_PAGE == 1252 /* Latin 1 (Windows) */ |
cicklaus | 0:afb2650fb49a | 171 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 172 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xAd,0x9B,0x8C,0x9D,0xAE,0x9F, \ |
cicklaus | 0:afb2650fb49a | 173 | 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 174 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 175 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F} |
cicklaus | 0:afb2650fb49a | 176 | |
cicklaus | 0:afb2650fb49a | 177 | #elif _CODE_PAGE == 1253 /* Greek (Windows) */ |
cicklaus | 0:afb2650fb49a | 178 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 179 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 180 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 181 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xA2,0xB8,0xB9,0xBA, \ |
cicklaus | 0:afb2650fb49a | 182 | 0xE0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xFB,0xBC,0xFD,0xBF,0xFF} |
cicklaus | 0:afb2650fb49a | 183 | |
cicklaus | 0:afb2650fb49a | 184 | #elif _CODE_PAGE == 1254 /* Turkish (Windows) */ |
cicklaus | 0:afb2650fb49a | 185 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 186 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 187 | 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 188 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 189 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x9F} |
cicklaus | 0:afb2650fb49a | 190 | |
cicklaus | 0:afb2650fb49a | 191 | #elif _CODE_PAGE == 1255 /* Hebrew (Windows) */ |
cicklaus | 0:afb2650fb49a | 192 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 193 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 194 | 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 195 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 196 | 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 197 | |
cicklaus | 0:afb2650fb49a | 198 | #elif _CODE_PAGE == 1256 /* Arabic (Windows) */ |
cicklaus | 0:afb2650fb49a | 199 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 200 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 201 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 202 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 203 | 0x41,0xE1,0x41,0xE3,0xE4,0xE5,0xE6,0x43,0x45,0x45,0x45,0x45,0xEC,0xED,0x49,0x49,0xF0,0xF1,0xF2,0xF3,0x4F,0xF5,0xF6,0xF7,0xF8,0x55,0xFA,0x55,0x55,0xFD,0xFE,0xFF} |
cicklaus | 0:afb2650fb49a | 204 | |
cicklaus | 0:afb2650fb49a | 205 | #elif _CODE_PAGE == 1257 /* Baltic (Windows) */ |
cicklaus | 0:afb2650fb49a | 206 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 207 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 208 | 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF, \ |
cicklaus | 0:afb2650fb49a | 209 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 210 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF} |
cicklaus | 0:afb2650fb49a | 211 | |
cicklaus | 0:afb2650fb49a | 212 | #elif _CODE_PAGE == 1258 /* Vietnam (OEM, Windows) */ |
cicklaus | 0:afb2650fb49a | 213 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 214 | #define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0xAC,0x9D,0x9E,0x9F, \ |
cicklaus | 0:afb2650fb49a | 215 | 0xA0,0x21,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \ |
cicklaus | 0:afb2650fb49a | 216 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \ |
cicklaus | 0:afb2650fb49a | 217 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xEC,0xCD,0xCE,0xCF,0xD0,0xD1,0xF2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xFE,0x9F} |
cicklaus | 0:afb2650fb49a | 218 | |
cicklaus | 0:afb2650fb49a | 219 | #elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */ |
cicklaus | 0:afb2650fb49a | 220 | #define _DF1S 0 |
cicklaus | 0:afb2650fb49a | 221 | |
cicklaus | 0:afb2650fb49a | 222 | #else |
cicklaus | 0:afb2650fb49a | 223 | #error Unknown code page |
cicklaus | 0:afb2650fb49a | 224 | |
cicklaus | 0:afb2650fb49a | 225 | #endif |
cicklaus | 0:afb2650fb49a | 226 | |
cicklaus | 0:afb2650fb49a | 227 | |
cicklaus | 0:afb2650fb49a | 228 | |
cicklaus | 0:afb2650fb49a | 229 | /* Definitions corresponds to volume management */ |
cicklaus | 0:afb2650fb49a | 230 | |
cicklaus | 0:afb2650fb49a | 231 | #if _MULTI_PARTITION /* Multiple partition configuration */ |
cicklaus | 0:afb2650fb49a | 232 | #define LD2PD(drv) (Drives[drv].pd) /* Get physical drive# */ |
cicklaus | 0:afb2650fb49a | 233 | #define LD2PT(drv) (Drives[drv].pt) /* Get partition# */ |
cicklaus | 0:afb2650fb49a | 234 | typedef struct { |
cicklaus | 0:afb2650fb49a | 235 | BYTE pd; /* Physical drive# */ |
cicklaus | 0:afb2650fb49a | 236 | BYTE pt; /* Partition # (0-3) */ |
cicklaus | 0:afb2650fb49a | 237 | } PARTITION; |
cicklaus | 0:afb2650fb49a | 238 | extern const PARTITION Drives[]; /* Logical drive# to physical location conversion table */ |
cicklaus | 0:afb2650fb49a | 239 | |
cicklaus | 0:afb2650fb49a | 240 | #else /* Single partition configuration */ |
cicklaus | 0:afb2650fb49a | 241 | #define LD2PD(drv) (drv) /* Physical drive# is equal to the logical drive# */ |
cicklaus | 0:afb2650fb49a | 242 | #define LD2PT(drv) 0 /* Always mounts the 1st partition */ |
cicklaus | 0:afb2650fb49a | 243 | |
cicklaus | 0:afb2650fb49a | 244 | #endif |
cicklaus | 0:afb2650fb49a | 245 | |
cicklaus | 0:afb2650fb49a | 246 | |
cicklaus | 0:afb2650fb49a | 247 | |
cicklaus | 0:afb2650fb49a | 248 | /* Type of path name strings on FatFs API */ |
cicklaus | 0:afb2650fb49a | 249 | |
cicklaus | 0:afb2650fb49a | 250 | #if _LFN_UNICODE /* Unicode string */ |
cicklaus | 0:afb2650fb49a | 251 | #if !_USE_LFN |
cicklaus | 0:afb2650fb49a | 252 | #error _LFN_UNICODE must be 0 in non-LFN cfg. |
cicklaus | 0:afb2650fb49a | 253 | #endif |
cicklaus | 0:afb2650fb49a | 254 | #ifndef _INC_TCHAR |
cicklaus | 0:afb2650fb49a | 255 | typedef WCHAR TCHAR; |
cicklaus | 0:afb2650fb49a | 256 | #define _T(x) L ## x |
cicklaus | 0:afb2650fb49a | 257 | #define _TEXT(x) L ## x |
cicklaus | 0:afb2650fb49a | 258 | #endif |
cicklaus | 0:afb2650fb49a | 259 | |
cicklaus | 0:afb2650fb49a | 260 | #else /* ANSI/OEM string */ |
cicklaus | 0:afb2650fb49a | 261 | #ifndef _INC_TCHAR |
cicklaus | 0:afb2650fb49a | 262 | typedef char TCHAR; |
cicklaus | 0:afb2650fb49a | 263 | #define _T(x) x |
cicklaus | 0:afb2650fb49a | 264 | #define _TEXT(x) x |
cicklaus | 0:afb2650fb49a | 265 | #endif |
cicklaus | 0:afb2650fb49a | 266 | |
cicklaus | 0:afb2650fb49a | 267 | #endif |
cicklaus | 0:afb2650fb49a | 268 | |
cicklaus | 0:afb2650fb49a | 269 | |
cicklaus | 0:afb2650fb49a | 270 | |
cicklaus | 0:afb2650fb49a | 271 | /* Definitions corresponds to file shareing feature */ |
cicklaus | 0:afb2650fb49a | 272 | |
cicklaus | 0:afb2650fb49a | 273 | #if _FS_SHARE |
cicklaus | 0:afb2650fb49a | 274 | #if _FS_READONLY |
cicklaus | 0:afb2650fb49a | 275 | #error _FS_SHARE must be 0 on R/O cfg. |
cicklaus | 0:afb2650fb49a | 276 | #endif |
cicklaus | 0:afb2650fb49a | 277 | typedef struct { |
cicklaus | 0:afb2650fb49a | 278 | DWORD clu; /* File ID 1, directory */ |
cicklaus | 0:afb2650fb49a | 279 | WORD idx; /* File ID 2, index in the directory */ |
cicklaus | 0:afb2650fb49a | 280 | WORD ctr; /* File open counter, 0:none, 0x01..0xFF:read open count, 0x100:in write open */ |
cicklaus | 0:afb2650fb49a | 281 | } FILESEM; |
cicklaus | 0:afb2650fb49a | 282 | #endif |
cicklaus | 0:afb2650fb49a | 283 | |
cicklaus | 0:afb2650fb49a | 284 | |
cicklaus | 0:afb2650fb49a | 285 | |
cicklaus | 0:afb2650fb49a | 286 | /* File system object structure (FATFS) */ |
cicklaus | 0:afb2650fb49a | 287 | |
cicklaus | 0:afb2650fb49a | 288 | typedef struct { |
cicklaus | 0:afb2650fb49a | 289 | BYTE fs_type; /* FAT sub-type (0:Not mounted) */ |
cicklaus | 0:afb2650fb49a | 290 | BYTE drv; /* Physical drive number */ |
cicklaus | 0:afb2650fb49a | 291 | BYTE csize; /* Sectors per cluster (1,2,4...128) */ |
cicklaus | 0:afb2650fb49a | 292 | BYTE n_fats; /* Number of FAT copies (1,2) */ |
cicklaus | 0:afb2650fb49a | 293 | BYTE wflag; /* win[] dirty flag (1:must be written back) */ |
cicklaus | 0:afb2650fb49a | 294 | BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */ |
cicklaus | 0:afb2650fb49a | 295 | WORD id; /* File system mount ID */ |
cicklaus | 0:afb2650fb49a | 296 | WORD n_rootdir; /* Number of root directory entries (FAT12/16) */ |
cicklaus | 0:afb2650fb49a | 297 | #if _MAX_SS != 512 |
cicklaus | 0:afb2650fb49a | 298 | WORD ssize; /* Bytes per sector (512,1024,2048,4096) */ |
cicklaus | 0:afb2650fb49a | 299 | #endif |
cicklaus | 0:afb2650fb49a | 300 | #if _FS_REENTRANT |
cicklaus | 0:afb2650fb49a | 301 | _SYNC_t sobj; /* Identifier of sync object */ |
cicklaus | 0:afb2650fb49a | 302 | #endif |
cicklaus | 0:afb2650fb49a | 303 | #if !_FS_READONLY |
cicklaus | 0:afb2650fb49a | 304 | DWORD last_clust; /* Last allocated cluster */ |
cicklaus | 0:afb2650fb49a | 305 | DWORD free_clust; /* Number of free clusters */ |
cicklaus | 0:afb2650fb49a | 306 | DWORD fsi_sector; /* fsinfo sector (FAT32) */ |
cicklaus | 0:afb2650fb49a | 307 | #endif |
cicklaus | 0:afb2650fb49a | 308 | #if _FS_RPATH |
cicklaus | 0:afb2650fb49a | 309 | DWORD cdir; /* Current directory start cluster (0:root) */ |
cicklaus | 0:afb2650fb49a | 310 | #endif |
cicklaus | 0:afb2650fb49a | 311 | DWORD n_fatent; /* Number of FAT entries (= number of clusters + 2) */ |
cicklaus | 0:afb2650fb49a | 312 | DWORD fsize; /* Sectors per FAT */ |
cicklaus | 0:afb2650fb49a | 313 | DWORD fatbase; /* FAT start sector */ |
cicklaus | 0:afb2650fb49a | 314 | DWORD dirbase; /* Root directory start sector (FAT32:Cluster#) */ |
cicklaus | 0:afb2650fb49a | 315 | DWORD database; /* Data start sector */ |
cicklaus | 0:afb2650fb49a | 316 | DWORD winsect; /* Current sector appearing in the win[] */ |
cicklaus | 0:afb2650fb49a | 317 | BYTE win[_MAX_SS]; /* Disk access window for Directory, FAT (and Data on tiny cfg) */ |
cicklaus | 0:afb2650fb49a | 318 | #if _FS_SHARE |
cicklaus | 0:afb2650fb49a | 319 | FILESEM flsem[_FS_SHARE]; /* File lock semaphores */ |
cicklaus | 0:afb2650fb49a | 320 | #endif |
cicklaus | 0:afb2650fb49a | 321 | } FATFS; |
cicklaus | 0:afb2650fb49a | 322 | |
cicklaus | 0:afb2650fb49a | 323 | |
cicklaus | 0:afb2650fb49a | 324 | |
cicklaus | 0:afb2650fb49a | 325 | /* File object structure (FIL) */ |
cicklaus | 0:afb2650fb49a | 326 | |
cicklaus | 0:afb2650fb49a | 327 | typedef struct { |
cicklaus | 0:afb2650fb49a | 328 | FATFS* fs; /* Pointer to the owner file system object */ |
cicklaus | 0:afb2650fb49a | 329 | WORD id; /* Owner file system mount ID */ |
cicklaus | 0:afb2650fb49a | 330 | BYTE flag; /* File status flags */ |
cicklaus | 0:afb2650fb49a | 331 | BYTE pad1; |
cicklaus | 0:afb2650fb49a | 332 | DWORD fptr; /* File read/write pointer */ |
cicklaus | 0:afb2650fb49a | 333 | DWORD fsize; /* File size */ |
cicklaus | 0:afb2650fb49a | 334 | DWORD org_clust; /* File start cluster (0 when fsize==0) */ |
cicklaus | 0:afb2650fb49a | 335 | DWORD curr_clust; /* Current cluster */ |
cicklaus | 0:afb2650fb49a | 336 | DWORD dsect; /* Current data sector */ |
cicklaus | 0:afb2650fb49a | 337 | #if !_FS_READONLY |
cicklaus | 0:afb2650fb49a | 338 | DWORD dir_sect; /* Sector containing the directory entry */ |
cicklaus | 0:afb2650fb49a | 339 | BYTE* dir_ptr; /* Ponter to the directory entry in the window */ |
cicklaus | 0:afb2650fb49a | 340 | #endif |
cicklaus | 0:afb2650fb49a | 341 | #if _USE_FASTSEEK |
cicklaus | 0:afb2650fb49a | 342 | DWORD* cltbl; /* Pointer to the cluster link map table */ |
cicklaus | 0:afb2650fb49a | 343 | #endif |
cicklaus | 0:afb2650fb49a | 344 | #if _FS_SHARE |
cicklaus | 0:afb2650fb49a | 345 | UINT lockid; /* File lock ID */ |
cicklaus | 0:afb2650fb49a | 346 | #endif |
cicklaus | 0:afb2650fb49a | 347 | #if !_FS_TINY |
cicklaus | 0:afb2650fb49a | 348 | BYTE buf[_MAX_SS]; /* File data read/write buffer */ |
cicklaus | 0:afb2650fb49a | 349 | #endif |
cicklaus | 0:afb2650fb49a | 350 | } FAT_FIL; |
cicklaus | 0:afb2650fb49a | 351 | |
cicklaus | 0:afb2650fb49a | 352 | |
cicklaus | 0:afb2650fb49a | 353 | |
cicklaus | 0:afb2650fb49a | 354 | /* Directory object structure (FAT_DIR) */ |
cicklaus | 0:afb2650fb49a | 355 | |
cicklaus | 0:afb2650fb49a | 356 | typedef struct { |
cicklaus | 0:afb2650fb49a | 357 | FATFS* fs; /* Pointer to the owner file system object */ |
cicklaus | 0:afb2650fb49a | 358 | WORD id; /* Owner file system mount ID */ |
cicklaus | 0:afb2650fb49a | 359 | WORD index; /* Current read/write index number */ |
cicklaus | 0:afb2650fb49a | 360 | DWORD sclust; /* Table start cluster (0:Root dir) */ |
cicklaus | 0:afb2650fb49a | 361 | DWORD clust; /* Current cluster */ |
cicklaus | 0:afb2650fb49a | 362 | DWORD sect; /* Current sector */ |
cicklaus | 0:afb2650fb49a | 363 | BYTE* dir; /* Pointer to the current SFN entry in the win[] */ |
cicklaus | 0:afb2650fb49a | 364 | BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */ |
cicklaus | 0:afb2650fb49a | 365 | #if _USE_LFN |
cicklaus | 0:afb2650fb49a | 366 | WCHAR* lfn; /* Pointer to the LFN working buffer */ |
cicklaus | 0:afb2650fb49a | 367 | WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */ |
cicklaus | 0:afb2650fb49a | 368 | #endif |
cicklaus | 0:afb2650fb49a | 369 | } FAT_DIR; |
cicklaus | 0:afb2650fb49a | 370 | |
cicklaus | 0:afb2650fb49a | 371 | |
cicklaus | 0:afb2650fb49a | 372 | |
cicklaus | 0:afb2650fb49a | 373 | /* File status structure (FILINFO) */ |
cicklaus | 0:afb2650fb49a | 374 | |
cicklaus | 0:afb2650fb49a | 375 | typedef struct { |
cicklaus | 0:afb2650fb49a | 376 | DWORD fsize; /* File size */ |
cicklaus | 0:afb2650fb49a | 377 | WORD fdate; /* Last modified date */ |
cicklaus | 0:afb2650fb49a | 378 | WORD ftime; /* Last modified time */ |
cicklaus | 0:afb2650fb49a | 379 | BYTE fattrib; /* Attribute */ |
cicklaus | 0:afb2650fb49a | 380 | TCHAR fname[13]; /* Short file name (8.3 format) */ |
cicklaus | 0:afb2650fb49a | 381 | #if _USE_LFN |
cicklaus | 0:afb2650fb49a | 382 | TCHAR* lfname; /* Pointer to the LFN buffer */ |
cicklaus | 0:afb2650fb49a | 383 | int lfsize; /* Size of LFN buffer [chrs] */ |
cicklaus | 0:afb2650fb49a | 384 | #endif |
cicklaus | 0:afb2650fb49a | 385 | } FILINFO; |
cicklaus | 0:afb2650fb49a | 386 | |
cicklaus | 0:afb2650fb49a | 387 | |
cicklaus | 0:afb2650fb49a | 388 | |
cicklaus | 0:afb2650fb49a | 389 | /* File function return code (FRESULT) */ |
cicklaus | 0:afb2650fb49a | 390 | |
cicklaus | 0:afb2650fb49a | 391 | typedef enum { |
cicklaus | 0:afb2650fb49a | 392 | FR_OK = 0, /* (0) Succeeded */ |
cicklaus | 0:afb2650fb49a | 393 | FR_DISK_ERR, /* (1) A hard error occured in the low level disk I/O layer */ |
cicklaus | 0:afb2650fb49a | 394 | FR_INT_ERR, /* (2) Assertion failed */ |
cicklaus | 0:afb2650fb49a | 395 | FR_NOT_READY, /* (3) The physical drive cannot work */ |
cicklaus | 0:afb2650fb49a | 396 | FR_NO_FILE, /* (4) Could not find the file */ |
cicklaus | 0:afb2650fb49a | 397 | FR_NO_PATH, /* (5) Could not find the path */ |
cicklaus | 0:afb2650fb49a | 398 | FR_INVALID_NAME, /* (6) The path name format is invalid */ |
cicklaus | 0:afb2650fb49a | 399 | FR_DENIED, /* (7) Acces denied due to prohibited access or directory full */ |
cicklaus | 0:afb2650fb49a | 400 | FR_EXIST, /* (8) Acces denied due to prohibited access */ |
cicklaus | 0:afb2650fb49a | 401 | FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */ |
cicklaus | 0:afb2650fb49a | 402 | FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */ |
cicklaus | 0:afb2650fb49a | 403 | FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */ |
cicklaus | 0:afb2650fb49a | 404 | FR_NOT_ENABLED, /* (12) The volume has no work area */ |
cicklaus | 0:afb2650fb49a | 405 | FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume on the physical drive */ |
cicklaus | 0:afb2650fb49a | 406 | FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any parameter error */ |
cicklaus | 0:afb2650fb49a | 407 | FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */ |
cicklaus | 0:afb2650fb49a | 408 | FR_LOCKED, /* (16) The operation is rejected according to the file shareing policy */ |
cicklaus | 0:afb2650fb49a | 409 | FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */ |
cicklaus | 0:afb2650fb49a | 410 | FR_TOO_MANY_OPEN_FILES /* (18) Number of open files > _FS_SHARE */ |
cicklaus | 0:afb2650fb49a | 411 | } FRESULT; |
cicklaus | 0:afb2650fb49a | 412 | |
cicklaus | 0:afb2650fb49a | 413 | |
cicklaus | 0:afb2650fb49a | 414 | |
cicklaus | 0:afb2650fb49a | 415 | /*--------------------------------------------------------------*/ |
cicklaus | 0:afb2650fb49a | 416 | /* FatFs module application interface */ |
cicklaus | 0:afb2650fb49a | 417 | |
cicklaus | 0:afb2650fb49a | 418 | FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */ |
cicklaus | 0:afb2650fb49a | 419 | FRESULT f_open (FAT_FIL*, const TCHAR*, BYTE); /* Open or create a file */ |
cicklaus | 0:afb2650fb49a | 420 | FRESULT f_read (FAT_FIL*, void*, UINT, UINT*); /* Read data from a file */ |
cicklaus | 0:afb2650fb49a | 421 | FRESULT f_lseek (FAT_FIL*, DWORD); /* Move file pointer of a file object */ |
cicklaus | 0:afb2650fb49a | 422 | FRESULT f_close (FAT_FIL*); /* Close an open file object */ |
cicklaus | 0:afb2650fb49a | 423 | FRESULT f_opendir (FAT_DIR*, const TCHAR*); /* Open an existing directory */ |
cicklaus | 0:afb2650fb49a | 424 | FRESULT f_readdir (FAT_DIR*, FILINFO*); /* Read a directory item */ |
cicklaus | 0:afb2650fb49a | 425 | FRESULT f_stat (const TCHAR*, FILINFO*); /* Get file status */ |
cicklaus | 0:afb2650fb49a | 426 | #if !_FS_READONLY |
cicklaus | 0:afb2650fb49a | 427 | FRESULT f_write (FAT_FIL*, const void*, UINT, UINT*); /* Write data to a file */ |
cicklaus | 0:afb2650fb49a | 428 | FRESULT f_getfree (const TCHAR*, DWORD*, FATFS**); /* Get number of free clusters on the drive */ |
cicklaus | 0:afb2650fb49a | 429 | FRESULT f_truncate (FAT_FIL*); /* Truncate file */ |
cicklaus | 0:afb2650fb49a | 430 | FRESULT f_sync (FAT_FIL*); /* Flush cached data of a writing file */ |
cicklaus | 0:afb2650fb49a | 431 | FRESULT f_unlink (const TCHAR*); /* Delete an existing file or directory */ |
cicklaus | 0:afb2650fb49a | 432 | FRESULT f_mkdir (const TCHAR*); /* Create a new directory */ |
cicklaus | 0:afb2650fb49a | 433 | FRESULT f_chmod (const TCHAR*, BYTE, BYTE); /* Change attriburte of the file/dir */ |
cicklaus | 0:afb2650fb49a | 434 | FRESULT f_utime (const TCHAR*, const FILINFO*); /* Change timestamp of the file/dir */ |
cicklaus | 0:afb2650fb49a | 435 | FRESULT f_rename (const TCHAR*, const TCHAR*); /* Rename/Move a file or directory */ |
cicklaus | 0:afb2650fb49a | 436 | #endif |
cicklaus | 0:afb2650fb49a | 437 | #if _USE_FORWARD |
cicklaus | 0:afb2650fb49a | 438 | FRESULT f_forward (FAT_FIL*, UINT(*)(const BYTE*,UINT), UINT, UINT*); /* Forward data to the stream */ |
cicklaus | 0:afb2650fb49a | 439 | #endif |
cicklaus | 0:afb2650fb49a | 440 | #if _USE_MKFS |
cicklaus | 0:afb2650fb49a | 441 | FRESULT f_mkfs (BYTE, BYTE, UINT); /* Create a file system on the drive */ |
cicklaus | 0:afb2650fb49a | 442 | #endif |
cicklaus | 0:afb2650fb49a | 443 | #if _FS_RPATH |
cicklaus | 0:afb2650fb49a | 444 | FRESULT f_chdir (const TCHAR*); /* Change current directory */ |
cicklaus | 0:afb2650fb49a | 445 | FRESULT f_chdrive (BYTE); /* Change current drive */ |
cicklaus | 0:afb2650fb49a | 446 | #endif |
cicklaus | 0:afb2650fb49a | 447 | #if _USE_STRFUNC |
cicklaus | 0:afb2650fb49a | 448 | int f_putc (TCHAR, FAT_FIL*); /* Put a character to the file */ |
cicklaus | 0:afb2650fb49a | 449 | int f_puts (const TCHAR*, FAT_FIL*); /* Put a string to the file */ |
cicklaus | 0:afb2650fb49a | 450 | int f_printf (FAT_FIL*, const TCHAR*, ...); /* Put a formatted string to the file */ |
cicklaus | 0:afb2650fb49a | 451 | TCHAR* f_gets (TCHAR*, int, FAT_FIL*); /* Get a string from the file */ |
cicklaus | 0:afb2650fb49a | 452 | #define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0) |
cicklaus | 0:afb2650fb49a | 453 | #define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0) |
cicklaus | 0:afb2650fb49a | 454 | #ifndef EOF |
cicklaus | 0:afb2650fb49a | 455 | #define EOF (-1) |
cicklaus | 0:afb2650fb49a | 456 | #endif |
cicklaus | 0:afb2650fb49a | 457 | #endif |
cicklaus | 0:afb2650fb49a | 458 | |
cicklaus | 0:afb2650fb49a | 459 | |
cicklaus | 0:afb2650fb49a | 460 | |
cicklaus | 0:afb2650fb49a | 461 | /*--------------------------------------------------------------*/ |
cicklaus | 0:afb2650fb49a | 462 | /* Additional user defined functions */ |
cicklaus | 0:afb2650fb49a | 463 | |
cicklaus | 0:afb2650fb49a | 464 | /* RTC function */ |
cicklaus | 0:afb2650fb49a | 465 | #if !_FS_READONLY |
cicklaus | 0:afb2650fb49a | 466 | DWORD get_fattime (void); |
cicklaus | 0:afb2650fb49a | 467 | #endif |
cicklaus | 0:afb2650fb49a | 468 | |
cicklaus | 0:afb2650fb49a | 469 | /* Unicode support functions */ |
cicklaus | 0:afb2650fb49a | 470 | #if _USE_LFN /* Unicode - OEM code conversion */ |
cicklaus | 0:afb2650fb49a | 471 | WCHAR ff_convert (WCHAR, UINT); /* OEM-Unicode bidirectional conversion */ |
cicklaus | 0:afb2650fb49a | 472 | WCHAR ff_wtoupper (WCHAR); /* Unicode upper-case conversion */ |
cicklaus | 0:afb2650fb49a | 473 | #if _USE_LFN == 3 /* Memory functions */ |
cicklaus | 0:afb2650fb49a | 474 | void* ff_memalloc (UINT); /* Allocate memory block */ |
cicklaus | 0:afb2650fb49a | 475 | void ff_memfree (void*); /* Free memory block */ |
cicklaus | 0:afb2650fb49a | 476 | #endif |
cicklaus | 0:afb2650fb49a | 477 | #endif |
cicklaus | 0:afb2650fb49a | 478 | |
cicklaus | 0:afb2650fb49a | 479 | /* Sync functions */ |
cicklaus | 0:afb2650fb49a | 480 | #if _FS_REENTRANT |
cicklaus | 0:afb2650fb49a | 481 | int ff_cre_syncobj (BYTE, _SYNC_t*);/* Create a sync object */ |
cicklaus | 0:afb2650fb49a | 482 | int ff_del_syncobj (_SYNC_t); /* Delete a sync object */ |
cicklaus | 0:afb2650fb49a | 483 | int ff_req_grant (_SYNC_t); /* Lock sync object */ |
cicklaus | 0:afb2650fb49a | 484 | void ff_rel_grant (_SYNC_t); /* Unlock sync object */ |
cicklaus | 0:afb2650fb49a | 485 | #endif |
cicklaus | 0:afb2650fb49a | 486 | |
cicklaus | 0:afb2650fb49a | 487 | |
cicklaus | 0:afb2650fb49a | 488 | |
cicklaus | 0:afb2650fb49a | 489 | |
cicklaus | 0:afb2650fb49a | 490 | /*--------------------------------------------------------------*/ |
cicklaus | 0:afb2650fb49a | 491 | /* Flags and offset address */ |
cicklaus | 0:afb2650fb49a | 492 | |
cicklaus | 0:afb2650fb49a | 493 | |
cicklaus | 0:afb2650fb49a | 494 | /* File access control and file status flags (FIL.flag) */ |
cicklaus | 0:afb2650fb49a | 495 | |
cicklaus | 0:afb2650fb49a | 496 | #define FA_READ 0x01 |
cicklaus | 0:afb2650fb49a | 497 | #define FA_OPEN_EXISTING 0x00 |
cicklaus | 0:afb2650fb49a | 498 | #define FA__ERROR 0x80 |
cicklaus | 0:afb2650fb49a | 499 | |
cicklaus | 0:afb2650fb49a | 500 | #if !_FS_READONLY |
cicklaus | 0:afb2650fb49a | 501 | #define FA_WRITE 0x02 |
cicklaus | 0:afb2650fb49a | 502 | #define FA_CREATE_NEW 0x04 |
cicklaus | 0:afb2650fb49a | 503 | #define FA_CREATE_ALWAYS 0x08 |
cicklaus | 0:afb2650fb49a | 504 | #define FA_OPEN_ALWAYS 0x10 |
cicklaus | 0:afb2650fb49a | 505 | #define FA__WRITTEN 0x20 |
cicklaus | 0:afb2650fb49a | 506 | #define FA__DIRTY 0x40 |
cicklaus | 0:afb2650fb49a | 507 | #endif |
cicklaus | 0:afb2650fb49a | 508 | |
cicklaus | 0:afb2650fb49a | 509 | |
cicklaus | 0:afb2650fb49a | 510 | /* FAT sub type (FATFS.fs_type) */ |
cicklaus | 0:afb2650fb49a | 511 | |
cicklaus | 0:afb2650fb49a | 512 | #define FS_FAT12 1 |
cicklaus | 0:afb2650fb49a | 513 | #define FS_FAT16 2 |
cicklaus | 0:afb2650fb49a | 514 | #define FS_FAT32 3 |
cicklaus | 0:afb2650fb49a | 515 | |
cicklaus | 0:afb2650fb49a | 516 | |
cicklaus | 0:afb2650fb49a | 517 | /* File attribute bits for directory entry */ |
cicklaus | 0:afb2650fb49a | 518 | |
cicklaus | 0:afb2650fb49a | 519 | #define AM_RDO 0x01 /* Read only */ |
cicklaus | 0:afb2650fb49a | 520 | #define AM_HID 0x02 /* Hidden */ |
cicklaus | 0:afb2650fb49a | 521 | #define AM_SYS 0x04 /* System */ |
cicklaus | 0:afb2650fb49a | 522 | #define AM_VOL 0x08 /* Volume label */ |
cicklaus | 0:afb2650fb49a | 523 | #define AM_LFN 0x0F /* LFN entry */ |
cicklaus | 0:afb2650fb49a | 524 | #define AM_DIR 0x10 /* Directory */ |
cicklaus | 0:afb2650fb49a | 525 | #define AM_ARC 0x20 /* Archive */ |
cicklaus | 0:afb2650fb49a | 526 | #define AM_MASK 0x3F /* Mask of defined bits */ |
cicklaus | 0:afb2650fb49a | 527 | |
cicklaus | 0:afb2650fb49a | 528 | |
cicklaus | 0:afb2650fb49a | 529 | /* Fast seek function */ |
cicklaus | 0:afb2650fb49a | 530 | #define CREATE_LINKMAP 0xFFFFFFFF |
cicklaus | 0:afb2650fb49a | 531 | |
cicklaus | 0:afb2650fb49a | 532 | |
cicklaus | 0:afb2650fb49a | 533 | /* FatFs refers the members in the FAT structures with byte offset instead of |
cicklaus | 0:afb2650fb49a | 534 | / structure member because there are incompatibility of the packing option |
cicklaus | 0:afb2650fb49a | 535 | / between various compilers. */ |
cicklaus | 0:afb2650fb49a | 536 | |
cicklaus | 0:afb2650fb49a | 537 | #define BS_jmpBoot 0 |
cicklaus | 0:afb2650fb49a | 538 | #define BS_OEMName 3 |
cicklaus | 0:afb2650fb49a | 539 | #define BPB_BytsPerSec 11 |
cicklaus | 0:afb2650fb49a | 540 | #define BPB_SecPerClus 13 |
cicklaus | 0:afb2650fb49a | 541 | #define BPB_RsvdSecCnt 14 |
cicklaus | 0:afb2650fb49a | 542 | #define BPB_NumFATs 16 |
cicklaus | 0:afb2650fb49a | 543 | #define BPB_RootEntCnt 17 |
cicklaus | 0:afb2650fb49a | 544 | #define BPB_TotSec16 19 |
cicklaus | 0:afb2650fb49a | 545 | #define BPB_Media 21 |
cicklaus | 0:afb2650fb49a | 546 | #define BPB_FATSz16 22 |
cicklaus | 0:afb2650fb49a | 547 | #define BPB_SecPerTrk 24 |
cicklaus | 0:afb2650fb49a | 548 | #define BPB_NumHeads 26 |
cicklaus | 0:afb2650fb49a | 549 | #define BPB_HiddSec 28 |
cicklaus | 0:afb2650fb49a | 550 | #define BPB_TotSec32 32 |
cicklaus | 0:afb2650fb49a | 551 | #define BS_55AA 510 |
cicklaus | 0:afb2650fb49a | 552 | |
cicklaus | 0:afb2650fb49a | 553 | #define BS_DrvNum 36 |
cicklaus | 0:afb2650fb49a | 554 | #define BS_BootSig 38 |
cicklaus | 0:afb2650fb49a | 555 | #define BS_VolID 39 |
cicklaus | 0:afb2650fb49a | 556 | #define BS_VolLab 43 |
cicklaus | 0:afb2650fb49a | 557 | #define BS_FilSysType 54 |
cicklaus | 0:afb2650fb49a | 558 | |
cicklaus | 0:afb2650fb49a | 559 | #define BPB_FATSz32 36 |
cicklaus | 0:afb2650fb49a | 560 | #define BPB_ExtFlags 40 |
cicklaus | 0:afb2650fb49a | 561 | #define BPB_FSVer 42 |
cicklaus | 0:afb2650fb49a | 562 | #define BPB_RootClus 44 |
cicklaus | 0:afb2650fb49a | 563 | #define BPB_FSInfo 48 |
cicklaus | 0:afb2650fb49a | 564 | #define BPB_BkBootSec 50 |
cicklaus | 0:afb2650fb49a | 565 | #define BS_DrvNum32 64 |
cicklaus | 0:afb2650fb49a | 566 | #define BS_BootSig32 66 |
cicklaus | 0:afb2650fb49a | 567 | #define BS_VolID32 67 |
cicklaus | 0:afb2650fb49a | 568 | #define BS_VolLab32 71 |
cicklaus | 0:afb2650fb49a | 569 | #define BS_FilSysType32 82 |
cicklaus | 0:afb2650fb49a | 570 | |
cicklaus | 0:afb2650fb49a | 571 | #define FSI_LeadSig 0 |
cicklaus | 0:afb2650fb49a | 572 | #define FSI_StrucSig 484 |
cicklaus | 0:afb2650fb49a | 573 | #define FSI_Free_Count 488 |
cicklaus | 0:afb2650fb49a | 574 | #define FSI_Nxt_Free 492 |
cicklaus | 0:afb2650fb49a | 575 | |
cicklaus | 0:afb2650fb49a | 576 | #define MBR_Table 446 |
cicklaus | 0:afb2650fb49a | 577 | |
cicklaus | 0:afb2650fb49a | 578 | #define DIR_Name 0 |
cicklaus | 0:afb2650fb49a | 579 | #define DIR_Attr 11 |
cicklaus | 0:afb2650fb49a | 580 | #define DIR_NTres 12 |
cicklaus | 0:afb2650fb49a | 581 | #define DIR_CrtTime 14 |
cicklaus | 0:afb2650fb49a | 582 | #define DIR_CrtDate 16 |
cicklaus | 0:afb2650fb49a | 583 | #define DIR_FstClusHI 20 |
cicklaus | 0:afb2650fb49a | 584 | #define DIR_WrtTime 22 |
cicklaus | 0:afb2650fb49a | 585 | #define DIR_WrtDate 24 |
cicklaus | 0:afb2650fb49a | 586 | #define DIR_FstClusLO 26 |
cicklaus | 0:afb2650fb49a | 587 | #define DIR_FileSize 28 |
cicklaus | 0:afb2650fb49a | 588 | #define LDIR_Ord 0 |
cicklaus | 0:afb2650fb49a | 589 | #define LDIR_Attr 11 |
cicklaus | 0:afb2650fb49a | 590 | #define LDIR_Type 12 |
cicklaus | 0:afb2650fb49a | 591 | #define LDIR_Chksum 13 |
cicklaus | 0:afb2650fb49a | 592 | #define LDIR_FstClusLO 26 |
cicklaus | 0:afb2650fb49a | 593 | |
cicklaus | 0:afb2650fb49a | 594 | |
cicklaus | 0:afb2650fb49a | 595 | |
cicklaus | 0:afb2650fb49a | 596 | /*--------------------------------*/ |
cicklaus | 0:afb2650fb49a | 597 | /* Multi-byte word access macros */ |
cicklaus | 0:afb2650fb49a | 598 | |
cicklaus | 0:afb2650fb49a | 599 | #if _WORD_ACCESS == 1 /* Enable word access to the FAT structure */ |
cicklaus | 0:afb2650fb49a | 600 | #define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr)) |
cicklaus | 0:afb2650fb49a | 601 | #define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr)) |
cicklaus | 0:afb2650fb49a | 602 | #define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val) |
cicklaus | 0:afb2650fb49a | 603 | #define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val) |
cicklaus | 0:afb2650fb49a | 604 | #else /* Use byte-by-byte access to the FAT structure */ |
cicklaus | 0:afb2650fb49a | 605 | #define LD_WORD(ptr) (WORD)(((WORD)*(BYTE*)((ptr)+1)<<8)|(WORD)*(BYTE*)(ptr)) |
cicklaus | 0:afb2650fb49a | 606 | #define LD_DWORD(ptr) (DWORD)(((DWORD)*(BYTE*)((ptr)+3)<<24)|((DWORD)*(BYTE*)((ptr)+2)<<16)|((WORD)*(BYTE*)((ptr)+1)<<8)|*(BYTE*)(ptr)) |
cicklaus | 0:afb2650fb49a | 607 | #define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8) |
cicklaus | 0:afb2650fb49a | 608 | #define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8); *(BYTE*)((ptr)+2)=(BYTE)((DWORD)(val)>>16); *(BYTE*)((ptr)+3)=(BYTE)((DWORD)(val)>>24) |
cicklaus | 0:afb2650fb49a | 609 | #endif |
cicklaus | 0:afb2650fb49a | 610 | |
cicklaus | 0:afb2650fb49a | 611 | #ifdef __cplusplus |
cicklaus | 0:afb2650fb49a | 612 | } |
cicklaus | 0:afb2650fb49a | 613 | #endif |
cicklaus | 0:afb2650fb49a | 614 | |
cicklaus | 0:afb2650fb49a | 615 | #endif /* _FATFS */ |