summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-01-22 23:06:07 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-01-22 23:06:07 +0100
commitc9726505130797f21f6f4cc06ea55f289b9dcad2 (patch)
treea135f0f5df374c91162ee54ab6c17ef16984558d
parent005fd2a94ae005d19cf82ded46698c3187471d28 (diff)
USB pins should all be configured as AF with no pullup.
-rw-r--r--main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index e56c435..baad038 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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);