More sensible (standard c++) implementation of the keymatrix array

pull/18/head
Jesse Vincent 9 years ago
parent 48d5b7e68e
commit b00db683b2

@ -35,7 +35,7 @@ void setup();
char x; char x;
char y; char y;
uint8_t matrixState[ROWS][COLS]; uint8_t matrixState[ROWS][COLS] = {0};
static const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST }; static const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST };
byte primary_keymap = 0; byte primary_keymap = 0;
@ -58,7 +58,6 @@ void setup_output_pins();
void scan_matrix(); void scan_matrix();
// key matrix // key matrix
void setup_matrix();
void reset_matrix(); void reset_matrix();
void handle_immediate_action_during_matrix_scan(Key keymapEntry, byte matrixStateEntry); void handle_immediate_action_during_matrix_scan(Key keymapEntry, byte matrixStateEntry);

@ -31,15 +31,6 @@ int left_initted = 0;
void setup_matrix() {
//blank out the matrix.
for (byte col = 0; col < COLS; col++) {
for (byte row = 0; row < ROWS; row++) {
matrixState[row][col] = 0;
}
}
}
void set_keymap(Key keymapEntry, byte matrixStateEntry) { void set_keymap(Key keymapEntry, byte matrixStateEntry) {
if (keymapEntry.flags & SWITCH_TO_KEYMAP) { if (keymapEntry.flags & SWITCH_TO_KEYMAP) {
@ -151,7 +142,6 @@ void setup() {
Mouse.begin(); Mouse.begin();
setup_leds(); setup_leds();
led_bootup(); led_bootup();
setup_matrix();
setup_pins(); setup_pins();
rightsx1509.fetchPinStates(); rightsx1509.fetchPinStates();

Loading…
Cancel
Save