Skip to content

Commit 7292984

Browse files
dhalberttannewt
authored andcommitted
Implement busio.I2c.
* Added asf4_conf/samd*/hpl_sercom_config.h * Adjusted clocks in peripheral_clk_config.h. * Put some frozen libs back in CPX for testing. * Implement common-hal I2C * Add samd*_peripherals.h in parallel with samd*_pins.h for common functions and data. * Store SERCOM index in pins table for convenience. * Canonicalize some #include guard names in various .h files. simpler reset of SERCOMs; remove unused routine
1 parent 048f0f0 commit 7292984

27 files changed

Lines changed: 3199 additions & 1235 deletions

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,12 @@ _build
4848
# Generated rst files
4949
######################
5050
genrst/
51+
52+
# ctags and similar
53+
###################
54+
TAGS
55+
56+
# Merge leftovers
57+
#################
58+
*.orig
59+

ports/atmel-samd/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ SRC_ASF := \
169169
hal/src/hal_atomic.c \
170170
hal/src/hal_delay.c \
171171
hal/src/hal_flash.c \
172+
hal/src/hal_i2c_m_sync.c \
173+
hal/src/hal_io.c \
172174
hal/src/hal_sleep.c \
173175
hal/src/hal_timer.c \
174176
hal/src/hal_usb_device.c \
@@ -177,6 +179,7 @@ SRC_ASF := \
177179
hpl/nvmctrl/hpl_nvmctrl.c \
178180
hpl/pm/hpl_pm.c \
179181
hpl/rtc/hpl_rtc.c \
182+
hpl/sercom/hpl_sercom.c \
180183
hpl/systick/hpl_systick.c \
181184
hpl/tc/hpl_tc.c \
182185
hpl/usb/hpl_usb.c \
@@ -213,6 +216,7 @@ SRC_C = \
213216
flash_api.c \
214217
mphalport.c \
215218
reset.c \
219+
$(CHIP_FAMILY)_peripherals.c \
216220
$(CHIP_FAMILY)_pins.c \
217221
tick.c \
218222
usb.c \
@@ -246,23 +250,23 @@ endif
246250

247251
SRC_COMMON_HAL = \
248252
board/__init__.c \
253+
busio/__init__.c \
254+
busio/I2C.c \
249255
digitalio/__init__.c \
250256
digitalio/DigitalInOut.c \
251257
microcontroller/__init__.c \
252258
microcontroller/Pin.c \
253259
microcontroller/Processor.c \
254260
neopixel_write/__init__.c \
255261
os/__init__.c \
256-
time/__init__.c
262+
time/__init__.c \
257263
# analogio/__init__.c \
258264
analogio/AnalogIn.c \
259265
analogio/AnalogOut.c \
260266
audiobusio/__init__.c \
261267
audiobusio/PDMIn.c \
262268
audioio/__init__.c \
263269
audioio/AudioOut.c \
264-
busio/__init__.c \
265-
busio/I2C.c \
266270
busio/SPI.c \
267271
busio/UART.c \
268272
neopixel_write/__init__.c \

0 commit comments

Comments
 (0)