[X9D] Makefile option added: CPUARM

[Sky9x] GVARS Bug in EEPROM
[Sky9x] Mu-law codec added
This commit is contained in:
bsongis
2012-12-10 21:00:02 +00:00
parent 2037f0d8b0
commit 5a2d6cb250
49 changed files with 11057 additions and 361 deletions
+3 -130
View File
@@ -751,7 +751,7 @@ void board_init()
startSound() ;
alawInit();
codecsInit();
eeprom_init();
@@ -760,7 +760,6 @@ void board_init()
init_SDcard();
}
#endif
// keys:
@@ -779,21 +778,8 @@ uint32_t read_keys()
x = lcdLock ? lcdInputs : PIOC->PIO_PDSR; // 6 LEFT, 5 RIGHT, 4 DOWN, 3 UP ()
x <<= 1;
#if defined(PCBX9D)
y = 0;
if (x & 0x00000020)
y |= 0x02 << KEY_PLUS;
if (x & 0x00000004)
y |= 0x02 << KEY_MENU;
if (x & 0x00000010)
y |= 0x02 << KEY_MINUS;
if (x & 0x00000040)
y |= 0x02 << KEY_PAGE;
if (x & 0x02000000)
y |= 0x02 << KEY_EXIT;
if (PIOB->PIO_PDSR & 0x000000020)
y |= 0x02 << KEY_ENTER;
#elif defined(REVA)
#if defined(REVA)
y = (x & 0x00000060);
if (x & 0x00000008)
y |= 0x10;
@@ -898,118 +884,6 @@ uint8_t keyDown()
return ~read_keys() & 0x7E ;
}
#if defined(PCBX9D)
extern uint32_t keyState(EnumKeys enuk)
{
register uint32_t c ;
CPU_UINT xxx = 0;
if (enuk < (int) DIM(keys)) return keys[enuk].state() ? 1 : 0;
c = PIOC->PIO_PDSR ;
// printf("c=%x\n", c); fflush(stdout);
switch ((uint8_t) enuk) {
case SW_SA0:
xxx = !(c & 0x80000000);
break;
case SW_SA2:
xxx = c & 0x80000000;
break;
case SW_SB0:
xxx = !(c & 0x08000000) && !(c & 0x04000000);
break;
case SW_SB1:
xxx = (c & 0x08000000) && !(c & 0x04000000);
break;
case SW_SB2:
xxx = !(c & 0x08000000) && (c & 0x04000000);
break;
case SW_SC0:
xxx = !(c & 0x00800000) && !(c & 0x00400000);
break;
case SW_SC1:
xxx = (c & 0x00800000) && !(c & 0x00400000);
break;
case SW_SC2:
xxx = !(c & 0x00800000) && (c & 0x00400000);
break;
case SW_SD0:
xxx = !(c & 0x00200000) && !(c & 0x00100000);
break;
case SW_SD1:
xxx = (c & 0x00200000) && !(c & 0x00100000);
break;
case SW_SD2:
xxx = !(c & 0x00200000) && (c & 0x00100000);
break;
case SW_SE0:
xxx = !(c & 0x00080000) && !(c & 0x00040000);
break;
case SW_SE1:
xxx = (c & 0x00080000) && !(c & 0x00040000);
break;
case SW_SE2:
xxx = !(c & 0x00080000) && (c & 0x00040000);
break;
case SW_SF0:
xxx = !(c & 0x00020000) && !(c & 0x00010000);
break;
case SW_SF1:
xxx = (c & 0x00020000) && !(c & 0x00010000);
break;
case SW_SF2:
xxx = !(c & 0x00020000) && (c & 0x00010000);
break;
case SW_SG0:
xxx = !(c & 0x00008000) && !(c & 0x00004000);
break;
case SW_SG1:
xxx = (c & 0x00008000) && !(c & 0x00004000);
break;
case SW_SG2:
xxx = !(c & 0x00008000) && (c & 0x00004000);
break;
case SW_SH0:
xxx = !(c & 0x00002000);
break;
case SW_SH2:
xxx = c & 0x00002000;
break;
default:
break;
}
if (xxx) {
return 1;
}
return 0;
}
#else
extern uint32_t keyState(EnumKeys enuk)
{
register uint32_t a ;
@@ -1080,7 +954,6 @@ extern uint32_t keyState(EnumKeys enuk)
}
return 0;
}
#endif
uint16_t Analog_values[NUMBER_ANALOG] ;
uint8_t temperature = 0; // Raw temp reading