This commit is contained in:
Erich Styger
2017-07-19 17:28:13 +02:00
parent b4ce3b227a
commit ccc02fe795
3 changed files with 142 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
#include "main.h"
#include "init_clock.h"
#include "init_peripherals.h"
#include "bootloader.h"
key_matrix_t keyMatrix = {
.colNum = KEYBOARD_MATRIX_COLS_NUM,
@@ -25,12 +26,18 @@ key_matrix_t keyMatrix = {
volatile bool DisableKeyMatrixScanState;
#define ALWAYS_ENTER_BOOTLOADER (0)
/*! set to 1 for easier bootloader debugging. With this, the KL03 always enters bootloader mode after reset */
int main(void)
{
InitClock();
InitPeripherals();
KeyMatrix_Init(&keyMatrix);
#if ALWAYS_ENTER_BOOTLOADER
JumpToBootloader(); /* << EST: \todo Temporary only */
#endif
while (1) {
if (!DisableKeyMatrixScanState) {
KeyMatrix_Scan(&keyMatrix);