Skip to content

Commit 79d182d

Browse files
robert-hhdpgeorge
authored andcommitted
samd/machine_i2c_target: Support I2C target mode.
Supporting readfrom_mem*(). writeto_mem() and a set of IRQs. Enabled by default for SAMD51 devices and SAMD21 devices with external flash. Tested with ItsyBitsy M4 and ItsyBitsy M0 with both on-board SoftI2C and a RP2 Pico as controller. Signed-off-by: Damien George <[email protected]> Signed-off-by: robert-hh <[email protected]>
1 parent 5c78762 commit 79d182d

File tree

10 files changed

+259
-26
lines changed

10 files changed

+259
-26
lines changed

ports/samd/boards/ADAFRUIT_NEOKEY_TRINKEY/mpconfigboard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define MICROPY_PY_MACHINE_SOFTI2C (0)
99
#define MICROPY_PY_MACHINE_SOFTSPI (0)
1010
#define MICROPY_PY_MACHINE_I2C (0)
11+
#define MICROPY_PY_MACHINE_I2C_TARGET (0)
1112
#define MICROPY_PY_MACHINE_SPI (0)
1213
#define MICROPY_PY_MACHINE_UART (0)
1314
#define MICROPY_PY_MACHINE_ADC (0)

ports/samd/machine_i2c.c

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@
2929

3030
#if MICROPY_PY_MACHINE_I2C
3131

32-
#include "py/mphal.h"
3332
#include "py/mperrno.h"
3433
#include "extmod/modmachine.h"
3534
#include "samd_soc.h"
3635
#include "pin_af.h"
3736
#include "genhdr/pins.h"
38-
#include "clock_config.h"
3937

4038
#define DEFAULT_I2C_FREQ (400000)
4139
#define RISETIME_NS (200)
@@ -79,9 +77,9 @@ static void i2c_send_command(Sercom *i2c, uint8_t command) {
7977
}
8078

8179
void common_i2c_irq_handler(int i2c_id) {
82-
// handle Sercom I2C IRQ
80+
// Handle Sercom I2C IRQ for controller mode.
8381
machine_i2c_obj_t *self = MP_STATE_PORT(sercom_table[i2c_id]);
84-
// Handle IRQ
82+
8583
if (self != NULL) {
8684
Sercom *i2c = self->instance;
8785
// For now, clear all interrupts
@@ -114,7 +112,8 @@ void common_i2c_irq_handler(int i2c_id) {
114112
} else { // On any error, e.g. ARBLOST or BUSERROR, stop the transmission
115113
self->len = 0;
116114
self->state = state_buserr;
117-
i2c->I2CM.INTFLAG.reg |= SERCOM_I2CM_INTFLAG_ERROR;
115+
i2c->I2CM.INTFLAG.reg = SERCOM_I2CM_INTFLAG_ERROR |
116+
SERCOM_I2CM_INTFLAG_SB | SERCOM_I2CM_INTFLAG_MB;
118117
}
119118
}
120119
}
@@ -158,28 +157,19 @@ mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n
158157
// Get the peripheral object.
159158
machine_i2c_obj_t *self = mp_obj_malloc(machine_i2c_obj_t, &machine_i2c_type);
160159
self->id = id;
161-
self->instance = sercom_instance[self->id];
160+
self->instance = sercom_instance[id];
162161

163162
// Set SCL/SDA pins.
164-
self->scl = mp_hal_get_pin_obj(args[ARG_scl].u_obj);
165-
self->sda = mp_hal_get_pin_obj(args[ARG_sda].u_obj);
163+
self->sda = pin_config_for_i2c(args[ARG_sda].u_obj, id, 0);
164+
self->scl = pin_config_for_i2c(args[ARG_scl].u_obj, id, 1);
165+
MP_STATE_PORT(sercom_table[id]) = self;
166166

