/* Event handler for the library USB Configuration Changed event.  */
void EVENT_USB_Device_ConfigurationChanged(void)
/* Event handler for the library USB Configuration Changed event.  */
void EVENT_USB_Device_ConfigurationChanged(void)
{
  bool ConfigSuccess = true;
  USBD_SetEndpointBuffer(GENERIC_IN_EPADDR, buffer, GENERIC_REPORT_SIZE);
  ConfigSuccess &= HID_Device_ConfigureEndpoints(&Generic_HID_Interface);
  device.IsConfigured = ConfigSuccess;
}