8000 stmhal/usb: Use local USB handler variable in Start-of-Frame handler. · DFRobot/micropython@3bb69f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3bb69f6

Browse files
sylvainpelissierdpgeorge
authored andcommitted
stmhal/usb: Use local USB handler variable in Start-of-Frame handler.
1 parent 6adcf7b commit 3bb69f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stmhal/usbd_cdc_interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) {
288288

289289
buffptr = UserTxBufPtrOutShadow;
290290

291-
USBD_CDC_SetTxBuffer(&hUSBDDevice, (uint8_t*)&UserTxBuffer[buffptr], buffsize);
291+
USBD_CDC_SetTxBuffer(hpcd->pData, (uint8_t*)&UserTxBuffer[buffptr], buffsize);
292292

293-
if (USBD_CDC_TransmitPacket(&hUSBDDevice) == USBD_OK) {
293+
if (USBD_CDC_TransmitPacket(hpcd->pData) == USBD_OK) {
294294
UserTxBufPtrOutShadow += buffsize;
295295
if (UserTxBufPtrOutShadow == APP_TX_DATA_SIZE) {
296296
UserTxBufPtrOutShadow = 0;

0 commit comments

Comments
 (0)
0