167-
sercom_pad_config_t scl_pad_config = get_sercom_config(self->scl, self->id);
168-
sercom_pad_config_t sda_pad_config = get_sercom_config(self->sda, self->id);
169-
if (sda_pad_config.pad_nr != 0 || scl_pad_config.pad_nr != 1) {
170-
mp_raise_ValueError(MP_ERROR_TEXT("invalid sda/scl pin"));
171-
}
172-
MP_STATE_PORT(sercom_table[self->id]) = self;
173167
self->freq = args[ARG_freq].u_int;
174168
// The unit for ARG_timeout is us, but the code uses ms.
175169
self->timeout = args[ARG_timeout].u_int / 1000;
176170

177-
// Configure the Pin mux.
178-
mp_hal_set_pin_mux(self->scl, scl_pad_config.alt_fct);
179-
mp_hal_set_pin_mux(self->sda, sda_pad_config.alt_fct);
180-
181171
// Set up the clocks
182-
enable_sercom_clock(self->id);
172+
enable_sercom_clock(id);
183173

184174
// Initialise the I2C peripheral
185175
Sercom *i2c = self->instance;
@@ -207,13 +197,13 @@ mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n
207197
i2c->I2CM.BAUD.reg = baud;
208198

209199
// Enable interrupts
210-
sercom_register_irq(self->id, &common_i2c_irq_handler);
200+
sercom_register_irq(id, &common_i2c_irq_handler);
211201
#if defined(MCU_SAMD21)
212-
NVIC_EnableIRQ(SERCOM0_IRQn + self->id);
202+
NVIC_EnableIRQ(SERCOM0_IRQn + id);
213203
#elif defined(MCU_SAMD51)
214-
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * self->id); // MB interrupt
215-
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * self->id + 1); // SB interrupt
216-
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * self->id + 3); // ERROR interrupt
204+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id); // MB interrupt
205+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id + 1); // SB interrupt
206+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id + 3); // ERROR interrupt
217207
#endif
218208

219209
// Now enable I2C.

