diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-01-22 23:06:07 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-01-22 23:06:07 +0100 |
commit | c9726505130797f21f6f4cc06ea55f289b9dcad2 (patch) | |
tree | a135f0f5df374c91162ee54ab6c17ef16984558d | |
parent | 005fd2a94ae005d19cf82ded46698c3187471d28 (diff) |
USB pins should all be configured as AF with no pullup.
-rw-r--r-- | main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -52,12 +52,14 @@ int main() { led_red.on(); led_blue.off(); - usb_vbus.set_mode(Pin::Input); + usb_vbus.set_mode(Pin::AF); + usb_vbus.set_pull(Pin::PullNone); + usb_vbus.set_af(10); usb_dm.set_mode(Pin::AF); usb_dm.set_pull(Pin::PullNone); usb_dm.set_af(10); usb_dp.set_mode(Pin::AF); - usb_dp.set_pull(Pin::PullUp); + usb_dp.set_pull(Pin::PullNone); usb_dp.set_af(10); RCC.enable(RCC.OTGFS); |