[all with SD support] Update to latest FatFS version

[Taranis] Bug fixed with EEPROM saving when USB is plugged. It will now reboot when USB is unplugged
This commit is contained in:
bsongis@gmail.com
2013-06-24 19:46:12 +00:00
parent 475b8bc3e6
commit d0156700f5
17 changed files with 838 additions and 553 deletions
+8 -8
View File
@@ -3724,7 +3724,7 @@ const WCHAR sjis2uni[] = {
WCHAR ff_convert ( /* Converted code, 0 means conversion error */
WCHAR src, /* Character code to be converted */
WCHAR chr, /* Character code to be converted */
UINT dir /* 0: Unicode to OEMCP, 1: OEMCP to Unicode */
)
{
@@ -3733,8 +3733,8 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
int i, n, li, hi;
if (src <= 0x80) { /* ASCII */
c = src;
if (chr <= 0x80) { /* ASCII */
c = chr;
} else {
#if !_TINY_TABLE
if (dir) { /* OEMCP to unicode */
@@ -3747,8 +3747,8 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
li = 0;
for (n = 16; n; n--) {
i = li + (hi - li) / 2;
if (src == p[i * 2]) break;
if (src > p[i * 2])
if (chr == p[i * 2]) break;
if (chr > p[i * 2])
li = i;
else
hi = i;
@@ -3760,15 +3760,15 @@ WCHAR ff_convert ( /* Converted code, 0 means conversion error */
do {
c = *p;
p += 2;
} while (c && c != src);
} while (c && c != chr);
p -= 3;
c = *p;
} else { /* Unicode to OEMCP */
li = 0; hi = sizeof(uni2sjis) / 4 - 1;
for (n = 16; n; n--) {
i = li + (hi - li) / 2;
if (src == uni2sjis[i * 2]) break;
if (src > uni2sjis[i * 2])
if (chr == uni2sjis[i * 2]) break;
if (chr > uni2sjis[i * 2])
li = i;
else
hi = i;