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

UART write never blocks and doesn't actually write to GPIO pins #115

Open
c1570 opened this issue Jan 26, 2023 · 1 comment
Open

UART write never blocks and doesn't actually write to GPIO pins #115

c1570 opened this issue Jan 26, 2023 · 1 comment

Comments

@c1570
Copy link
Contributor

c1570 commented Jan 26, 2023

Writing to the UART never blocks at the moment:

return (this.rxFIFO.full ? RXFF : 0) | (this.rxFIFO.empty ? RXFE : 0) | TXFE;

This also means that printf() using pico_stdio_uart is way faster in emulation than in reality quite often (basically whenever the silicon 8 byte TX buffer is exhausted).

Additionally, using the UART doesn't actually change the GPIO pins but only triggers the onByte() callback:

this.onByte?.(value & 0xff);

Probably not a big deal but worth documenting anyways.

@Erhannis
Copy link

Oh - good thing you mentioned this, one of the first things I was about to do was depend on those GPIO pins being written, hahaha

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

No branches or pull requests

2 participants