Skip to content

Commit

Permalink
Fixed send report function for bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Vostrenkov committed Mar 28, 2021
1 parent 4dfb23f commit 9f22871
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bootloader/Src/usb_endp.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,16 @@ void EP1_IN_Callback(void)
EP1_PrevXferComplete = 1;
}

void USB_CUSTOM_HID_SendReport(uint8_t EP_num, uint8_t * data, uint8_t length)
int8_t USB_CUSTOM_HID_SendReport(uint8_t EP_num, uint8_t * data, uint8_t length)
{
if ((EP1_PrevXferComplete) && (bDeviceState == CONFIGURED))
{
USB_SIL_Write(EP1_IN, data, length);
SetEPTxValid(ENDP1);
EP1_PrevXferComplete = 0;
return 0;
}
return -1;
}
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 comments on commit 9f22871

Please sign in to comment.