summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h1
-rw-r--r--ports/stm32f4/supervisor/usb.c14
-rw-r--r--supervisor/shared/usb/usb.c7
-rw-r--r--supervisor/usb.h2
4 files changed, 1 insertions, 23 deletions
diff --git a/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h b/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h
index b8e374f05..a438b5baa 100644
--- a/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h
+++ b/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h
@@ -33,7 +33,6 @@
#define FLASH_PAGE_SIZE (0x4000)
#define BOARD_OSC_DIV 25
-#define BOARD_NO_VBUS
// On-board flash
// #define SPI_FLASH_MOSI_PIN (&pin_PA07)
diff --git a/ports/stm32f4/supervisor/usb.c b/ports/stm32f4/supervisor/usb.c
index e3baf1412..95db0aafc 100644
--- a/ports/stm32f4/supervisor/usb.c
+++ b/ports/stm32f4/supervisor/usb.c
@@ -43,7 +43,6 @@ void init_usb_hardware(void) {
PA11 ------> USB_OTG_FS_DM
PA12 ------> USB_OTG_FS_DP
*/
-
__HAL_RCC_GPIOA_CLK_ENABLE();
/* Configure DM DP Pins */
@@ -59,7 +58,7 @@ void init_usb_hardware(void) {
/* Configure VBUS Pin */
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
never_reset_pin_number(0, 9);
@@ -84,14 +83,3 @@ void init_usb_hardware(void) {
/* Peripheral clock enable */
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
}
-
-void disable_usb_vbus(void) {
-
-#ifdef USB_OTG_GCCFG_VBDEN
- USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBDEN;
-#else
- USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS;
- USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN;
- USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN;
-#endif
-}
diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c
index fca08b4ee..c1d70c5b0 100644
--- a/supervisor/shared/usb/usb.c
+++ b/supervisor/shared/usb/usb.c
@@ -33,8 +33,6 @@
#include "lib/utils/interrupt_char.h"
#include "lib/mp-readline/readline.h"
-#include "py/mpconfig.h"
-
#include "tusb.h"
// Serial number as hex characters. This writes directly to the USB
@@ -74,11 +72,6 @@ void usb_init(void) {
#if CIRCUITPY_USB_MIDI
usb_midi_init();
#endif
-
-#ifdef BOARD_NO_VBUS
- disable_usb_vbus();
-#endif
-
}
void usb_background(void) {
diff --git a/supervisor/usb.h b/supervisor/usb.h
index 6b4082b6f..c87540d40 100644
--- a/supervisor/usb.h
+++ b/supervisor/usb.h
@@ -37,8 +37,6 @@ void usb_background(void);
// TinyUSB.
void init_usb_hardware(void);
-void disable_usb_vbus(void);
-
// Shared implementation.
bool usb_enabled(void);
void usb_init(void);