From 3c216c197d5306ac8531230dc01ed0e486ce24ed Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 14 Jan 2014 18:05:35 -0500 Subject: [PATCH] split out setting up pins and setting up the logical matrix --- ArduinoKeyboard.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ArduinoKeyboard.ino b/ArduinoKeyboard.ino index d54e65aa..8659dadd 100644 --- a/ArduinoKeyboard.ino +++ b/ArduinoKeyboard.ino @@ -186,7 +186,7 @@ void send_key_events(byte layer) handle_mouse_movement(x, y); release_keys_not_being_pressed(); } -void setup_matrix() +void setup_pins() { //set up the row pins as outputs for (byte row = 0; row < ROWS; row++) { @@ -200,6 +200,10 @@ void setup_matrix() //drive em high by default s it seems to be more reliable than driving em low } +} + +void setup_matrix() +{ //blank out the matrix. for (byte col = 0; col < COLS; col++) { for (byte row = 0; row < ROWS; row++) { @@ -269,6 +273,7 @@ void setup() //#ifdef DEBUG_SERIAL //#endif setup_matrix(); + setup_pins(); Serial.println("loaded the matrix"); current_layer = load_current_layer(); }