]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/mt40/matrix.c
Remove more commented out MCUs
[qmk_firmware.git] / keyboards / mt40 / matrix.c
index 140026013f021509ede9245feea98f796ff860b1..d75fcc221af58ed97780071e6c12e8f7bdd3232e 100644 (file)
@@ -19,6 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <util/delay.h>
 
 #include "matrix.h"
+#include "config.h"
 
 #ifndef DEBOUNCE
 #   define DEBOUNCE    5
@@ -29,6 +30,26 @@ static uint8_t debouncing = DEBOUNCE;
 static matrix_row_t matrix[MATRIX_ROWS];
 static matrix_row_t matrix_debouncing[MATRIX_ROWS];
 
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+    matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+    matrix_scan_user();
+}
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+
+
 void matrix_init(void) {
     // all outputs for rows high
     DDRB = 0xFF;
@@ -47,6 +68,7 @@ void matrix_init(void) {
         matrix[row] = 0x00;
         matrix_debouncing[row] = 0x00;
     }
+    matrix_init_kb();
 }
 
 void matrix_set_row_status(uint8_t row) {
@@ -93,7 +115,7 @@ uint8_t matrix_scan(void) {
         }
     }
 
-    matrix_scan_user();
+    matrix_scan_kb();
 
     return 1;
 }