summaryrefslogtreecommitdiffstatshomepage
path: root/stm/stmusb/usb_bsp.c
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2014-02-03 21:11:48 -0800
committerDave Hylands <dhylands@gmail.com>2014-02-03 23:26:05 -0800
commit1570a96cad0b886f21a07eb13c3377a0f79abc1e (patch)
tree420ffc243157eb5b3d06b7e00ca0f7215fbd071a /stm/stmusb/usb_bsp.c
parent00c0b8a989ae54f4466d15b78a2e8729baf441ef (diff)
downloadmicropython-1570a96cad0b886f21a07eb13c3377a0f79abc1e.tar.gz
micropython-1570a96cad0b886f21a07eb13c3377a0f79abc1e.zip
Initial support for Netduino
This also fixes up the IRQ for the PYBOARD4 USERSW although I was unable to test that functionality.
Diffstat (limited to 'stm/stmusb/usb_bsp.c')
-rw-r--r--stm/stmusb/usb_bsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stm/stmusb/usb_bsp.c b/stm/stmusb/usb_bsp.c
index cf9d667c69..0cd5146a27 100644
--- a/stm/stmusb/usb_bsp.c
+++ b/stm/stmusb/usb_bsp.c
@@ -117,6 +117,7 @@ void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE *pdev) {
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
GPIO_Init(GPIOA, &GPIO_InitStructure);
+#if !defined(NETDUINO_PLUS_2)
// Configure ID pin on PA10
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
@@ -125,6 +126,7 @@ void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE *pdev) {
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_OTG_FS);
+#endif
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_OTG_FS, ENABLE);