Skip to content

Commit 7e08347

Browse files
committed
atmel-samd: Support composite CDC and mass storage USB device.
Be careful to not use the flash file system while using mass storage because both pieces of code attempting to change the fs can corrupt it.
1 parent 1fa4c20 commit 7e08347

File tree

41 files changed

+16143
-1680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+16143
-1680
lines changed

atmel-samd/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ INC += -I../lib/timeutils
3434
INC += -Icommon-hal/modules/
3535
INC += -Iasf/common/boards/
3636
INC += -Iasf/common/services/sleepmgr/
37+
INC += -Iasf/common/services/storage/ctrl_access/
3738
INC += -Iasf/common/services/usb/
3839
INC += -Iasf/common/services/usb/class/cdc/
3940
INC += -Iasf/common/services/usb/class/cdc/device/
41+
INC += -Iasf/common/services/usb/class/msc/
42+
INC += -Iasf/common/services/usb/class/msc/device/
4043
INC += -Iasf/common/services/usb/udc/
4144
INC += -Iasf/common/utils
4245
INC += -Iasf/common2/services/delay/
@@ -77,8 +80,8 @@ CFLAGS_CORTEX_M0 = \
7780
-fsingle-precision-constant \
7881
-Wdouble-promotion \
7982
-D__SAMD21G18A__ \
80-
-DUSB_DEVICE_PRODUCT_ID=0x024D \
81-
-DUSB_DEVICE_VENDOR_ID=0x4123 \
83+
-DUSB_DEVICE_PRODUCT_ID=$(USB_PID) \
84+
-DUSB_DEVICE_VENDOR_ID=$(USB_VID) \
8285
-DBOARD=USER_BOARD \
8386
-ffunction-sections \
8487
-fdata-sections \
@@ -141,11 +144,14 @@ SRC_C = \
141144
modutime.c \
142145
mphalport.c \
143146
pin_named_pins.c \
147+
rom_fs.c \
144148
storage.c \
145149
uart.c \
146150
asf/common/services/sleepmgr/samd/sleepmgr.c \
151+
asf/common/services/storage/ctrl_access/ctrl_access.c \
147152
asf/common/services/usb/class/cdc/device/udi_cdc.c \
148-
asf/common/services/usb/class/cdc/device/udi_cdc_desc.c \
153+
asf/common/services/usb/class/composite/device/udi_composite_desc.c \
154+
asf/common/services/usb/class/msc/device/udi_msc.c \
149155
asf/common/services/usb/udc/udc.c \
150156
asf/common/utils/interrupt/interrupt_sam_nvic.c \
151157
asf/common2/services/delay/sam0/systick_counter.c \

0 commit comments

Comments
 (0)