mirror of https://github.com/ARMmbed/mbed-os.git
STM32 USBDevice: Remove disco-f429zi, clean-up nucleo-f103rb
parent
211d2011eb
commit
1d72b3124d
|
@ -132,10 +132,7 @@ USBHAL::USBHAL(void) {
|
|||
gpio_init_out(&HALPriv->usb_switch, PG_6);
|
||||
|
||||
#elif defined(TARGET_NUCLEO_F103RB)
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
gpio_init_out(&HALPriv->usb_switch, PB_14);
|
||||
gpio_mode(&HALPriv->usb_switch, OpenDrain);
|
||||
// Make sure to connect a 1.5K pull-up to USB-DP PA12 pin (permanent pull-up)
|
||||
// Make sure to connect a 1.5K resistor between USB-DP PA12 pin and +3.3V
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
pin_function(PA_11, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_MODE_AF_INPUT)); // DM
|
||||
pin_function(PA_12, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_MODE_AF_INPUT)); // DP
|
||||
|
|
|
@ -149,14 +149,6 @@ USBHAL::USBHAL(void) {
|
|||
pin_function(PA_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_OTG_FS)); // SOF
|
||||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
||||
|
||||
#elif defined(TARGET_DISCO_F429ZI)
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
pin_function(PB_14, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_OTG_HS_FS)); // DM
|
||||
pin_function(PB_15, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_OTG_HS_FS)); // DP
|
||||
pin_function(PB_13, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF12_OTG_HS_FS)); // VBUS
|
||||
pin_function(PB_12, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)); // ID
|
||||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
||||
|
||||
#elif defined(TARGET_DISCO_L475VG_IOT01A) || \
|
||||
defined(TARGET_DISCO_L476VG)
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
defined(TARGET_NUCLEO_F446ZE) || \
|
||||
defined(TARGET_NUCLEO_F767ZI) || \
|
||||
defined(TARGET_NUCLEO_F746ZG) || \
|
||||
defined(TARGET_DISCO_F429ZI) || \
|
||||
defined(TARGET_DISCO_F469NI) || \
|
||||
defined(TARGET_DISCO_F746NG) || \
|
||||
defined(TARGET_DISCO_F769NI) || \
|
||||
|
|
Loading…
Reference in New Issue