mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
stm32/usbd_conf: Fix build for boards with USB disabled.
Some boards (eg NUCLEO_G0B1RE and NUCLEO_G474RE) have USB disabled but still configure MICROPY_HW_USB_FS/HS for the cases where USB does get enabled. Such a configuration should not build any of the code in `usbd_conf.c`, nor the USB interrupt handlers. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -301,6 +301,8 @@ void DebugMon_Handler(void) {
|
||||
/* file (startup_stm32f4xx.s). */
|
||||
/******************************************************************************/
|
||||
|
||||
#if MICROPY_HW_STM_USB_STACK || MICROPY_HW_TINYUSB_STACK
|
||||
|
||||
#if defined(STM32G0)
|
||||
|
||||
#if MICROPY_HW_USB_FS
|
||||
@@ -499,6 +501,8 @@ void OTG_HS_WKUP_IRQHandler(void) {
|
||||
|
||||
#endif // !defined(STM32L0)
|
||||
|
||||
#endif // MICROPY_HW_STM_USB_STACK || MICROPY_HW_TINYUSB_STACK
|
||||
|
||||
/**
|
||||
* @brief This function handles PPP interrupt request.
|
||||
* @param None
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "irq.h"
|
||||
#include "usb.h"
|
||||
|
||||
#if MICROPY_HW_USB_FS || MICROPY_HW_USB_HS
|
||||
#if MICROPY_HW_STM_USB_STACK || MICROPY_HW_TINYUSB_STACK
|
||||
|
||||
#if BUILDING_MBOOT
|
||||
// TinyUSB not used in mboot
|
||||
|
||||
Reference in New Issue
Block a user