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

pio: clean up FIFO-stuffing code #4162

Closed
jepler opened this issue Feb 9, 2021 · 0 comments · Fixed by #4251
Closed

pio: clean up FIFO-stuffing code #4162

jepler opened this issue Feb 9, 2021 · 0 comments · Fixed by #4251
Assignees
Labels
help wanted rp2040 Raspberry Pi RP2040
Milestone

Comments

@jepler
Copy link
Member

jepler commented Feb 9, 2021

@tannewt [observed](https://github.com/adafruit/circuitpython/pull/4155#pullrequestreview-586038240}:

I think it'd be clearer if you replaced the original if statements with while loops. That way you'd load up the 4 or 8 entry FIFO and then move on. 32 seems arbitrary and I'm skeptical you'd ever hit that many due to the FIFO size.

Just in case I don't get to this during some upcoming PIO work, I wanted it filed in an issue instead of in the review comments of a closed PR!

@jepler jepler added help wanted rp2040 Raspberry Pi RP2040 labels Feb 9, 2021
@tannewt tannewt added this to the 6.2.0 milestone Feb 9, 2021
@tannewt tannewt self-assigned this Feb 23, 2021
jepler pushed a commit that referenced this issue Feb 25, 2021
This adds I2SOut and PDMIn support via PIO.

StateMachines can now:
 * read and read while writing
 * transfer in 1, 2 or 4 byte increments
 * init pins based on expected defaults automatically
 * be stopped and restarted
 * rxfifo can be cleared and rxstalls detected (good for tracking when
   the reading code isn't keeping up)

Fixes #4162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted rp2040 Raspberry Pi RP2040
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants