Call UpdateUsbReports() from the interrupt handler of the keyboard interface because otherwise the I2C calls of UpdateUsbReports run in the main loop and interfere with the I2C calls of interrupt handlers. This is a temporary solution.
This commit is contained in:
@@ -82,13 +82,13 @@ void main() {
|
||||
InitClock();
|
||||
LedDriver_InitAllLeds(1);
|
||||
KeyMatrix_Init(&KeyMatrix);
|
||||
UpdateUsbReports();
|
||||
//UpdateUsbReports();
|
||||
InitUsb();
|
||||
|
||||
// deserialize_Layer(testData, 0);
|
||||
|
||||
while (1) {
|
||||
UpdateUsbReports();
|
||||
//UpdateUsbReports();
|
||||
asm("wfi");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ void ResetActiveUsbKeyboardReport()
|
||||
|
||||
static usb_status_t UsbKeyboardAction(void)
|
||||
{
|
||||
UpdateUsbReports();
|
||||
return USB_DeviceHidSend(UsbCompositeDevice.keyboardHandle, USB_KEYBOARD_ENDPOINT_INDEX,
|
||||
(uint8_t*)getInactiveUsbKeyboardReport(), USB_KEYBOARD_REPORT_LENGTH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user