embassy-rp: Add PioClk [and mclk to I2S] #4962
Open
+216
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a simple PIO program for outputting a square wave of given frequency.
Switch to pio_programs::clock_divider::calculate_pio_clock_divider_value for clock divider calculation for I2S PIO programs.
Change PioBatch to enable user to start two PIO based drivers at the same time.
PioBatch could be further extended so that the drivers could register callbacks to be executed after state machine is started. Current code does not need it so I haven't added this.
I'm not sure with some of names I've used. If anybody has better ideas do let me know.
Test: I've run pio_i2s and pio_clk examples and checked all outputs with an oscilloscope.