diff --git a/io.cpp b/io.cpp index fa2e124..2bcf9bd 100644 --- a/io.cpp +++ b/io.cpp @@ -39,7 +39,7 @@ void io::load() { } // 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, 0x09, 0x60, 0xff, // 0x08 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 }; -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, // 0x08 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff, // 0x10 @@ -92,7 +92,7 @@ void io::up(uint8_t scan) { _shift = false; 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) {