Browse Source

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

pull/3062/merge
Sylvain Pelissier 8 years ago
committed by Damien George
parent
commit
3bb69f645a
  1. 4
      stmhal/usbd_cdc_interface.c

4
stmhal/usbd_cdc_interface.c

@ -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…
Cancel
Save