aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-23 08:46:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-23 08:46:10 +0000
commit9d55b0877dbd2a79efac41ff83e851064361a54c (patch)
treefd73a7815342f97f2428510f29e1bf91e87d0cbb /os
parent2a11ace2becfd8ca17f4b01a8163cfdefbf420a8 (diff)
downloadChibiOS-9d55b0877dbd2a79efac41ff83e851064361a54c.tar.gz
ChibiOS-9d55b0877dbd2a79efac41ff83e851064361a54c.tar.bz2
ChibiOS-9d55b0877dbd2a79efac41ff83e851064361a54c.zip
Added BOARD_OTG_NOVBUSSENS option.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6576 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32/OTGv1/usb_lld.c5
-rw-r--r--os/hal/ports/STM32F4xx/hal_lld.h4
2 files changed, 6 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/OTGv1/usb_lld.c b/os/hal/ports/STM32/OTGv1/usb_lld.c
index 433a75802..ce60435f9 100644
--- a/os/hal/ports/STM32/OTGv1/usb_lld.c
+++ b/os/hal/ports/STM32/OTGv1/usb_lld.c
@@ -773,7 +773,12 @@ void usb_lld_start(USBDriver *usbp) {
otgp->PCGCCTL = 0;
/* Internal FS PHY activation.*/
+#if defined(BOARD_OTG_NOVBUSSENS)
+ otgp->GCCFG = GCCFG_NOVBUSSENS | GCCFG_VBUSASEN | GCCFG_VBUSBSEN |
+ GCCFG_PWRDWN;
+#else
otgp->GCCFG = GCCFG_VBUSASEN | GCCFG_VBUSBSEN | GCCFG_PWRDWN;
+#endif
/* Soft core reset.*/
otg_core_reset(usbp);
diff --git a/os/hal/ports/STM32F4xx/hal_lld.h b/os/hal/ports/STM32F4xx/hal_lld.h
index 1729b687b..4bbf9f16b 100644
--- a/os/hal/ports/STM32F4xx/hal_lld.h
+++ b/os/hal/ports/STM32F4xx/hal_lld.h
@@ -818,9 +818,7 @@
#error "HSI not enabled, required by STM32_MCO1SEL"
#endif
-#if (STM32_MCO2SEL == STM32_MCO2SEL_HSI) || \
- ((STM32_MCO2SEL == STM32_MCO2SEL_PLL) && \
- (STM32_PLLSRC == STM32_PLLSRC_HSI))
+#if (STM32_MCO2SEL == STM32_MCO2SEL_PLL) && (STM32_PLLSRC == STM32_PLLSRC_HSI)
#error "HSI not enabled, required by STM32_MCO2SEL"
#endif