Skip to content

Commit 67ec52d

Browse files
committed
atmel-samd: Swap out pulseio for touchio based on FreeTouch.
1 parent 225fdb0 commit 67ec52d

File tree

9 files changed

+45
-2299
lines changed

9 files changed

+45
-2299
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
[submodule "lib/berkeley-db-1.xx"]
1212
path = lib/berkeley-db-1.xx
1313
url = https://github.com/pfalcon/berkeley-db-1.xx
14+
[submodule "atmel-samd/freetouch"]
15+
path = atmel-samd/freetouch
16+
url = [email protected]:adafruit/Adafruit_FreeTouch.git

atmel-samd/Makefile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ INC += $(addprefix -Iasf/sam0/,\
7373
)
7474
INC += -Iasf/thirdparty/CMSIS/Include
7575
INC += -Iboards/$(BOARD)/
76+
INC += -Ifreetouch/
7677
INC += -I$(BUILD)
7778

7879
CFLAGS_CORTEX_M0 = \
@@ -144,8 +145,8 @@ CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
144145
endif
145146

146147
#LIBM_FILE_NAME = $(shell $(CC) $(CFLAGS) -print-file-name=libm.a)
147-
LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -mthumb -mcpu=cortex-m0plus -Lasf/thirdparty/CMSIS/Lib/GCC/ -LQTouch/ -Wl,-nostdlib -Wl,-T,$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
148-
LIBS = -larm_cortexM0l_math -lsamd21_qtouch_gcc -lm -lgcc -lc
148+
LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -mthumb -mcpu=cortex-m0plus -Lasf/thirdparty/CMSIS/Lib/GCC/ -Wl,-nostdlib -Wl,-T,$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
149+
LIBS = -larm_cortexM0l_math -lm -lgcc -lc
149150

150151
SRC_ASF = $(addprefix asf/sam0/,\
151152
drivers/adc/adc_sam_d_r/adc.c \
@@ -201,6 +202,7 @@ SRC_C = \
201202
asf/sam0/utils/syscalls/gcc/syscalls.c \
202203
boards/$(BOARD)/init.c \
203204
boards/$(BOARD)/pins.c \
205+
freetouch/adafruit_ptc.c \
204206
lib/fatfs/ff.c \
205207
lib/fatfs/option/ccsbcs.c \
206208
lib/timeutils/timeutils.c \
@@ -236,17 +238,11 @@ SRC_BINDINGS = \
236238
busio/UART.c \
237239
neopixel_write/__init__.c \
238240
time/__init__.c \
241+
touchio/__init__.c \
242+
touchio/TouchIn.c \
239243
usb_hid/__init__.c \
240244
usb_hid/Device.c
241245

242-
# Handle touch support on its own since it only fits in the image when external
243-
# flash is used to store the file system.
244-
# TODO(tannewt): Remove this after we switch to freetouch and rely on the linker
245-
# to drop classes we don't need.
246-
ifneq ($(FLASH_IMPL),internal_flash.c)
247-
SRC_BINDINGS += touchio/__init__.c touchio/TouchIn.c
248-
endif
249-
250246
SRC_BINDINGS_EXPANDED = $(addprefix shared-bindings/, $(SRC_BINDINGS)) \
251247
$(addprefix common-hal/, $(SRC_BINDINGS))
252248

-64.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)