stmhal/usb: Use local USB handler variable in Start-of-Frame handler.
This commit is contained in:
parent
6adcf7bb82
commit
3bb69f645a
|
@ -288,9 +288,9 @@ void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) {
|
|||
|
||||
buffptr = UserTxBufPtrOutShadow;
|
||||
|
||||
USBD_CDC_SetTxBuffer(&hUSBDDevice, (uint8_t*)&UserTxBuffer[buffptr], buffsize);
|
||||
USBD_CDC_SetTxBuffer(hpcd->pData, (uint8_t*)&UserTxBuffer[buffptr], buffsize);
|
||||
|
||||
if (USBD_CDC_TransmitPacket(&hUSBDDevice) == USBD_OK) {
|
||||
if (USBD_CDC_TransmitPacket(hpcd->pData) == USBD_OK) {
|
||||
UserTxBufPtrOutShadow += buffsize;
|
||||
if (UserTxBufPtrOutShadow == APP_TX_DATA_SIZE) {
|
||||
UserTxBufPtrOutShadow = 0;
|
||||
|
|
Loading…
Reference in a new issue