summaryrefslogtreecommitdiffstats
path: root/keymap.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2010-08-23 12:53:00 +0900
committertmk <nobody@nowhere>2010-08-23 12:53:00 +0900
commitc17f07819ffeb119a09d4acdfa5097b272d2e2f9 (patch)
tree0ef6b554677fe477075ec24e6cacfc67274d1b4b /keymap.c
parent8cfb3712d58e4a88029dfd00111714e91939005e (diff)
store Keymap into program space.
Diffstat (limited to 'keymap.c')
-rw-r--r--keymap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/keymap.c b/keymap.c
index 73971ed863..7c5ec88e2e 100644
--- a/keymap.c
+++ b/keymap.c
@@ -1,12 +1,13 @@
-#include "keymap.h"
-
-/*
+/*
* keymap for modified macway keyboard
*/
+#include <avr/pgmspace.h>
+#include "keymap.h"
+
#define MATRIX_ROWS 9
#define MATRIX_COLS 8
-const uint8_t Keymap[MATRIX_COLS][MATRIX_ROWS] = {
+static const uint8_t PROGMEM Keymap[MATRIX_COLS][MATRIX_ROWS] = {
{ KB_LALT, KB_1, KB_2, KB_3, KB_4, KB_7, KB_8, KB_9, KB_0 },
{ KB_NO, KB_ESCAPE, KB_RALT, KB_NO, KB_5, KB_6, KB_EQUAL, KB_NO, KB_MINUS },
{ KB_BSPACE, KB_TAB, KB_LGUI, KB_RSHIFT, KB_T, KB_Y, KB_RBRACKET, KB_NO, KB_LBRACKET },
@@ -23,5 +24,5 @@ uint8_t get_keycode(uint8_t row, uint8_t col)
return KB_NO;
if (col >= MATRIX_COLS)
return KB_NO;
- return Keymap[col][row];
+ return pgm_read_byte(&Keymap[col][row]);
}