Closed cstratton closed 7 years ago
The k_minfinfo structure pointer is dereferenced before being assigned at line 123 and 124 of.
http://github.com/MaJerle/stm32fxxx_hal_libraries/blob/master/00-STM32_LIBRARIES/tm_stm32_usb_host_hid.c#L123
HID_MOUSE_Info_TypeDef* k_minfo; uint8_t i; /* Reset relative values */ MouseStruct->RelativeX = (int8_t)k_minfo->x; MouseStruct->RelativeY = (int8_t)k_minfo->y; /* Get keyboard informations */ k_minfo = USBH_HID_GetMouseInfo(TM_USBH_GetUSBPointer(USB_Mode));
This randomly causes a hard fault, presumably due to illegal memory access
Perhaps you could just zero these in case (or if) the USBH_HID_GetMouseInfo() call returns NULL.
The k_minfinfo structure pointer is dereferenced before being assigned at line 123 and 124 of.
http://github.com/MaJerle/stm32fxxx_hal_libraries/blob/master/00-STM32_LIBRARIES/tm_stm32_usb_host_hid.c#L123
This randomly causes a hard fault, presumably due to illegal memory access
Perhaps you could just zero these in case (or if) the USBH_HID_GetMouseInfo() call returns NULL.