STM32 usb HID问题。
uint8_tUSBD_HID_DataOut (void*pdev, uint8_t epnum){
DCD_EP_PrepareRx(pdev,HID_IN_EP,Report_buf,USB_REPORT_BUFF_SIZE);
return USBD_OK;
}
假设USB_REPORT_BUFF_SIZE为64,主机有可能只发送32 23等等小于64字节,
每次都是把Report_buf的数据全部读出来,然后再根据自己定的协议定的长度 再解析出本次发送
过来的具体长度。有没有USB库里面有变量记录着每次发送的实际长度? Recv_Coutn = USBD_GetRxCount(pdev,epnum);
页:
[1]