stm32: Introduce MICROPY_HW_ENABLE_USB and clean up USB config.

This patch allows to completely compile-out support for USB, and no-USB is
now the default.  If a board wants to enable USB it should define:

    #define MICROPY_HW_ENABLE_USB (1)

And then one or more of the following to select the USB PHY:

    #define MICROPY_HW_USB_FS (1)
    #define MICROPY_HW_USB_HS (1)
    #define MICROPY_HW_USB_HS_IN_FS (1)
This commit is contained in:
Damien George
2018-02-13 18:51:08 +11:00
parent 8aad22fdca
commit 5c320bd0b0
10 changed files with 57 additions and 55 deletions

View File

@@ -76,11 +76,7 @@ void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
#ifdef USE_USB_FS
void OTG_FS_IRQHandler(void);
#endif
#ifdef USE_USB_HS
void OTG_HS_IRQHandler(void);
#endif
#endif // MICROPY_INCLUDED_STMHAL_STM32_IT_H