Jonne Valola / PokittoLib Featured

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!
Committer:
Pokitto
Date:
Wed Jun 27 13:14:54 2018 +0000
Revision:
50:ca94812a17b6
Parent:
0:e8b8f36b4505
Lockup at startup due to missing EEPROM values fixed

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pokitto 0:e8b8f36b4505 1 /*---------------------------------------------------------------------------/
Pokitto 0:e8b8f36b4505 2 / Petit FatFs - FAT file system module include file R0.02 (C)ChaN, 2009
Pokitto 0:e8b8f36b4505 3 /----------------------------------------------------------------------------/
Pokitto 0:e8b8f36b4505 4 / Petit FatFs module is an open source software to implement FAT file system to
Pokitto 0:e8b8f36b4505 5 / small embedded systems. This is a free software and is opened for education,
Pokitto 0:e8b8f36b4505 6 / research and commercial developments under license policy of following trems.
Pokitto 0:e8b8f36b4505 7 /
Pokitto 0:e8b8f36b4505 8 / Copyright (C) 2009, ChaN, all right reserved.
Pokitto 0:e8b8f36b4505 9 /
Pokitto 0:e8b8f36b4505 10 / * The Petit FatFs module is a free software and there is NO WARRANTY.
Pokitto 0:e8b8f36b4505 11 / * No restriction on use. You can use, modify and redistribute it for
Pokitto 0:e8b8f36b4505 12 / personal, non-profit or commercial use UNDER YOUR RESPONSIBILITY.
Pokitto 0:e8b8f36b4505 13 / * Redistributions of source code must retain the above copyright notice.
Pokitto 0:e8b8f36b4505 14 /
Pokitto 0:e8b8f36b4505 15 /----------------------------------------------------------------------------*/
Pokitto 0:e8b8f36b4505 16
Pokitto 0:e8b8f36b4505 17 #include "integer.h"
Pokitto 0:e8b8f36b4505 18
Pokitto 0:e8b8f36b4505 19 /*---------------------------------------------------------------------------/
Pokitto 0:e8b8f36b4505 20 / Petit FatFs Configuration Options
Pokitto 0:e8b8f36b4505 21 /
Pokitto 0:e8b8f36b4505 22 / CAUTION! Do not forget to make clean the project after any changes to
Pokitto 0:e8b8f36b4505 23 / the configuration options.
Pokitto 0:e8b8f36b4505 24 /
Pokitto 0:e8b8f36b4505 25 /----------------------------------------------------------------------------*/
Pokitto 0:e8b8f36b4505 26 #ifndef _FATFS
Pokitto 0:e8b8f36b4505 27 #define _FATFS
Pokitto 0:e8b8f36b4505 28
Pokitto 0:e8b8f36b4505 29 #define _USE_READ 1 /* pf_read(): 0:Remove ,1:Enable */
Pokitto 0:e8b8f36b4505 30
Pokitto 0:e8b8f36b4505 31 #define _USE_DIR 1 /* pf_opendir() and pf_readdir(): 0:Remove ,1:Enable */
Pokitto 0:e8b8f36b4505 32
Pokitto 0:e8b8f36b4505 33 #define _USE_LSEEK 1 /* pf_lseek(): 0:Remove ,1:Enable */
Pokitto 0:e8b8f36b4505 34
Pokitto 0:e8b8f36b4505 35 #define _USE_WRITE 1 /* pf_write(): 0:Remove ,1:Enable */
Pokitto 0:e8b8f36b4505 36
Pokitto 0:e8b8f36b4505 37 #define _FS_FAT32 1 /* 0:Supports FAT12/16 only, 1:Enable FAT32 supprt */
Pokitto 0:e8b8f36b4505 38
Pokitto 0:e8b8f36b4505 39
Pokitto 0:e8b8f36b4505 40 #define _CODE_PAGE 1
Pokitto 0:e8b8f36b4505 41 /* Defines which code page is used for path name. Supported code pages are:
Pokitto 0:e8b8f36b4505 42 / 932, 936, 949, 950, 437, 720, 737, 775, 850, 852, 855, 857, 858, 862, 866,
Pokitto 0:e8b8f36b4505 43 / 874, 1250, 1251, 1252, 1253, 1254, 1255, 1257, 1258 and 1 (ASCII only).
Pokitto 0:e8b8f36b4505 44 / SBCS configurations except for 1 requiers a case conversion table. This
Pokitto 0:e8b8f36b4505 45 / might occupy 128 bytes on the RAM on some platforms, e.g. avr-gcc. */
Pokitto 0:e8b8f36b4505 46
Pokitto 0:e8b8f36b4505 47
Pokitto 0:e8b8f36b4505 48 #define _WORD_ACCESS 0 //jonne 1 gives hard fault with lpc11u68
Pokitto 0:e8b8f36b4505 49 /* The _WORD_ACCESS option defines which access method is used to the word
Pokitto 0:e8b8f36b4505 50 / data in the FAT structure.
Pokitto 0:e8b8f36b4505 51 /
Pokitto 0:e8b8f36b4505 52 / 0: Byte-by-byte access. Always compatible with all platforms.
Pokitto 0:e8b8f36b4505 53 / 1: Word access. Do not choose this unless following condition is met.
Pokitto 0:e8b8f36b4505 54 /
Pokitto 0:e8b8f36b4505 55 / When the byte order on the memory is big-endian or address miss-aligned
Pokitto 0:e8b8f36b4505 56 / word access results incorrect behavior, the _WORD_ACCESS must be set to 0.
Pokitto 0:e8b8f36b4505 57 / If it is not the case, the value can also be set to 1 to improve the
Pokitto 0:e8b8f36b4505 58 / performance and code efficiency. */
Pokitto 0:e8b8f36b4505 59
Pokitto 0:e8b8f36b4505 60
Pokitto 0:e8b8f36b4505 61 /* End of configuration options. Do not change followings without care. */
Pokitto 0:e8b8f36b4505 62 /*--------------------------------------------------------------------------*/
Pokitto 0:e8b8f36b4505 63
Pokitto 0:e8b8f36b4505 64 #if _FS_FAT32
Pokitto 0:e8b8f36b4505 65 #define CLUST DWORD
Pokitto 0:e8b8f36b4505 66 #else
Pokitto 0:e8b8f36b4505 67 #define CLUST WORD
Pokitto 0:e8b8f36b4505 68 #endif
Pokitto 0:e8b8f36b4505 69
Pokitto 0:e8b8f36b4505 70
Pokitto 0:e8b8f36b4505 71 /* File system object structure */
Pokitto 0:e8b8f36b4505 72
Pokitto 0:e8b8f36b4505 73 typedef struct _FATFS_ {
Pokitto 0:e8b8f36b4505 74 BYTE fs_type; /* FAT sub type */
Pokitto 0:e8b8f36b4505 75 BYTE csize; /* Number of sectors per cluster */
Pokitto 0:e8b8f36b4505 76 BYTE flag; /* File status flags */
Pokitto 0:e8b8f36b4505 77 BYTE csect; /* File sector address in the cluster */
Pokitto 0:e8b8f36b4505 78 WORD n_rootdir; /* Number of root directory entries (0 on FAT32) */
Pokitto 0:e8b8f36b4505 79 BYTE* buf; /* Pointer to the disk access buffer */
Pokitto 0:e8b8f36b4505 80 CLUST max_clust; /* Maximum cluster# + 1. Number of clusters is max_clust - 2 */
Pokitto 0:e8b8f36b4505 81 DWORD fatbase; /* FAT start sector */
Pokitto 0:e8b8f36b4505 82 DWORD dirbase; /* Root directory start sector (Cluster# on FAT32) */
Pokitto 0:e8b8f36b4505 83 DWORD database; /* Data start sector */
Pokitto 0:e8b8f36b4505 84 DWORD fptr; /* File R/W pointer */
Pokitto 0:e8b8f36b4505 85 DWORD fsize; /* File size */
Pokitto 0:e8b8f36b4505 86 CLUST org_clust; /* File start cluster */
Pokitto 0:e8b8f36b4505 87 CLUST curr_clust; /* File current cluster */
Pokitto 0:e8b8f36b4505 88 DWORD dsect; /* File current data sector */
Pokitto 0:e8b8f36b4505 89 } FATFS;
Pokitto 0:e8b8f36b4505 90
Pokitto 0:e8b8f36b4505 91
Pokitto 0:e8b8f36b4505 92
Pokitto 0:e8b8f36b4505 93 /* Directory object structure */
Pokitto 0:e8b8f36b4505 94
Pokitto 0:e8b8f36b4505 95 typedef struct _DIR_ {
Pokitto 0:e8b8f36b4505 96 WORD index; /* Current read/write index number */
Pokitto 0:e8b8f36b4505 97 BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
Pokitto 0:e8b8f36b4505 98 CLUST sclust; /* Table start cluster (0:Static table) */
Pokitto 0:e8b8f36b4505 99 CLUST clust; /* Current cluster */
Pokitto 0:e8b8f36b4505 100 DWORD sect; /* Current sector */
Pokitto 0:e8b8f36b4505 101 } FATDIR;
Pokitto 0:e8b8f36b4505 102
Pokitto 0:e8b8f36b4505 103
Pokitto 0:e8b8f36b4505 104
Pokitto 0:e8b8f36b4505 105 /* File status structure */
Pokitto 0:e8b8f36b4505 106
Pokitto 0:e8b8f36b4505 107 typedef struct _FILINFO_ {
Pokitto 0:e8b8f36b4505 108 DWORD fsize; /* File size */
Pokitto 0:e8b8f36b4505 109 WORD fdate; /* Last modified date */
Pokitto 0:e8b8f36b4505 110 WORD ftime; /* Last modified time */
Pokitto 0:e8b8f36b4505 111 BYTE fattrib; /* Attribute */
Pokitto 0:e8b8f36b4505 112 char fname[13]; /* File name */
Pokitto 0:e8b8f36b4505 113 } FILINFO;
Pokitto 0:e8b8f36b4505 114
Pokitto 0:e8b8f36b4505 115
Pokitto 0:e8b8f36b4505 116
Pokitto 0:e8b8f36b4505 117 /* File function return code (FRESULT) */
Pokitto 0:e8b8f36b4505 118
Pokitto 0:e8b8f36b4505 119 typedef enum {
Pokitto 0:e8b8f36b4505 120 FR_OK = 0, /* 0 */
Pokitto 0:e8b8f36b4505 121 FR_DISK_ERR, /* 1 */
Pokitto 0:e8b8f36b4505 122 FR_NOT_READY, /* 2 */
Pokitto 0:e8b8f36b4505 123 FR_NO_FILE, /* 3 */
Pokitto 0:e8b8f36b4505 124 FR_NO_PATH, /* 4 */
Pokitto 0:e8b8f36b4505 125 FR_NOT_OPENED, /* 5 */
Pokitto 0:e8b8f36b4505 126 FR_NOT_ENABLED, /* 6 */
Pokitto 0:e8b8f36b4505 127 FR_NO_FILESYSTEM /* 7 */
Pokitto 0:e8b8f36b4505 128 } FRESULT;
Pokitto 0:e8b8f36b4505 129
Pokitto 0:e8b8f36b4505 130
Pokitto 0:e8b8f36b4505 131
Pokitto 0:e8b8f36b4505 132 /*--------------------------------------------------------------*/
Pokitto 0:e8b8f36b4505 133 /* Petit FatFs module application interface */
Pokitto 0:e8b8f36b4505 134
Pokitto 0:e8b8f36b4505 135 FRESULT pf_mount (FATFS*); /* Mount/Unmount a logical drive */
Pokitto 0:e8b8f36b4505 136 FRESULT pf_open (const char*); /* Open a file */
Pokitto 0:e8b8f36b4505 137 FRESULT pf_read (void*, WORD, WORD*); /* Read data from the open file */
Pokitto 0:e8b8f36b4505 138 FRESULT pf_write (const void*, WORD, WORD*); /* Write data to the open file */
Pokitto 0:e8b8f36b4505 139 FRESULT pf_lseek (DWORD); /* Move file pointer of the open file */
Pokitto 0:e8b8f36b4505 140 FRESULT pf_opendir (FATDIR*, const char*); /* Open a directory */
Pokitto 0:e8b8f36b4505 141 FRESULT pf_readdir (FATDIR*, FILINFO*); /* Read a directory item from the open directory */
Pokitto 0:e8b8f36b4505 142
Pokitto 0:e8b8f36b4505 143
Pokitto 0:e8b8f36b4505 144
Pokitto 0:e8b8f36b4505 145 /*--------------------------------------------------------------*/
Pokitto 0:e8b8f36b4505 146 /* Flags and offset address */
Pokitto 0:e8b8f36b4505 147
Pokitto 0:e8b8f36b4505 148 /* File status flag (FATFS.flag) */
Pokitto 0:e8b8f36b4505 149
Pokitto 0:e8b8f36b4505 150 #define FA_OPENED 0x01
Pokitto 0:e8b8f36b4505 151 #define FA_WPRT 0x02
Pokitto 0:e8b8f36b4505 152 #define FA__WIP 0x40
Pokitto 0:e8b8f36b4505 153
Pokitto 0:e8b8f36b4505 154
Pokitto 0:e8b8f36b4505 155 /* FAT sub type (FATFS.fs_type) */
Pokitto 0:e8b8f36b4505 156
Pokitto 0:e8b8f36b4505 157 #define FS_FAT12 1
Pokitto 0:e8b8f36b4505 158 #define FS_FAT16 2
Pokitto 0:e8b8f36b4505 159 #define FS_FAT32 3
Pokitto 0:e8b8f36b4505 160
Pokitto 0:e8b8f36b4505 161
Pokitto 0:e8b8f36b4505 162 /* File attribute bits for directory entry */
Pokitto 0:e8b8f36b4505 163
Pokitto 0:e8b8f36b4505 164 #define AM_RDO 0x01 /* Read only */
Pokitto 0:e8b8f36b4505 165 #define AM_HID 0x02 /* Hidden */
Pokitto 0:e8b8f36b4505 166 #define AM_SYS 0x04 /* System */
Pokitto 0:e8b8f36b4505 167 #define AM_VOL 0x08 /* Volume label */
Pokitto 0:e8b8f36b4505 168 #define AM_LFN 0x0F /* LFN entry */
Pokitto 0:e8b8f36b4505 169 #define AM_DIR 0x10 /* Directory */
Pokitto 0:e8b8f36b4505 170 #define AM_ARC 0x20 /* Archive */
Pokitto 0:e8b8f36b4505 171 #define AM_MASK 0x3F /* Mask of defined bits */
Pokitto 0:e8b8f36b4505 172
Pokitto 0:e8b8f36b4505 173
Pokitto 0:e8b8f36b4505 174 /* FatFs refers the members in the FAT structures with byte offset instead
Pokitto 0:e8b8f36b4505 175 / of structure member because there are incompatibility of the packing option
Pokitto 0:e8b8f36b4505 176 / between various compilers. */
Pokitto 0:e8b8f36b4505 177
Pokitto 0:e8b8f36b4505 178 #define BS_jmpBoot 0
Pokitto 0:e8b8f36b4505 179 #define BS_OEMName 3
Pokitto 0:e8b8f36b4505 180 #define BPB_BytsPerSec 11
Pokitto 0:e8b8f36b4505 181 #define BPB_SecPerClus 13
Pokitto 0:e8b8f36b4505 182 #define BPB_RsvdSecCnt 14
Pokitto 0:e8b8f36b4505 183 #define BPB_NumFATs 16
Pokitto 0:e8b8f36b4505 184 #define BPB_RootEntCnt 17
Pokitto 0:e8b8f36b4505 185 #define BPB_TotSec16 19
Pokitto 0:e8b8f36b4505 186 #define BPB_Media 21
Pokitto 0:e8b8f36b4505 187 #define BPB_FATSz16 22
Pokitto 0:e8b8f36b4505 188 #define BPB_SecPerTrk 24
Pokitto 0:e8b8f36b4505 189 #define BPB_NumHeads 26
Pokitto 0:e8b8f36b4505 190 #define BPB_HiddSec 28
Pokitto 0:e8b8f36b4505 191 #define BPB_TotSec32 32
Pokitto 0:e8b8f36b4505 192 #define BS_55AA 510
Pokitto 0:e8b8f36b4505 193
Pokitto 0:e8b8f36b4505 194 #define BS_DrvNum 36
Pokitto 0:e8b8f36b4505 195 #define BS_BootSig 38
Pokitto 0:e8b8f36b4505 196 #define BS_VolID 39
Pokitto 0:e8b8f36b4505 197 #define BS_VolLab 43
Pokitto 0:e8b8f36b4505 198 #define BS_FilSysType 54
Pokitto 0:e8b8f36b4505 199
Pokitto 0:e8b8f36b4505 200 #define BPB_FATSz32 36
Pokitto 0:e8b8f36b4505 201 #define BPB_ExtFlags 40
Pokitto 0:e8b8f36b4505 202 #define BPB_FSVer 42
Pokitto 0:e8b8f36b4505 203 #define BPB_RootClus 44
Pokitto 0:e8b8f36b4505 204 #define BPB_FSInfo 48
Pokitto 0:e8b8f36b4505 205 #define BPB_BkBootSec 50
Pokitto 0:e8b8f36b4505 206 #define BS_DrvNum32 64
Pokitto 0:e8b8f36b4505 207 #define BS_BootSig32 66
Pokitto 0:e8b8f36b4505 208 #define BS_VolID32 67
Pokitto 0:e8b8f36b4505 209 #define BS_VolLab32 71
Pokitto 0:e8b8f36b4505 210 #define BS_FilSysType32 82
Pokitto 0:e8b8f36b4505 211
Pokitto 0:e8b8f36b4505 212 #define MBR_Table 446
Pokitto 0:e8b8f36b4505 213
Pokitto 0:e8b8f36b4505 214 #define DIR_Name 0
Pokitto 0:e8b8f36b4505 215 #define DIR_Attr 11
Pokitto 0:e8b8f36b4505 216 #define DIR_NTres 12
Pokitto 0:e8b8f36b4505 217 #define DIR_CrtTime 14
Pokitto 0:e8b8f36b4505 218 #define DIR_CrtDate 16
Pokitto 0:e8b8f36b4505 219 #define DIR_FstClusHI 20
Pokitto 0:e8b8f36b4505 220 #define DIR_WrtTime 22
Pokitto 0:e8b8f36b4505 221 #define DIR_WrtDate 24
Pokitto 0:e8b8f36b4505 222 #define DIR_FstClusLO 26
Pokitto 0:e8b8f36b4505 223 #define DIR_FileSize 28
Pokitto 0:e8b8f36b4505 224
Pokitto 0:e8b8f36b4505 225
Pokitto 0:e8b8f36b4505 226
Pokitto 0:e8b8f36b4505 227 /*--------------------------------*/
Pokitto 0:e8b8f36b4505 228 /* Multi-byte word access macros */
Pokitto 0:e8b8f36b4505 229
Pokitto 0:e8b8f36b4505 230 #if _WORD_ACCESS == 1 /* Enable word access to the FAT structure */
Pokitto 0:e8b8f36b4505 231 #define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr))
Pokitto 0:e8b8f36b4505 232 #define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr))
Pokitto 0:e8b8f36b4505 233 #define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val)
Pokitto 0:e8b8f36b4505 234 #define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val)
Pokitto 0:e8b8f36b4505 235 #else /* Use byte-by-byte access to the FAT structure */
Pokitto 0:e8b8f36b4505 236 #define LD_WORD(ptr) (WORD)(((WORD)*(BYTE*)((ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))
Pokitto 0:e8b8f36b4505 237 #define LD_DWORD(ptr) (DWORD)(((DWORD)*(BYTE*)((ptr)+3)<<24)|((DWORD)*(BYTE*)((ptr)+2)<<16)|((WORD)*(BYTE*)((ptr)+1)<<8)|*(BYTE*)(ptr))
Pokitto 0:e8b8f36b4505 238 #define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8)
Pokitto 0:e8b8f36b4505 239 #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)
Pokitto 0:e8b8f36b4505 240 #endif
Pokitto 0:e8b8f36b4505 241
Pokitto 0:e8b8f36b4505 242
Pokitto 0:e8b8f36b4505 243 /*--------------------------------------------------------*/
Pokitto 0:e8b8f36b4505 244 /* DBCS code ranges and SBCS extend char conversion table */
Pokitto 0:e8b8f36b4505 245
Pokitto 0:e8b8f36b4505 246 #if _CODE_PAGE == 932 /* Japanese Shift-JIS */
Pokitto 0:e8b8f36b4505 247 #define _DF1S 0x81 /* DBC 1st byte range 1 start */
Pokitto 0:e8b8f36b4505 248 #define _DF1E 0x9F /* DBC 1st byte range 1 end */
Pokitto 0:e8b8f36b4505 249 #define _DF2S 0xE0 /* DBC 1st byte range 2 start */
Pokitto 0:e8b8f36b4505 250 #define _DF2E 0xFC /* DBC 1st byte range 2 end */
Pokitto 0:e8b8f36b4505 251 #define _DS1S 0x40 /* DBC 2nd byte range 1 start */
Pokitto 0:e8b8f36b4505 252 #define _DS1E 0x7E /* DBC 2nd byte range 1 end */
Pokitto 0:e8b8f36b4505 253 #define _DS2S 0x80 /* DBC 2nd byte range 2 start */
Pokitto 0:e8b8f36b4505 254 #define _DS2E 0xFC /* DBC 2nd byte range 2 end */
Pokitto 0:e8b8f36b4505 255
Pokitto 0:e8b8f36b4505 256 #elif _CODE_PAGE == 936 /* Simplified Chinese GBK */
Pokitto 0:e8b8f36b4505 257 #define _DF1S 0x81
Pokitto 0:e8b8f36b4505 258 #define _DF1E 0xFE
Pokitto 0:e8b8f36b4505 259 #define _DS1S 0x40
Pokitto 0:e8b8f36b4505 260 #define _DS1E 0x7E
Pokitto 0:e8b8f36b4505 261 #define _DS2S 0x80
Pokitto 0:e8b8f36b4505 262 #define _DS2E 0xFE
Pokitto 0:e8b8f36b4505 263
Pokitto 0:e8b8f36b4505 264 #elif _CODE_PAGE == 949 /* Korean */
Pokitto 0:e8b8f36b4505 265 #define _DF1S 0x81
Pokitto 0:e8b8f36b4505 266 #define _DF1E 0xFE
Pokitto 0:e8b8f36b4505 267 #define _DS1S 0x41
Pokitto 0:e8b8f36b4505 268 #define _DS1E 0x5A
Pokitto 0:e8b8f36b4505 269 #define _DS2S 0x61
Pokitto 0:e8b8f36b4505 270 #define _DS2E 0x7A
Pokitto 0:e8b8f36b4505 271 #define _DS3S 0x81
Pokitto 0:e8b8f36b4505 272 #define _DS3E 0xFE
Pokitto 0:e8b8f36b4505 273
Pokitto 0:e8b8f36b4505 274 #elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */
Pokitto 0:e8b8f36b4505 275 #define _DF1S 0x81
Pokitto 0:e8b8f36b4505 276 #define _DF1E 0xFE
Pokitto 0:e8b8f36b4505 277 #define _DS1S 0x40
Pokitto 0:e8b8f36b4505 278 #define _DS1E 0x7E
Pokitto 0:e8b8f36b4505 279 #define _DS2S 0xA1
Pokitto 0:e8b8f36b4505 280 #define _DS2E 0xFE
Pokitto 0:e8b8f36b4505 281
Pokitto 0:e8b8f36b4505 282 #elif _CODE_PAGE == 437 /* U.S. (OEM) */
Pokitto 0:e8b8f36b4505 283 #define _DF1S 0
Pokitto 0:e8b8f36b4505 284 #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, \
Pokitto 0:e8b8f36b4505 285 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, \
Pokitto 0:e8b8f36b4505 286 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, \
Pokitto 0:e8b8f36b4505 287 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}
Pokitto 0:e8b8f36b4505 288
Pokitto 0:e8b8f36b4505 289 #elif _CODE_PAGE == 720 /* Arabic (OEM) */
Pokitto 0:e8b8f36b4505 290 #define _DF1S 0
Pokitto 0:e8b8f36b4505 291 #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, \
Pokitto 0:e8b8f36b4505 292 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, \
Pokitto 0:e8b8f36b4505 293 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, \
Pokitto 0:e8b8f36b4505 294 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}
Pokitto 0:e8b8f36b4505 295
Pokitto 0:e8b8f36b4505 296 #elif _CODE_PAGE == 737 /* Greek (OEM) */
Pokitto 0:e8b8f36b4505 297 #define _DF1S 0
Pokitto 0:e8b8f36b4505 298 #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, \
Pokitto 0:e8b8f36b4505 299 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, \
Pokitto 0:e8b8f36b4505 300 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, \
Pokitto 0:e8b8f36b4505 301 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}
Pokitto 0:e8b8f36b4505 302
Pokitto 0:e8b8f36b4505 303 #elif _CODE_PAGE == 775 /* Baltic (OEM) */
Pokitto 0:e8b8f36b4505 304 #define _DF1S 0
Pokitto 0:e8b8f36b4505 305 #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, \
Pokitto 0:e8b8f36b4505 306 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, \
Pokitto 0:e8b8f36b4505 307 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, \
Pokitto 0:e8b8f36b4505 308 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}
Pokitto 0:e8b8f36b4505 309
Pokitto 0:e8b8f36b4505 310 #elif _CODE_PAGE == 850 /* Multilingual Latin 1 (OEM) */
Pokitto 0:e8b8f36b4505 311 #define _DF1S 0
Pokitto 0:e8b8f36b4505 312 #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, \
Pokitto 0:e8b8f36b4505 313 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, \
Pokitto 0:e8b8f36b4505 314 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, \
Pokitto 0:e8b8f36b4505 315 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}
Pokitto 0:e8b8f36b4505 316
Pokitto 0:e8b8f36b4505 317 #elif _CODE_PAGE == 852 /* Latin 2 (OEM) */
Pokitto 0:e8b8f36b4505 318 #define _DF1S 0
Pokitto 0:e8b8f36b4505 319 #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, \
Pokitto 0:e8b8f36b4505 320 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, \
Pokitto 0:e8b8f36b4505 321 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, \
Pokitto 0:e8b8f36b4505 322 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}
Pokitto 0:e8b8f36b4505 323
Pokitto 0:e8b8f36b4505 324 #elif _CODE_PAGE == 855 /* Cyrillic (OEM) */
Pokitto 0:e8b8f36b4505 325 #define _DF1S 0
Pokitto 0:e8b8f36b4505 326 #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, \
Pokitto 0:e8b8f36b4505 327 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, \
Pokitto 0:e8b8f36b4505 328 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, \
Pokitto 0:e8b8f36b4505 329 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}
Pokitto 0:e8b8f36b4505 330
Pokitto 0:e8b8f36b4505 331 #elif _CODE_PAGE == 857 /* Turkish (OEM) */
Pokitto 0:e8b8f36b4505 332 #define _DF1S 0
Pokitto 0:e8b8f36b4505 333 #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, \
Pokitto 0:e8b8f36b4505 334 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, \
Pokitto 0:e8b8f36b4505 335 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, \
Pokitto 0:e8b8f36b4505 336 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}
Pokitto 0:e8b8f36b4505 337
Pokitto 0:e8b8f36b4505 338 #elif _CODE_PAGE == 858 /* Multilingual Latin 1 + Euro (OEM) */
Pokitto 0:e8b8f36b4505 339 #define _DF1S 0
Pokitto 0:e8b8f36b4505 340 #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, \
Pokitto 0:e8b8f36b4505 341 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, \
Pokitto 0:e8b8f36b4505 342 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, \
Pokitto 0:e8b8f36b4505 343 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}
Pokitto 0:e8b8f36b4505 344
Pokitto 0:e8b8f36b4505 345 #elif _CODE_PAGE == 862 /* Hebrew (OEM) */
Pokitto 0:e8b8f36b4505 346 #define _DF1S 0
Pokitto 0:e8b8f36b4505 347 #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, \
Pokitto 0:e8b8f36b4505 348 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, \
Pokitto 0:e8b8f36b4505 349 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, \
Pokitto 0:e8b8f36b4505 350 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}
Pokitto 0:e8b8f36b4505 351
Pokitto 0:e8b8f36b4505 352 #elif _CODE_PAGE == 866 /* Russian (OEM) */
Pokitto 0:e8b8f36b4505 353 #define _DF1S 0
Pokitto 0:e8b8f36b4505 354 #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, \
Pokitto 0:e8b8f36b4505 355 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, \
Pokitto 0:e8b8f36b4505 356 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, \
Pokitto 0:e8b8f36b4505 357 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}
Pokitto 0:e8b8f36b4505 358
Pokitto 0:e8b8f36b4505 359 #elif _CODE_PAGE == 874 /* Thai (OEM, Windows) */
Pokitto 0:e8b8f36b4505 360 #define _DF1S 0
Pokitto 0:e8b8f36b4505 361 #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, \
Pokitto 0:e8b8f36b4505 362 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, \
Pokitto 0:e8b8f36b4505 363 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, \
Pokitto 0:e8b8f36b4505 364 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}
Pokitto 0:e8b8f36b4505 365
Pokitto 0:e8b8f36b4505 366 #elif _CODE_PAGE == 1250 /* Central Europe (Windows) */
Pokitto 0:e8b8f36b4505 367 #define _DF1S 0
Pokitto 0:e8b8f36b4505 368 #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, \
Pokitto 0:e8b8f36b4505 369 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, \
Pokitto 0:e8b8f36b4505 370 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, \
Pokitto 0:e8b8f36b4505 371 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}
Pokitto 0:e8b8f36b4505 372
Pokitto 0:e8b8f36b4505 373 #elif _CODE_PAGE == 1251 /* Cyrillic (Windows) */
Pokitto 0:e8b8f36b4505 374 #define _DF1S 0
Pokitto 0:e8b8f36b4505 375 #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, \
Pokitto 0:e8b8f36b4505 376 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, \
Pokitto 0:e8b8f36b4505 377 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, \
Pokitto 0:e8b8f36b4505 378 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}
Pokitto 0:e8b8f36b4505 379
Pokitto 0:e8b8f36b4505 380 #elif _CODE_PAGE == 1252 /* Latin 1 (Windows) */
Pokitto 0:e8b8f36b4505 381 #define _DF1S 0
Pokitto 0:e8b8f36b4505 382 #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, \
Pokitto 0:e8b8f36b4505 383 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, \
Pokitto 0:e8b8f36b4505 384 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, \
Pokitto 0:e8b8f36b4505 385 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}
Pokitto 0:e8b8f36b4505 386
Pokitto 0:e8b8f36b4505 387 #elif _CODE_PAGE == 1253 /* Greek (Windows) */
Pokitto 0:e8b8f36b4505 388 #define _DF1S 0
Pokitto 0:e8b8f36b4505 389 #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, \
Pokitto 0:e8b8f36b4505 390 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, \
Pokitto 0:e8b8f36b4505 391 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, \
Pokitto 0:e8b8f36b4505 392 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}
Pokitto 0:e8b8f36b4505 393
Pokitto 0:e8b8f36b4505 394 #elif _CODE_PAGE == 1254 /* Turkish (Windows) */
Pokitto 0:e8b8f36b4505 395 #define _DF1S 0
Pokitto 0:e8b8f36b4505 396 #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, \
Pokitto 0:e8b8f36b4505 397 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, \
Pokitto 0:e8b8f36b4505 398 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, \
Pokitto 0:e8b8f36b4505 399 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}
Pokitto 0:e8b8f36b4505 400
Pokitto 0:e8b8f36b4505 401 #elif _CODE_PAGE == 1255 /* Hebrew (Windows) */
Pokitto 0:e8b8f36b4505 402 #define _DF1S 0
Pokitto 0:e8b8f36b4505 403 #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, \
Pokitto 0:e8b8f36b4505 404 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, \
Pokitto 0:e8b8f36b4505 405 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, \
Pokitto 0:e8b8f36b4505 406 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}
Pokitto 0:e8b8f36b4505 407
Pokitto 0:e8b8f36b4505 408 #elif _CODE_PAGE == 1256 /* Arabic (Windows) */
Pokitto 0:e8b8f36b4505 409 #define _DF1S 0
Pokitto 0:e8b8f36b4505 410 #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, \
Pokitto 0:e8b8f36b4505 411 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, \
Pokitto 0:e8b8f36b4505 412 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, \
Pokitto 0:e8b8f36b4505 413 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}
Pokitto 0:e8b8f36b4505 414
Pokitto 0:e8b8f36b4505 415 #elif _CODE_PAGE == 1257 /* Baltic (Windows) */
Pokitto 0:e8b8f36b4505 416 #define _DF1S 0
Pokitto 0:e8b8f36b4505 417 #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, \
Pokitto 0:e8b8f36b4505 418 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, \
Pokitto 0:e8b8f36b4505 419 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, \
Pokitto 0:e8b8f36b4505 420 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}
Pokitto 0:e8b8f36b4505 421
Pokitto 0:e8b8f36b4505 422 #elif _CODE_PAGE == 1258 /* Vietnam (OEM, Windows) */
Pokitto 0:e8b8f36b4505 423 #define _DF1S 0
Pokitto 0:e8b8f36b4505 424 #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, \
Pokitto 0:e8b8f36b4505 425 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, \
Pokitto 0:e8b8f36b4505 426 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, \
Pokitto 0:e8b8f36b4505 427 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}
Pokitto 0:e8b8f36b4505 428
Pokitto 0:e8b8f36b4505 429 #elif _CODE_PAGE == 1 /* ASCII (for only non-LFN cfg) */
Pokitto 0:e8b8f36b4505 430 #define _DF1S 0
Pokitto 0:e8b8f36b4505 431
Pokitto 0:e8b8f36b4505 432 #else
Pokitto 0:e8b8f36b4505 433 #error Unknown code page
Pokitto 0:e8b8f36b4505 434
Pokitto 0:e8b8f36b4505 435 #endif
Pokitto 0:e8b8f36b4505 436
Pokitto 0:e8b8f36b4505 437
Pokitto 0:e8b8f36b4505 438
Pokitto 0:e8b8f36b4505 439 /* Character code support macros */
Pokitto 0:e8b8f36b4505 440
Pokitto 0:e8b8f36b4505 441 #define IsUpper(c) (((c)>='A')&&((c)<='Z'))
Pokitto 0:e8b8f36b4505 442 #define IsLower(c) (((c)>='a')&&((c)<='z'))
Pokitto 0:e8b8f36b4505 443
Pokitto 0:e8b8f36b4505 444 #if _DF1S /* DBCS configuration */
Pokitto 0:e8b8f36b4505 445
Pokitto 0:e8b8f36b4505 446 #ifdef _DF2S /* Two 1st byte areas */
Pokitto 0:e8b8f36b4505 447 #define IsDBCS1(c) (((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E))
Pokitto 0:e8b8f36b4505 448 #else /* One 1st byte area */
Pokitto 0:e8b8f36b4505 449 #define IsDBCS1(c) ((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E)
Pokitto 0:e8b8f36b4505 450 #endif
Pokitto 0:e8b8f36b4505 451
Pokitto 0:e8b8f36b4505 452 #ifdef _DS3S /* Three 2nd byte areas */
Pokitto 0:e8b8f36b4505 453 #define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E))
Pokitto 0:e8b8f36b4505 454 #else /* Two 2nd byte areas */
Pokitto 0:e8b8f36b4505 455 #define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E))
Pokitto 0:e8b8f36b4505 456 #endif
Pokitto 0:e8b8f36b4505 457
Pokitto 0:e8b8f36b4505 458 #else /* SBCS configuration */
Pokitto 0:e8b8f36b4505 459
Pokitto 0:e8b8f36b4505 460 #define IsDBCS1(c) 0
Pokitto 0:e8b8f36b4505 461 #define IsDBCS2(c) 0
Pokitto 0:e8b8f36b4505 462
Pokitto 0:e8b8f36b4505 463 #endif /* _DF1S */
Pokitto 0:e8b8f36b4505 464
Pokitto 0:e8b8f36b4505 465
Pokitto 0:e8b8f36b4505 466 #endif /* _FATFS */
Pokitto 0:e8b8f36b4505 467