ports/samd/machine_i2c_target.c

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2020-2021 Damien P. George
7+
* Copyright (c) 2022-2025 Robert Hammelrath
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a copy
10+
* of this software and associated documentation files (the "Software"), to deal
11+
* in the Software without restriction, including without limitation the rights
12+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
* copies of the Software, and to permit persons to whom the Software is
14+
* furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included in
17+
* all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
* THE SOFTWARE.
26+
*/
27+
28+
#include "py/runtime.h"
29+
#include "samd_soc.h"
30+
#include "pin_af.h"
31+
#include "genhdr/pins.h"
32+
33+
#define TRANSMIT (1)
34+
#define RECEIVE (0)
35+
#define NACK_RECVD (i2c->I2CS.STATUS.bit.RXNACK == 1)
36+
#define IRQ_AMATCH (i2c->I2CS.INTFLAG.bit.AMATCH == 1)
37+
#define IRQ_DRDY (i2c->I2CS.INTFLAG.bit.DRDY == 1)
38+
#define IRQ_STOP (i2c->I2CS.INTFLAG.bit.PREC == 1)
39+
40+
#define PREPARE_ACK i2c->I2CS.CTRLB.bit.ACKACT = 0
41+
#define PREPARE_NACK i2c->I2CS.CTRLB.bit.ACKACT = 1
42+
43+
typedef struct _machine_i2c_target_obj_t {
44+
mp_obj_base_t base;
45+
Sercom *instance;
46+
uint8_t id;
47+
uint8_t scl;
48+
uint8_t sda;
49+
uint8_t addr;
50+
uint8_t direction;
51+
} machine_i2c_target_obj_t;
52+
53+
void common_i2c_target_irq_handler(int i2c_id) {
54+
// Handle Sercom I2C IRQ for target memory mode.
55+
machine_i2c_target_obj_t *self = MP_STATE_PORT(sercom_table[i2c_id]);
56+
machine_i2c_target_data_t *data = &machine_i2c_target_data[i2c_id];
57+
58+
if (self != NULL) {
59+
Sercom *i2c = self->instance;
60+
61+
if (IRQ_AMATCH) {
62+
// Address match.
63+
self->direction = i2c->I2CS.STATUS.bit.DIR;
64+
machine_i2c_target_data_addr_match(data, self->direction);
65+
// Send ACK
66+
i2c->I2CS.CTRLB.bit.CMD = 3;
67+
68+
} else if (IRQ_DRDY) {
69+
// Data to be handled, depending in the direction
70+
if (self->direction == TRANSMIT) {
71+
machine_i2c_target_data_read_request(self, data);
72+
} else {
73+
machine_i2c_target_data_write_request(self, data);
74+
}
75+
// ACK will be sent in mp_machine_i2c_target_read_bytes/mp_machine_i2c_target_write_bytes.
76+
} else if (IRQ_STOP) {
77+
// Stop detected. Just reset the data machine.
78+
machine_i2c_target_data_stop(data);
79+
i2c->I2CS.INTFLAG.reg |= SERCOM_I2CS_INTFLAG_PREC;
80+
81+
} else { // On any error clear the interrupts and reset the data state.
82+
machine_i2c_target_data_stop(data);
83+
i2c->I2CS.INTFLAG.reg = SERCOM_I2CS_INTFLAG_ERROR | SERCOM_I2CS_INTFLAG_AMATCH |
84+
SERCOM_I2CS_INTFLAG_DRDY | SERCOM_I2CS_INTFLAG_PREC;
85+
}
86+
}
87+
}
88+
89+
/******************************************************************************/
90+
// I2CTarget port implementation
91+
92+
static inline size_t mp_machine_i2c_target_get_index(machine_i2c_target_obj_t *self) {
93+
return self->id;
94+
}
95+
96+
static void mp_machine_i2c_target_event_callback(machine_i2c_target_irq_obj_t *irq) {
97+
mp_irq_handler(&irq->base);
98+
}
99+
100+
static size_t mp_machine_i2c_target_read_bytes(machine_i2c_target_obj_t *self, size_t len, uint8_t *buf) {
101+
Sercom *i2c = self->instance;
102+
buf[0] = i2c->I2CS.DATA.reg;
103+
i2c->I2CS.CTRLB.bit.CMD = 3; // send ACK
104+
return 1;
105+
}
106+
107+
static size_t mp_machine_i2c_target_write_bytes(machine_i2c_target_obj_t *self, size_t len, const uint8_t *buf) {
108+
Sercom *i2c = self->instance;
109+
i2c->I2CS.DATA.reg = buf[0];
110+
i2c->I2CS.CTRLB.bit.CMD = 3; // send ACK
111+
return 1;
112+
}
113+
114+
static inline void mp_machine_i2c_target_irq_config(machine_i2c_target_obj_t *self, unsigned int trigger) {
115+
(void)self;
116+
(void)trigger;
117+
}
118+
119+
mp_obj_t mp_machine_i2c_target_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
120+
enum { ARG_id, ARG_addr, ARG_addrsize, ARG_mem, ARG_mem_addrsize, ARG_scl, ARG_sda };
121+
static const mp_arg_t allowed_args[] = {
122+
#if MICROPY_HW_DEFAULT_I2C_ID < 0
123+
{ MP_QSTR_id, MP_ARG_REQUIRED | MP_ARG_INT, {.u_int = -1} },
124+
#else
125+
{ MP_QSTR_id, MP_ARG_INT, {.u_int = MICROPY_HW_DEFAULT_I2C_ID} },
126+
#endif
127+
{ MP_QSTR_addr, MP_ARG_REQUIRED | MP_ARG_INT },
128+
{ MP_QSTR_addrsize, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 7} },
129+
{ MP_QSTR_mem, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} },
130+
{ MP_QSTR_mem_addrsize, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 8} },
131+
#if defined(pin_SCL) && defined(pin_SDA)
132+
{ MP_QSTR_scl, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = pin_SCL} },
133+
{ MP_QSTR_sda, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = pin_SDA} },
134+
#else
135+
{ MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} },
136+
{ MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} },
137+
#endif
138+
};
139+
140+
// Parse args.
141+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
142+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
143+
144+
// Get I2C bus.
145+
int id = args[ARG_id].u_int;
146+
if (id < 0 || id >= SERCOM_INST_NUM) {
147+
mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("I2C(%d) doesn't exist"), id);
148+
}
149+
150+
// Get the peripheral object.
151+
machine_i2c_target_obj_t *self = mp_obj_malloc_with_finaliser(machine_i2c_target_obj_t, &machine_i2c_target_type);
152+
self->id = id;
153+
self->instance = sercom_instance[id];
154+
155+
// Set SCL/SDA pins.
156+
self->sda = pin_config_for_i2c(args[ARG_sda].u_obj, id, 0);
157+
self->scl = pin_config_for_i2c(args[ARG_scl].u_obj, id, 1);
158+
159+
MP_STATE_PORT(sercom_table[id]) = self;
160+
161+
// Get the address and initialise data.
162+
self->addr = args[ARG_addr].u_int;
163+
MP_STATE_PORT(machine_i2c_target_mem_obj)[id] = args[ARG_mem].u_obj;
164+
machine_i2c_target_data_t *data = &machine_i2c_target_data[id];
165+
machine_i2c_target_data_init(data, args[ARG_mem].u_obj, args[ARG_mem_addrsize].u_int);
166+
167+
// Set up the clocks
168+
enable_sercom_clock(id);
169+
170+
// Initialise the I2C peripheral
171+
Sercom *i2c = self->instance;
172+
// Reset the device
173+
i2c->I2CS.CTRLA.reg = SERCOM_I2CM_CTRLA_SWRST;
174+
while (i2c->I2CS.SYNCBUSY.bit.SWRST == 1) {
175+
}
176+
177+
// Set to slave mode, enable SCl timeout, set the address
178+
i2c->I2CS.CTRLA.reg = SERCOM_I2CS_CTRLA_MODE(0x04)
179+
| SERCOM_I2CS_CTRLA_SEXTTOEN | SERCOM_I2CS_CTRLA_LOWTOUTEN;
180+
i2c->I2CS.ADDR.reg = self->addr << 1;
181+
182+
// Enable interrupts
183+
sercom_register_irq(id, &common_i2c_target_irq_handler);
184+
#if defined(MCU_SAMD21)
185+
NVIC_EnableIRQ(SERCOM0_IRQn + id);
186+
#elif defined(MCU_SAMD51)
187+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id);
188+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id + 1);
189+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id + 2);
190+
NVIC_EnableIRQ(SERCOM0_0_IRQn + 4 * id + 3);
191+
#endif
192+
i2c->I2CS.INTENSET.reg = SERCOM_I2CS_INTENSET_DRDY | SERCOM_I2CS_INTENSET_AMATCH |
193+
SERCOM_I2CS_INTENSET_PREC | SERCOM_I2CS_INTENSET_ERROR;
194+
195+
// Now enable I2C.
196+
sercom_enable(i2c, 1);
197+
198+
return MP_OBJ_FROM_PTR(self);
199+
}
200+
201+
static void mp_machine_i2c_target_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
202+
machine_i2c_target_obj_t *self = MP_OBJ_TO_PTR(self_in);
203+
mp_printf(print, "I2C(%u, scl=\"%q\", sda=\"%q\", addr=%u)",
204+
self->id, pin_find_by_id(self->scl)->name, pin_find_by_id(self->sda)->name,
205+
self->addr);
206+
}
207+
208+
// Stop the Slave transfer and free the memory objects.
209+
static void mp_machine_i2c_target_deinit(machine_i2c_target_obj_t *self) {
210+
// Disable I2C
211+
sercom_enable(self->instance, 0);
212+
MP_STATE_PORT(sercom_table[self->id]) = NULL;
213+
}

