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

Fix pin ordering for pins with names in pio_spi_flash #524

Closed
wants to merge 1 commit into from

Conversation

will-v-pi
Copy link
Contributor

bi_4pins_with_names does not have any ordering as it's a pin mask, so the pins must be in order, which cannot be guaranteed here depending on the default pins. This causes the names to appear next to the wrong pins in picotool info

Eg for pico, with

#define PICO_DEFAULT_SPI_SCK_PIN 18
#define PICO_DEFAULT_SPI_TX_PIN 19
#define PICO_DEFAULT_SPI_RX_PIN 16
#define PICO_DEFAULT_SPI_CSN_PIN 17

picotool info -p shows

16:  SPI RX
17:  SPI TX
18:  SPI SCK
19:  SPI CS

This will throw a compilation error once pico-sdk/#1791 is merged, so this should be merged before that

Switch to 4 spearate bi_1pin_with_name to ensure the right name matches the right pin

@will-v-pi will-v-pi added this to the 2.0.1 milestone Aug 21, 2024
@will-v-pi will-v-pi marked this pull request as draft August 21, 2024 11:37
@will-v-pi will-v-pi closed this Aug 22, 2024
@will-v-pi will-v-pi deleted the pio-pins-name-order branch August 22, 2024 17:29
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.

1 participant