diff --git a/right/src/key_scanner.c b/right/src/key_scanner.c index 7517ed3..c62d174 100644 --- a/right/src/key_scanner.c +++ b/right/src/key_scanner.c @@ -1,12 +1,10 @@ #include "fsl_pit.h" #include "key_scanner.h" -#include "usb_protocol_handler.h" uint32_t counter = 0; void PIT_KEY_SCANNER_HANDLER(void) { - *((uint32_t*)(UsbDebugInfo+20)) = counter++; KeyMatrix_ScanRow(&RightKeyMatrix); PIT_ClearStatusFlags(PIT, PIT_KEY_SCANNER_CHANNEL, PIT_TFLG_TIF_MASK); } diff --git a/right/src/usb_commands/usb_command_get_debug_info.c b/right/src/usb_commands/usb_command_get_debug_info.c index 72c0c57..4f416f9 100644 --- a/right/src/usb_commands/usb_command_get_debug_info.c +++ b/right/src/usb_commands/usb_command_get_debug_info.c @@ -5,6 +5,8 @@ #include "slave_scheduler.h" #include "i2c_watchdog.h" +uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH]; + void UsbCommand_GetDebugInfo(void) { *(uint32_t*)(UsbDebugInfo+1) = I2C_Watchdog; diff --git a/right/src/usb_commands/usb_command_get_debug_info.h b/right/src/usb_commands/usb_command_get_debug_info.h index 3a04447..1445645 100644 --- a/right/src/usb_commands/usb_command_get_debug_info.h +++ b/right/src/usb_commands/usb_command_get_debug_info.h @@ -1,6 +1,14 @@ #ifndef __USB_COMMAND_GET_DEBUG_INFO_H__ #define __USB_COMMAND_GET_DEBUG_INFO_H__ +// Includes: + + #include "usb_interfaces/usb_interface_generic_hid.h" + +// Variables: + + extern uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH]; + // Functions: void UsbCommand_GetDebugInfo(void); diff --git a/right/src/usb_interfaces/usb_interface_mouse.c b/right/src/usb_interfaces/usb_interface_mouse.c index 068d034..241e2ca 100644 --- a/right/src/usb_interfaces/usb_interface_mouse.c +++ b/right/src/usb_interfaces/usb_interface_mouse.c @@ -4,7 +4,6 @@ #include "i2c.h" #include "peripherals/reset_button.h" #include "key_action.h" -#include "usb_protocol_handler.h" static usb_device_endpoint_struct_t UsbMouseEndpoints[USB_MOUSE_ENDPOINT_COUNT] = {{ USB_MOUSE_ENDPOINT_INDEX | (USB_IN << USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_SHIFT), @@ -60,8 +59,6 @@ void ResetActiveUsbMouseReport(void) static volatile usb_status_t usbMouseAction(void) { usb_mouse_report_t *mouseReport = getInactiveUsbMouseReport(); - *((uint16_t*)(UsbDebugInfo+16)) = mouseReport->x; - *((uint16_t*)(UsbDebugInfo+18)) = mouseReport->y; IsUsbMouseReportSent = true; return USB_DeviceHidSend(UsbCompositeDevice.mouseHandle, USB_MOUSE_ENDPOINT_INDEX, (uint8_t*)mouseReport, USB_MOUSE_REPORT_LENGTH); diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index b5b5340..44c1152 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -13,8 +13,6 @@ #include "usb_commands/usb_command_jump_to_slave_bootloader.h" #include "usb_commands/usb_command_send_kboot_command.h" -uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH]; - void SetUsbError(uint8_t error) { GenericHidOutBuffer[0] = error; diff --git a/right/src/usb_protocol_handler.h b/right/src/usb_protocol_handler.h index 57c367d..c119417 100644 --- a/right/src/usb_protocol_handler.h +++ b/right/src/usb_protocol_handler.h @@ -40,10 +40,6 @@ JumpToBootloaderError_InvalidModuleDriverId = 1, } jump_to_bootloader_error_t; -// Variables: - - extern uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH]; - // Functions: void UsbProtocolHandler(void);