keyboard maps in PROGMEM
This commit is contained in:
parent
aab45329c6
commit
3dad91194e
6
io.cpp
6
io.cpp
|
@ -39,7 +39,7 @@ void io::load() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ascii map for scan-codes
|
// ascii map for scan-codes
|
||||||
static const uint8_t scanmap[] = {
|
static const uint8_t scanmap[] PROGMEM = {
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // 0x00
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // 0x00
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x09, 0x60, 0xff, // 0x08
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x09, 0x60, 0xff, // 0x08
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x51, 0x31, 0xff, // 0x10
|
0xff, 0xff, 0xff, 0xff, 0xff, 0x51, 0x31, 0xff, // 0x10
|
||||||
|
@ -58,7 +58,7 @@ static const uint8_t scanmap[] = {
|
||||||
0xff, 0x2b, 0x33, 0x2d, 0x2a, 0x39, 0xff, 0xff, // 0x78
|
0xff, 0x2b, 0x33, 0x2d, 0x2a, 0x39, 0xff, 0xff, // 0x78
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t shiftmap[] = {
|
static const uint8_t shiftmap[] PROGMEM = {
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // 0x00
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // 0x00
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // 0x08
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // 0x08
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff, // 0x10
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff, // 0x10
|
||||||
|
@ -92,7 +92,7 @@ void io::up(uint8_t scan) {
|
||||||
_shift = false;
|
_shift = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
enter(_shift? shiftmap[scan]: scanmap[scan]);
|
enter(_shift? pgm_read_byte(shiftmap + scan): pgm_read_byte(scanmap + scan));
|
||||||
}
|
}
|
||||||
|
|
||||||
void io::draw(char ch, int i, int j) {
|
void io::draw(char ch, int i, int j) {
|
||||||
|
|
Loading…
Reference in New Issue