Rename keyMatrix to KeyMatrix because it's a global.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
#include "usb_composite_device.h"
|
#include "usb_composite_device.h"
|
||||||
#include "led_driver.h"
|
#include "led_driver.h"
|
||||||
|
|
||||||
key_matrix_t keyMatrix = {
|
key_matrix_t KeyMatrix = {
|
||||||
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
||||||
.rowNum = KEYBOARD_MATRIX_ROWS_NUM,
|
.rowNum = KEYBOARD_MATRIX_ROWS_NUM,
|
||||||
#if UHK_PCB_MAJOR_VERSION == 7
|
#if UHK_PCB_MAJOR_VERSION == 7
|
||||||
@@ -48,7 +48,7 @@ void main() {
|
|||||||
InitPeripherials();
|
InitPeripherials();
|
||||||
InitClock();
|
InitClock();
|
||||||
LedDriver_InitAllLeds(1);
|
LedDriver_InitAllLeds(1);
|
||||||
KeyMatrix_Init(&keyMatrix);
|
KeyMatrix_Init(&KeyMatrix);
|
||||||
UsbKeyboadTask();
|
UsbKeyboadTask();
|
||||||
InitUsb();
|
InitUsb();
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,6 @@
|
|||||||
|
|
||||||
// Variables:
|
// Variables:
|
||||||
|
|
||||||
extern key_matrix_t keyMatrix;
|
extern key_matrix_t KeyMatrix;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void UsbKeyboadTask()
|
|||||||
UsbKeyboardReport[newReportIndex].modifiers = 0;
|
UsbKeyboardReport[newReportIndex].modifiers = 0;
|
||||||
UsbKeyboardReport[newReportIndex].reserved = 0;
|
UsbKeyboardReport[newReportIndex].reserved = 0;
|
||||||
|
|
||||||
KeyMatrix_Scan(&keyMatrix);
|
KeyMatrix_Scan(&KeyMatrix);
|
||||||
|
|
||||||
uint8_t txData[] = {0};
|
uint8_t txData[] = {0};
|
||||||
static uint8_t leftKeyStates[KEY_STATE_COUNT];
|
static uint8_t leftKeyStates[KEY_STATE_COUNT];
|
||||||
@@ -60,7 +60,7 @@ void UsbKeyboadTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bzero(&UsbKeyboardReport[newReportIndex].scancodes, USB_KEYBOARD_MAX_KEYS);
|
bzero(&UsbKeyboardReport[newReportIndex].scancodes, USB_KEYBOARD_MAX_KEYS);
|
||||||
HandleKeyboardEvents(&UsbKeyboardReport[newReportIndex], &UsbMouseReport, leftKeyStates, keyMatrix.keyStates);
|
HandleKeyboardEvents(&UsbKeyboardReport[newReportIndex], &UsbMouseReport, leftKeyStates, KeyMatrix.keyStates);
|
||||||
|
|
||||||
activeReportIndex = newReportIndex;
|
activeReportIndex = newReportIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user