Skip to content

Commit ff6e6b5

Browse files
author
Matt Land
committed
best effort
1 parent 4e65752 commit ff6e6b5

File tree

8 files changed

+20
-0
lines changed

8 files changed

+20
-0
lines changed

ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@
4949
#include "external_flash/external_flash.h"
5050

5151
#define BOARD_HAS_CRYSTAL 1
52+
53+
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
54+
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)

ports/atmel-samd/boards/metro_m0_express/pins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "samd21_pins.h"
2+
#include "board_busses.h"
23

34
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
45
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
@@ -29,5 +30,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
2930
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
3031
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
3132
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
33+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
3234
};
3335
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

ports/atmel-samd/boards/trinket_m0/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
1515

1616
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
17+
18+
#define DEFAULT_I2C_BUS_SCL (&pin_PA09)
19+
#define DEFAULT_I2C_BUS_SDA (&pin_PA08)

ports/atmel-samd/boards/trinket_m0/pins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "samd21_pins.h"
2+
#include "board_busses.h"
23

34
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
45
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) },
@@ -27,5 +28,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
2728

2829
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) },
2930
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) },
31+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
3032
};
3133
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@
5454
#define EXTERNAL_FLASH_DEVICES W25Q32BV
5555

5656
#include "external_flash/external_flash.h"
57+
58+
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
59+
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)

ports/atmel-samd/boards/trinket_m0_haxpress/pins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "samd21_pins.h"
2+
#include "board_busses.h"
23

34
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
45
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) },
@@ -27,5 +28,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
2728

2829
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) },
2930
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) },
31+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
3032
};
3133
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

ports/atmel-samd/boards/ugame10/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@
4747
#define EXTERNAL_FLASH_DEVICES S25FL216K
4848

4949
#include "external_flash/external_flash.h"
50+
51+
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
52+
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)

ports/atmel-samd/boards/ugame10/pins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "samd21_pins.h"
2+
#include "board_busses.h"
23

34
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
45
{ MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) },
@@ -23,5 +24,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
2324
{ MP_ROM_QSTR(MP_QSTR_B), MP_ROM_PTR(&pin_PA14) },
2425
{ MP_ROM_QSTR(MP_QSTR_C), MP_ROM_PTR(&pin_PA15) },
2526
{ MP_ROM_QSTR(MP_QSTR_D), MP_ROM_PTR(&pin_PA28) },
27+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
2628
};
2729
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

0 commit comments

Comments
 (0)