Skip to content

Commit 3eaa22b

Browse files
committed
Update pins.c file and fixed DEFAULT_I2C configuration
1 parent da9440f commit 3eaa22b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

ports/raspberrypi/boards/cytron_maker_uno_rp2040/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* The MIT License (MIT)
55
*
6-
* Copyright (c) 2021 Scott Shawcroft for Adafruit Industries
6+
* Copyright (c) 2023 Noqman for Cytron Technologies
77
*
88
* Permission is hereby granted, free of charge, to any person obtaining a copy
99
* of this software and associated documentation files (the "Software"), to deal

ports/raspberrypi/boards/cytron_maker_uno_rp2040/mpconfigboard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#define MICROPY_HW_NEOPIXEL (&pin_GPIO25)
55

6-
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO20)
7-
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO21)
6+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO21)
7+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO20)
88

99
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO10)
1010
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11)

ports/raspberrypi/boards/cytron_maker_uno_rp2040/pins.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
66
{ MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) },
77
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) },
88
{ MP_ROM_QSTR(MP_QSTR_LED0), MP_ROM_PTR(&pin_GPIO0) },
9+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO0) },
10+
911

1012
{ MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) },
1113
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) },
1214
{ MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_GPIO1) },
15+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO1) },
16+
1317

1418
{ MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) },
1519
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) },
1620
{ MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_GPIO2) },
21+
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO2) },
1722

1823
{ MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) },
1924
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) },
@@ -38,6 +43,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3843
{ MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) },
3944
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) },
4045
{ MP_ROM_QSTR(MP_QSTR_LED8), MP_ROM_PTR(&pin_GPIO8) },
46+
{ MP_ROM_QSTR(MP_QSTR_BUZZER), MP_ROM_PTR(&pin_GPIO8) },
4147

4248
{ MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) },
4349
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) },
@@ -78,13 +84,14 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
7884

7985
{ MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) },
8086
{ MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) },
87+
{ MP_ROM_QSTR(MP_QSTR_LED20), MP_ROM_PTR(&pin_GPI20) },
8188
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) },
8289

8390
{ MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) },
8491
{ MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) },
92+
{ MP_ROM_QSTR(MP_QSTR_LED21), MP_ROM_PTR(&pin_GPI21) },
8593
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) },
8694

87-
8895
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
8996
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
9097
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) },
@@ -101,7 +108,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
101108
{ MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) },
102109
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) },
103110

104-
111+
{ MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) },
105112
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO25) },
106113
{ MP_ROM_QSTR(MP_QSTR_RGB), MP_ROM_PTR(&pin_GPIO25) },
107114

0 commit comments

Comments
 (0)