ports/samd/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "py/mperrno.h"
3131
#include "py/mphal.h"
3232
#include "py/stackctrl.h"
33+
#include "extmod/modmachine.h"
3334
#include "shared/readline/readline.h"
3435
#include "shared/runtime/gchelper.h"
3536
#include "shared/runtime/pyexec.h"
@@ -101,7 +102,7 @@ void samd_main(void) {
101102
mp_usbd_deinit();
102103
#endif
103104
gc_sweep_all();
104-
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
105+
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_I2C_TARGET || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
105106
sercom_deinit_all();
106107
#endif
107108
mp_deinit();

ports/samd/mcu/samd21/mpconfigmcu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ unsigned long trng_random_u32(int delay);
7878
#ifndef MICROPY_PY_ONEWIRE
7979
#define MICROPY_PY_ONEWIRE (SAMD21_EXTRA_FEATURES)
8080
#endif
81+
#ifndef MICROPY_PY_MACHINE_I2C_TARGET
82+
#define MICROPY_PY_MACHINE_I2C_TARGET (SAMD21_EXTRA_FEATURES)
83+
#endif
8184

8285
#ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU
8386
#define MICROPY_PY_MACHINE_PIN_BOARD_CPU (1)

ports/samd/mcu/samd51/mpconfigmcu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#define MICROPY_PY_RANDOM_SEED_INIT_FUNC (trng_random_u32())
1717
unsigned long trng_random_u32(void);
1818
#define MICROPY_PY_MACHINE_UART_IRQ (1)
19+
#ifndef MICROPY_PY_MACHINE_I2C_TARGET
20+
#define MICROPY_PY_MACHINE_I2C_TARGET (1)
21+
#endif
1922

2023
// fatfs configuration used in ffconf.h
2124
#define MICROPY_FATFS_ENABLE_LFN (1)

ports/samd/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@
127127
#define MICROPY_PY_MACHINE_WDT_INCLUDEFILE "ports/samd/machine_wdt.c"
128128
#define MICROPY_PY_MACHINE_WDT_TIMEOUT_MS (1)
129129
#define MICROPY_PLATFORM_VERSION "ASF4"
130+
#define MICROPY_PY_MACHINE_I2C_TARGET_INCLUDEFILE "ports/samd/machine_i2c_target.c"
131+
#define MICROPY_PY_MACHINE_I2C_TARGET_MAX (SERCOM_INST_NUM)
132+
#define MICROPY_PY_MACHINE_I2C_TARGET_HARD_IRQ (1)
133+
#define MICROPY_PY_MACHINE_I2C_TARGET_FINALISER (1)
130134

131135
#define MP_STATE_PORT MP_STATE_VM
132136

ports/samd/pin_af.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,19 @@ pwm_config_t get_pwm_config(int pin_id, int wanted_dev, uint8_t device_status[])
161161
}
162162

