aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32
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/hal/ports/STM32
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/hal/ports/STM32')
-rw-r--r--os/hal/ports/STM32/OTGv1/usb_lld.c5
1 files changed, 5 insertions, 0 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);