diff options
| author | Ha Thach <[email protected]> | 2020-04-23 13:38:48 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-23 13:38:48 +0700 |
| commit | c39dc03331683167be3c2a6ca59a4ee8e6e6620d (patch) | |
| tree | d1abe5dc90fd2516adc063a938092fd7d04e80e3 /src | |
| parent | 1fab82c94a0753c0a59d217b9a8fbc42781d5c0d (diff) | |
| parent | 551724498acf0a3951d04e8f00173cbc58a4904c (diff) | |
Merge pull request #374 from duempel/stm32f1_synopsys_support
Added support for STM32F1 Connectivity Line MCU
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/st/synopsys/dcd_synopsys.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index 243ddd152..66ef44cf3 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -27,6 +27,11 @@ #include "tusb_option.h" +#if defined (STM32F105x8) || defined (STM32F105xB) || defined (STM32F105xC) || \ + defined (STM32F107xB) || defined (STM32F107xC) +#define STM32F1_SYNOPSYS +#endif + #if defined (STM32L475xx) || defined (STM32L476xx) || \ defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || \ defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || \ @@ -35,7 +40,8 @@ #endif #if TUSB_OPT_DEVICE_ENABLED && \ - ( CFG_TUSB_MCU == OPT_MCU_STM32F2 || \ + ( (CFG_TUSB_MCU == OPT_MCU_STM32F1 && defined(STM32F1_SYNOPSYS)) || \ + CFG_TUSB_MCU == OPT_MCU_STM32F2 || \ CFG_TUSB_MCU == OPT_MCU_STM32F4 || \ CFG_TUSB_MCU == OPT_MCU_STM32F7 || \ CFG_TUSB_MCU == OPT_MCU_STM32H7 || \ @@ -45,7 +51,11 @@ // TODO Support OTG_HS // EP_MAX : Max number of bi-directional endpoints including EP0 // EP_FIFO_SIZE : Size of dedicated USB SRAM -#if CFG_TUSB_MCU == OPT_MCU_STM32F2 +#if CFG_TUSB_MCU == OPT_MCU_STM32F1 + #include "stm32f1xx.h" + #define EP_MAX 4 + #define EP_FIFO_SIZE 1280 +#elif CFG_TUSB_MCU == OPT_MCU_STM32F2 #include "stm32f2xx.h" #define EP_MAX USB_OTG_FS_MAX_IN_ENDPOINTS #define EP_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE |
