remove UART object and use pins for IR#9389
remove UART object and use pins for IR#9389dhalbert merged 2 commits intoadafruit:mainfrom bradanlane:bls_rp2040_explorer_uart
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.
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.
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) }, |
| { 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.
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.
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. |
dhalbert
left a comment
There was a problem hiding this comment.
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.