From 4c97238999dfbc95a506fc7fe399e3c96f411e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Tue, 14 Nov 2017 02:40:51 +0100 Subject: [PATCH] Even though the current code seems to be working fine, call KeyMatrix_Init() before InitKeyScanner() just to be sure. --- left/src/init_peripherals.c | 2 -- left/src/main.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/left/src/init_peripherals.c b/left/src/init_peripherals.c index 955e09a..91172c0 100644 --- a/left/src/init_peripherals.c +++ b/left/src/init_peripherals.c @@ -10,7 +10,6 @@ #include "slave_protocol_handler.h" #include "i2c_watchdog.h" #include "debug_over_spi.h" -#include "key_scanner.h" i2c_slave_config_t slaveConfig; i2c_slave_handle_t slaveHandle; @@ -83,7 +82,6 @@ void InitLedDriver(void) void InitPeripherals(void) { InitInterruptPriorities(); - InitKeyScanner(); InitLedDriver(); InitTestLed(); LedPwm_Init(); diff --git a/left/src/main.c b/left/src/main.c index ca96a9b..a1246de 100644 --- a/left/src/main.c +++ b/left/src/main.c @@ -4,6 +4,7 @@ #include "bootloader.h" #include #include "config.h" +#include "key_scanner.h" DEFINE_BOOTLOADER_CONFIG_AREA(I2C_ADDRESS_LEFT_KEYBOARD_HALF_BOOTLOADER) @@ -41,9 +42,9 @@ int main(void) InitClock(); InitPeripherals(); KeyMatrix_Init(&keyMatrix); + InitKeyScanner(); while (1) { -// KeyMatrix_Scan(&keyMatrix); __WFI(); } }