Skip to content
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

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

bradanlane
Copy link

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.

Comment on lines 20 to 25
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
Copy link
Collaborator

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.

Comment on lines 41 to 43
// 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) },
Copy link
Collaborator

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:

Suggested change
// 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
Copy link
Collaborator

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.

Comment on lines 117 to 118
// 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) },
Copy link
Collaborator

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.

Suggested change
// 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) },

@bradanlane
Copy link
Author

I made requested changes. the comments in pins.h have been updated and remain relevant for future maintenance of the code.

Copy link
Collaborator

@dhalbert dhalbert left a 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!

@dhalbert dhalbert merged commit dfcd4a9 into adafruit:main Jul 1, 2024
14 of 15 checks passed
@bradanlane
Copy link
Author

I continue to get email notifications on this PR for "Build CI / mpy-cross-mac" failed.
If there any way to stop the emails or correct for the error?

@bradanlane bradanlane deleted the bls_rp2040_explorer_uart branch July 23, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants