aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-23 08:46:02 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-12-23 08:46:02 +0000
commitc5c7e44f8c52159790ce2bf0cc834f86fbf80d55 (patch)
tree1cc0c8b70f254f73e0a57f219f01b525e81d3b09 /os/hal
parentc34a873cc9d92578924f06b7d96c00e632c41e6e (diff)
downloadChibiOS-c5c7e44f8c52159790ce2bf0cc834f86fbf80d55.tar.gz
ChibiOS-c5c7e44f8c52159790ce2bf0cc834f86fbf80d55.tar.bz2
ChibiOS-c5c7e44f8c52159790ce2bf0cc834f86fbf80d55.zip
Added BOARD_OTG_NOVBUSSENS option.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6575 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32/OTGv1/usb_lld.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c
index 35b5335e5..978acea90 100644
--- a/os/hal/platforms/STM32/OTGv1/usb_lld.c
+++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c
@@ -889,7 +889,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);