stmhal/usb: Use local USB handler variable in Start-of-Frame handler.

This commit is contained in:
Sylvain Pelissier 2017-05-04 09:39:08 +02:00 committed by Damien George
parent 6adcf7bb82
commit 3bb69f645a
1 changed files with 2 additions and 2 deletions

View File

@ -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;