From 330a899625babf009f3bb31d0f97b4fdecb894e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sat, 4 Nov 2017 01:02:19 +0100 Subject: [PATCH] Make the getAdcValue and getDebugInfo USB commands utilize the first byte of the response to provide status as dictated by the UHK protocol. --- right/src/usb_protocol_handler.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index 8bed15c..3f3f03a 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -153,7 +153,7 @@ void setLedPwm(void) void getAdcValue(void) { - *(uint32_t*)(GenericHidOutBuffer+0) = ADC_Measure(); + *(uint32_t*)(GenericHidOutBuffer+1) = ADC_Measure(); } void legacyLaunchEepromTransfer(void) @@ -228,10 +228,10 @@ void getKeyboardState(void) void getDebugInfo(void) { - *(uint32_t*)(UsbDebugInfo+0) = I2C_Watchdog; - *(uint32_t*)(UsbDebugInfo+4) = I2cSchedulerCounter; - *(uint32_t*)(UsbDebugInfo+8) = I2cWatchdog_OuterCounter; - *(uint32_t*)(UsbDebugInfo+12) = I2cWatchdog_InnerCounter; + *(uint32_t*)(UsbDebugInfo+1) = I2C_Watchdog; + *(uint32_t*)(UsbDebugInfo+5) = I2cSchedulerCounter; + *(uint32_t*)(UsbDebugInfo+9) = I2cWatchdog_OuterCounter; + *(uint32_t*)(UsbDebugInfo+13) = I2cWatchdog_InnerCounter; memcpy(GenericHidOutBuffer, UsbDebugInfo, USB_GENERIC_HID_OUT_BUFFER_LENGTH);