usb: fx07: correctly REBASE for both usb cores.

Regression from 0cc0134f21b387a3a813feca1973c77587900ee2

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:
Karl Palsson 2015-07-29 12:46:12 +00:00
parent bc212bba45
commit e11b7d5d6d

View File

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