Skip to content

Commit b1b253c

Browse files
committed
fluff_m0: add pin aliases
Add aliases for SDI, SDO and EN, so that pin names match the text on the PCB to avoid confusion. Also disable all pins from port B, because that package of SAMD21 doesn't have port B.
1 parent 7ab5c52 commit b1b253c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,27 @@
1818
// USB is always used internally so skip the pin objects for it.
1919
#define IGNORE_PIN_PA24 1
2020
#define IGNORE_PIN_PA25 1
21+
22+
// There is no port B
23+
#define IGNORE_PIN_PB00 1
24+
#define IGNORE_PIN_PB01 1
25+
#define IGNORE_PIN_PB02 1
26+
#define IGNORE_PIN_PB03 1
27+
#define IGNORE_PIN_PB04 1
28+
#define IGNORE_PIN_PB05 1
29+
#define IGNORE_PIN_PB06 1
30+
#define IGNORE_PIN_PB07 1
31+
#define IGNORE_PIN_PB08 1
32+
#define IGNORE_PIN_PB09 1
33+
#define IGNORE_PIN_PB10 1
34+
#define IGNORE_PIN_PB11 1
35+
#define IGNORE_PIN_PB12 1
36+
#define IGNORE_PIN_PB13 1
37+
#define IGNORE_PIN_PB14 1
38+
#define IGNORE_PIN_PB15 1
39+
#define IGNORE_PIN_PB16 1
40+
#define IGNORE_PIN_PB17 1
41+
#define IGNORE_PIN_PB22 1
42+
#define IGNORE_PIN_PB23 1
43+
#define IGNORE_PIN_PB30 1
44+
#define IGNORE_PIN_PB31 1

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
1313

1414
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA31) },
1515
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA00) },
16+
{ MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_PA00) },
1617
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA30) },
18+
{ MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_PA30) },
1719

1820
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
1921
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
@@ -31,6 +33,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
3133
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
3234
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
3335
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA27) },
36+
{ MP_ROM_QSTR(MP_QSTR_EN), MP_ROM_PTR(&pin_PA27) },
3437
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA28) },
3538

3639
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },

0 commit comments

Comments
 (0)