-
Notifications
You must be signed in to change notification settings - Fork 934
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
Changes for pico2_w #1816
Changes for pico2_w #1816
Conversation
The changes I made in #1814 are happy with this new header-file 😃 |
ad9d321
to
6eb230a
Compare
f2f34e5
to
5715e24
Compare
I have a question about board naming, in particular whether there's a space in the "Pico" board names or not. There are currently the following board definition files in this repo: include/boards/pico.h: #define RASPBERRYPI_PICO
include/boards/pico_w.h: #define RASPBERRYPI_PICO_W
include/boards/pico2.h: #define RASPBERRYPI_PICO2 And then this PR adds: include/boards/pico2_w.h: #define RASPBERRYPI_PICO2_W That seems nice and consistent. From MicroPython's side we have the corresponding:
And then I guess we would add:
The board name matters because that's the name of the source directory, eg My main question is whether there should be a space between "Pico" and "2", because:
So that seems a little inconsistent, whether there's a space or not between the "Pico" and the "2", and then that would follow for the "Pico 2 W" (vs "Pico2 W"). I know this is a minor point, but we'd like to get the names correct in MicroPython so the board names, firmware names and download URL are correct and don't need to change in the future. Should we call our boards:
|
Our board header files have...
So I think PICO2_W is consistent. I seriously considered PICO2W but that's inconsistent with PICO_W which doesn't quite work as PICOW. I'll ask around if there's a policy Later: Officially, it's "Pico 2" and "Pico 2 W" with spaces. But I think we should leave things as they are. |
This is a copy of pico2 with the definitions from pico_w added. Set PICO_BOARD=pico2_w
cyw43_spi_init contains code to find a free PIO and state machine. This can all be replaced with pio_claim_free_sm_and_add_program_for_gpio_range
The CYW43 gpio pins are currently hardcoded. Give the defines better names and make them overrideable at build time. Note: CYW43_PIN_WL_REG_ON and CYW43_PIN_WL_HOST_WAKE are already used by the driver via cyw43_hal_* functions
Need to make sure the pio can work with all the gpios
Add CYW43_PIN_WL_DYNAMIC that means cyw43 gpio pins can be changed at runtime. Then CYW43_PIN_WL_* calls cyw43_get_pin_wl to get the gpio out of the array. cyw43_set_pins_wl can be used to change the cyw43 gpio pins although care is needed when calling this?
ddb3948
to
66bcde5
Compare
Add some PICO_CMAKE_CONFIG Stop using gpio_*_mask64 functions
@kilograham I think I resolved all the review comments in this. |
# PICO_CMAKE_CONFIG: CYW43_PIO_CLOCK_DIV_INT, integer component of pio clock divider used for cyw43 comms, type=int, default=2, group=pico_cyw43_driver | ||
target_compile_definitions(cyw43_driver_picow INTERFACE CYW43_PIO_CLOCK_DIV_INT=${CYW43_PIO_CLOCK_DIV_INT}) | ||
endif() | ||
if (CYW43_PIO_CLOCK_DIV_FRAC) |
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.
this should probably be _FRAC8 now, or probably we should add _FRAC8 too
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.
actually let's leave this for now; i'll fix with #1926
Changes for Pico 2 W