summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
Diffstat (limited to 'n')
-rw-r--r--n/lcd/src/lcd.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/n/lcd/src/lcd.c b/n/lcd/src/lcd.c
index 73ae4ca..b81dcb0 100644
--- a/n/lcd/src/lcd.c
+++ b/n/lcd/src/lcd.c
@@ -170,7 +170,7 @@ key_get (char old_key)
char i = 0;
while ( key_read () == 0 && i < 3 )
{
- utils_delay_ms(250); // was 100ms
+ utils_delay_ms(100);
if ( i == 2 )
old_key = 0;
i++;
@@ -209,52 +209,50 @@ key_read (void)
{
case 0 : key = '1';
break;
- case 1 : key = '4';
+ case 1 : key = '2';
break;
- case 2 : key = '7';
+ case 2 : key = '3';
break;
- case 3 : key = 'A';
+ case 3 : key = 'F';
break;
}
else if ( ~(key_tmp & 0x3c) & 0x08)
switch (i)
{
- case 0 : key = '2';
+ case 0 : key = '4';
break;
case 1 : key = '5';
break;
- case 2 : key = '8';
+ case 2 : key = '6';
break;
- case 3 : key = '0';
+ case 3 : key = 'E';
break;
}
else if ( ~(key_tmp & 0x3c) & 0x10)
switch (i)
{
- case 0 : key = '3';
+ case 0 : key = '7';
break;
- case 1 : key = '6';
+ case 1 : key = '8';
break;
case 2 : key = '9';
break;
- case 3 : key = 'B';
+ case 3 : key = 'D';
break;
}
else if ( ~(key_tmp & 0x3c) & 0x20)
switch (i)
{
- case 0 : key = '3';
+ case 0 : key = 'A';
break;
- case 1 : key = 'E';
+ case 1 : key = '0';
break;
- case 2 : key = 'D';
+ case 2 : key = 'B';
break;
case 3 : key = 'C';
break;
}
i++;
-// if (i==4)
-// i=0;
}
PORTC = (PORTC & 0xf0);
return key;