163163
#endif
164+
165+
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_I2C_TARGET
166+
167+
// Configure a I2C pin. Used by machine_i2c.c and machine_i2c_target.c.
168+
uint8_t pin_config_for_i2c(mp_obj_t pin_obj, uint8_t id, uint8_t pad_nr) {
169+
uint8_t pin = mp_hal_get_pin_obj(pin_obj);
170+
sercom_pad_config_t pad_config = get_sercom_config(pin, id);
171+
if (pad_config.pad_nr != pad_nr) {
172+
mp_raise_ValueError(MP_ERROR_TEXT("invalid sda/scl pin"));
173+
}
174+
// Configure the Pin mux.
175+
mp_hal_set_pin_mux(pin, pad_config.alt_fct);
176+
return pin;
177+
}
178+
179+
#endif

ports/samd/pin_af.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,5 @@ adc_config_t get_adc_config(int pin_id, int32_t flag);
100100
pwm_config_t get_pwm_config(int pin_id, int wanted_dev, uint8_t used_dev[]);
101101
const machine_pin_obj_t *pin_find_by_id(int pin_id);
102102
const machine_pin_obj_t *pin_find(mp_obj_t pin);
103+
104+
uint8_t pin_config_for_i2c(mp_obj_t pin_obj, uint8_t id, uint8_t pad_nr);

ports/samd/samd_soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void samd_init(void) {
122122
machine_rtc_start(false);
123123
}
124124

125-
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
125+
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_I2C_TARGET || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
126126

127127
Sercom *sercom_instance[] = SERCOM_INSTS;
128128
MP_REGISTER_ROOT_POINTER(void *sercom_table[SERCOM_INST_NUM]);

0 commit comments

Comments
 (0)