Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32F103C8T6_WebUSBDFU STM32F103C8T6_USBDFU STM32F103C8T6_USBDFU dfu_usb_stm32f103
Fork of USBDevice_STM32F103 by
Revision 63:05e2f2e4dc3e, committed 2015-06-22
- Comitter:
- va009039
- Date:
- Mon Jun 22 09:42:03 2015 +0900
- Parent:
- 62:23cb405e1ee5
- Child:
- 64:c3d0530b6d82
- Commit message:
- fix frame number.
Changed in this revision
| USBDevice/USBHAL_STM32L1.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBDevice/USBHAL_STM32L1.cpp Sun Jun 21 11:53:49 2015 +0900
+++ b/USBDevice/USBHAL_STM32L1.cpp Mon Jun 22 09:42:03 2015 +0900
@@ -35,6 +35,19 @@
__HAL_SYSCFG_USBPULLUP_DISABLE();
}
}
+
+#elif defined(TARGET_STM32L0)||defined(TARGET_STM32F0)
+#define USB_LP_IRQn USB_IRQn
+void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state) {
+ if (state == 1) {
+ SET_BIT(USB->BCDR, USB_BCDR_DPPU); // DP Pull-up
+ } else {
+ CLEAR_BIT(USB->BCDR, USB_BCDR_DPPU);
+ }
+}
+
+#elif defined(TARGET_STM32F3)
+#define USB_LP_IRQn USB_LP_CAN1_RX0_IRQn
#endif
static PCD_HandleTypeDef hpcd_USB_FS;
@@ -365,7 +378,7 @@
}
void USBHAL::SOFCallback() {
- SOF(hpcd_USB_FS.Instance->FNR & 0x7fff);
+ SOF(hpcd_USB_FS.Instance->FNR & USB_FNR_FN);
}
void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) {
