Skip to content

Boards typos #270

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

Merged
merged 1 commit into from
Mar 24, 2021
Merged

Boards typos #270

merged 1 commit into from
Mar 24, 2021

Conversation

lurch
Copy link
Contributor

@lurch lurch commented Mar 19, 2021

No description provided.

@@ -74,4 +76,11 @@
// vgaboard has a Pico on it, so default anything we haven't set above
#include "boards/pico.h"

+// undefine UART if we're using 4-bit SD card (this needs to happen *after* including pico.h)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user may have overriden some of these themselves to make them not conflict (i do these sometimes - e.g. i sometimes steal bit 0 of red for stdout). we should probably check for overlap - (also not you can undefine TX and RX pins independently, and don't need to worry about undefining the PICO_DEFAULT_UART)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably check for overlap

So something like this?

#if (PICO_SD_DAT_PIN_COUNT == 4) && (VGABOARD_SD_DAT0_PIN == 19)
#if PICO_DEFAULT_UART_TX_PIN == 20
#undef PICO_DEFAULT_UART_TX_PIN
#endif
#if PICO_DEFAULT_UART_RX_PIN == 21
#undef PICO_DEFAULT_UART_RX_PIN
#endif
#endif

That feels a bit complicated, and there's obviously still corner-cases it'll miss out.
Alternatively I can remove the second commit from this PR if you'd prefer? (which is why I made them separate commits 😉 )

@kilograham
Copy link
Contributor

well it is very easy to forget that you lose your (default) UART pins with 4 pin SDIO. I would just leave it out for now though as I need to think some more about this - you can see this from picotool (that you have double-booked pins), and perhaps we should make it more obvious there.

@lurch
Copy link
Contributor Author

lurch commented Mar 22, 2021

I would just leave it out for now though

Done 👍

@kilograham kilograham merged commit 1d4588a into raspberrypi:develop-1.1.1 Mar 24, 2021
@lurch lurch deleted the boards_typos branch March 24, 2021 16:07
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