-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove UART object and use pins for IR #9389
Conversation
ports/raspberrypi/boards/bradanlanestudio_explorer_rp2040/mpconfigboard.h
Show resolved
Hide resolved
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text | ||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Shapes | ||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID | ||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IRRemote | ||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_asyncio | ||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alphabetize these for ease of finding things.
// GPIO0 and GPIO1 are used for IR and not for UART | ||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, | ||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about renaming these, because TX
and RX
are traditionally used for UART? On CPX and other boards, we use these names:
// GPIO0 and GPIO1 are used for IR and not for UART | |
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, | |
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, | |
{ MP_ROM_QSTR(MP_QSTR_IR_TX), MP_ROM_PTR(&pin_GPIO0) }, | |
{ MP_ROM_QSTR(MP_QSTR_IR_ RX), MP_ROM_PTR(&pin_GPIO1) }, |
@@ -111,17 +111,16 @@ static const mp_rom_map_elem_t board_module_globals_table[] = { | |||
{ MP_ROM_QSTR(MP_QSTR_TOUCH9), MP_ROM_PTR(&pin_GPIO27) }, | |||
|
|||
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, | |||
// GPIO28 is also the interrupt pin of the accelerometer | |||
{ MP_ROM_QSTR(MP_QSTR_ACCEL_INT), MP_ROM_PTR(&pin_GPIO28) }, | |||
// GPIO28 is also the interrupt pin of the accelerometer on some boards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THe GPIO28 pin alias was removed. Was that intentional? If so remove the line 114 comment.
// GPIO29 is also the ID value of the board (an analog read value between 0 .. 4096) | ||
// { MP_ROM_QSTR(MP_QSTR_VID), MP_ROM_PTR(&pin_GPIO29) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not true anymore, just remove.
// GPIO29 is also the ID value of the board (an analog read value between 0 .. 4096) | |
// { MP_ROM_QSTR(MP_QSTR_VID), MP_ROM_PTR(&pin_GPIO29) }, |
I made requested changes. the comments in pins.h have been updated and remain relevant for future maintenance of the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks for for the changes!
I continue to get email notifications on this PR for "Build CI / mpy-cross-mac" failed. |
The RP2040 Explorer Badge used traditional IR capabilities. These use GP0 and GP1 which were previously anticipated to be exposed for UART. They are no longer exposed as pins and are dedicated to the RI emitter and IR receiver.