summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-08-22 19:12:11 +0700
committerGitHub <[email protected]>2020-08-22 19:12:11 +0700
commit88da422c7ce8e9c78150fc033d3f62467c0a3617 (patch)
treed875dcfd2107ac04bbddf775195763117e784dc5
parent97ca7a95499447b8ab9be67d4340a14ba52801cf (diff)
parent9d3a9cf546580907d0e72fd6e36e23050bcab850 (diff)
Merge pull request #493 from hathach/followup-490-samd11
add OPT_MCU_SAMD11
-rw-r--r--examples/device/cdc_msc/.skip.MCU_SAMD110
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_SAMD110
-rw-r--r--examples/device/dynamic_configuration/.skip.MCU_SAMD110
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_SAMD110
-rw-r--r--examples/device/msc_dual_lun/.skip.MCU_SAMD110
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_SAMD110
-rw-r--r--hw/bsp/board_mcu.h2
-rw-r--r--hw/bsp/samd11_xplained/board.mk2
-rw-r--r--src/portable/microchip/samd/dcd_samd.c5
-rw-r--r--src/tusb_option.h3
10 files changed, 7 insertions, 5 deletions
diff --git a/examples/device/cdc_msc/.skip.MCU_SAMD11 b/examples/device/cdc_msc/.skip.MCU_SAMD11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/device/cdc_msc/.skip.MCU_SAMD11
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11 b/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11
diff --git a/examples/device/dynamic_configuration/.skip.MCU_SAMD11 b/examples/device/dynamic_configuration/.skip.MCU_SAMD11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/device/dynamic_configuration/.skip.MCU_SAMD11
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_SAMD11 b/examples/device/hid_composite_freertos/.skip.MCU_SAMD11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/device/hid_composite_freertos/.skip.MCU_SAMD11
diff --git a/examples/device/msc_dual_lun/.skip.MCU_SAMD11 b/examples/device/msc_dual_lun/.skip.MCU_SAMD11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/device/msc_dual_lun/.skip.MCU_SAMD11
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_SAMD11 b/examples/device/net_lwip_webserver/.skip.MCU_SAMD11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/examples/device/net_lwip_webserver/.skip.MCU_SAMD11
diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h
index 15b31edfd..3382d465d 100644
--- a/hw/bsp/board_mcu.h
+++ b/hw/bsp/board_mcu.h
@@ -52,7 +52,7 @@
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
#include "nrf.h"
-#elif CFG_TUSB_MCU == OPT_MCU_SAMD21 || CFG_TUSB_MCU == OPT_MCU_SAMD51
+#elif CFG_TUSB_MCU == OPT_MCU_SAMD11 || CFG_TUSB_MCU == OPT_MCU_SAMD21 || CFG_TUSB_MCU == OPT_MCU_SAMD51
#include "sam.h"
#elif CFG_TUSB_MCU == OPT_MCU_SAMG
diff --git a/hw/bsp/samd11_xplained/board.mk b/hw/bsp/samd11_xplained/board.mk
index db0c62cf1..5b1a42157 100644
--- a/hw/bsp/samd11_xplained/board.mk
+++ b/hw/bsp/samd11_xplained/board.mk
@@ -9,7 +9,7 @@ CFLAGS += \
-D__SAMD11D14AM__ \
-DCONF_DFLL_OVERWRITE_CALIBRATION=0 \
-DOSC32K_OVERWRITE_CALIBRATION=0 \
- -DCFG_TUSB_MCU=OPT_MCU_SAMD21 \
+ -DCFG_TUSB_MCU=OPT_MCU_SAMD11 \
-fshort-enums \
-Os
diff --git a/src/portable/microchip/samd/dcd_samd.c b/src/portable/microchip/samd/dcd_samd.c
index d0cc8560a..f1dca88a5 100644
--- a/src/portable/microchip/samd/dcd_samd.c
+++ b/src/portable/microchip/samd/dcd_samd.c
@@ -27,7 +27,8 @@
#include "tusb_option.h"
#if TUSB_OPT_DEVICE_ENABLED && \
- (CFG_TUSB_MCU == OPT_MCU_SAMD21 || CFG_TUSB_MCU == OPT_MCU_SAMD51 || CFG_TUSB_MCU == OPT_MCU_SAME5X)
+ (CFG_TUSB_MCU == OPT_MCU_SAMD11 || CFG_TUSB_MCU == OPT_MCU_SAMD21 || \
+ CFG_TUSB_MCU == OPT_MCU_SAMD51 || CFG_TUSB_MCU == OPT_MCU_SAME5X)
#include "sam.h"
#include "device/dcd.h"
@@ -113,7 +114,7 @@ void dcd_int_disable(uint8_t rhport)
NVIC_DisableIRQ(USB_0_IRQn);
}
-#elif CFG_TUSB_MCU == OPT_MCU_SAMD21
+#elif CFG_TUSB_MCU == OPT_MCU_SAMD11 || CFG_TUSB_MCU == OPT_MCU_SAMD21
void dcd_int_enable(uint8_t rhport)
{
diff --git a/src/tusb_option.h b/src/tusb_option.h
index abf6450ca..7e486bff0 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -55,10 +55,11 @@
#define OPT_MCU_NRF5X 100 ///< Nordic nRF5x series
// SAM
+#define OPT_MCU_SAMD11 204 ///< MicroChip SAMD11
#define OPT_MCU_SAMD21 200 ///< MicroChip SAMD21
#define OPT_MCU_SAMD51 201 ///< MicroChip SAMD51
-#define OPT_MCU_SAMG 202 ///< MicroChip SAMDG series
#define OPT_MCU_SAME5X 203 ///< MicroChip SAM E5x
+#define OPT_MCU_SAMG 202 ///< MicroChip SAMDG series
// STM32
#define OPT_MCU_STM32F0 300 ///< ST STM32F0