usb: fx07: correctly REBASE for both usb cores.
Regression from 0cc0134f21
When operating on registers in code that is common for both usb cores,
make sure to use the REBASE macros to operate on the correct peripheral.
Reported by: kuldeep
Fixes github issue: #495
This commit is contained in:
@@ -326,11 +326,11 @@ void stm32fx07_poll(usbd_device *usbd_dev)
|
||||
}
|
||||
REBASE(OTG_GINTSTS) = OTG_FS_GINTSTS_SOF;
|
||||
}
|
||||
|
||||
|
||||
if (usbd_dev->user_callback_sof) {
|
||||
BBIO_PERIPH(OTG_FS_GINTMSK, OTG_FS_GINTMSK_SOFM) = 1;
|
||||
REBASE(OTG_GINTMSK) |= OTG_FS_GINTMSK_SOFM;
|
||||
} else {
|
||||
BBIO_PERIPH(OTG_FS_GINTMSK, OTG_FS_GINTMSK_SOFM) = 0;
|
||||
REBASE(OTG_GINTMSK) &= ~OTG_FS_GINTMSK_SOFM;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user