Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy