From 4f3801868f0ebcf80325a48a5a03b3ca082c20c6 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 23 Jun 2015 13:02:34 +0200 Subject: ucoo/hal/usb: fix VBUS usage VBUS is not an alternate function, it is a additionnal function which do not need to be configured. --- ucoo/hal/usb/usb.stm32.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ucoo/hal') diff --git a/ucoo/hal/usb/usb.stm32.cc b/ucoo/hal/usb/usb.stm32.cc index 93f1782..a45e121 100644 --- a/ucoo/hal/usb/usb.stm32.cc +++ b/ucoo/hal/usb/usb.stm32.cc @@ -85,15 +85,13 @@ UsbStreamControl::UsbStreamControl (const char *vendor, const char *product) # if CONFIG_UCOO_HAL_USB_DRIVER_HS rcc_periph_clock_enable (RCC_OTGHS); rcc_periph_clock_enable (RCC_GPIOB); - gpio_mode_setup (GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, - GPIO13 | GPIO14 | GPIO15); - gpio_set_af (GPIOB, GPIO_AF12, GPIO13 | GPIO14 | GPIO15); + gpio_mode_setup (GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO14 | GPIO15); + gpio_set_af (GPIOB, GPIO_AF12, GPIO14 | GPIO15); # else rcc_periph_clock_enable (RCC_OTGFS); rcc_periph_clock_enable (RCC_GPIOA); - gpio_mode_setup (GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, - GPIO9 | GPIO11 | GPIO12); - gpio_set_af (GPIOA, GPIO_AF10, GPIO9 | GPIO11 | GPIO12); + gpio_mode_setup (GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO11 | GPIO12); + gpio_set_af (GPIOA, GPIO_AF10, GPIO11 | GPIO12); # endif #elif defined (TARGET_stm32f1) rcc_periph_clock_enable (RCC_OTGFS); -- cgit v1.2.3