aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin/pio_hd44780.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move pio programs into embassy-rpCaleb Jamison2024-10-091-177/+24
|
* rename PWM_CH to PWM_SLICEAlexandru RADOVICI2024-04-021-1/+1
|
* ci: use beta, add secondary nightly ci.Dario Nieuwenhuis2023-12-211-1/+0
|
* time: Update examples, tests, and other code to use new Timer::after_x ↵Adam Greig2023-10-151-2/+2
| | | | convenience methods
* rp: relocate programs implicitly during loadpennae2023-07-281-5/+2
| | | | | | | | | | | this removed the RelocatedProgram construction step from pio uses. there's not all that much to be said for the extra step because the origin can be set on the input program itself, and the remaining information exposed by RelocatedProgram can be exposed from LoadedProgram instead (even though it's already available on the pio_asm programs, albeit perhaps less convenient). we do lose access to the relocated instruction iterator, but we also cannot think of anything this iterator would actually be useful for outside of program loading.
* Add descriptions to all RP2040 examples. Some need hardware that was not ↵Henrik Berg2023-07-131-0/+3
| | | | specified.
* rp/pio: use bind_interrupts for irqspennae2023-07-071-4/+11
| | | | closes #1338
* rp: don't use SetConfig trait in PWM and PIO.Dario Nieuwenhuis2023-05-131-1/+0
| | | | | | It was intended to allow changing baudrate on shared spi/i2c. There's no advantage in using it for PWM or PIO, and makes it less usable because you have to have `embassy-embedded-hal` as a dep to use it.
* rp/pio: allow wrap-around program loadingpennae2023-05-061-1/+2
| | | | | | execution wraps around after the end of instruction memory and wrapping works with this, so we may as well allow program loading across this boundary. could be useful for reusing chunks of instruction memory.
* rp/pio: configure state machines with Config structpennae2023-05-061-18/+24
| | | | | | the many individual sets aren't very efficient, and almost no checks were done to ensure that the configuration written to the hardware was actually valid. this adresses both of these.
* rp/pio: add set-pin-{values,dirs} convenience functionspennae2023-05-061-7/+2
| | | | | these are needed a lot during state machine setup, it makes sense to provide convenience functions for them.
* rp/pio: add load_program, use_programpennae2023-05-061-14/+2
| | | | | | | | programs contain information we could pull from them directly and use to validate other configuration of the state machine instead of asking the user to pull them out and hand them to us bit by bit. unfortunately programs do not specify how many in or out bits they use, so we can only handle side-set and wrapping jumps like this. it's still something though.
* rp/pio: drop Pio prefix from almost all namespennae2023-05-051-2/+2
| | | | | | it's only any good for PioPin because there it follows a pattern of gpio pin alternate functions being named like that, everything else can just as well be referred to as `pio::Thing`
* rp/pio: wrap sm rx, tx in structs and allow splittingpennae2023-05-031-8/+8
| | | | | | | this *finally* allows sound implementions of bidirectional transfers without blocking. the futures previously allowed only a single direction to be active at any given time, and the dma transfers didn't take a mutable reference and were thus unsound.
* rp/pio: split irqs from state machinespennae2023-05-031-2/+5
| | | | | | | | | we can only have one active waiter for any given irq at any given time. allowing waits for irqs on state machines bypasses this limitation and causes lost events for all but the latest waiter for a given irq. splitting this out also allows us to signal from state machines to other parts of the application without monopolizing state machine access for the irq wait, as would be necessary to make irq waiting sound.
* rp/pio: remove PioStateMachineInstancepennae2023-05-031-1/+1
| | | | | | | move all methods into PioStateMachine instead. the huge trait wasn't object-safe and thus didn't have any benefits whatsoever except for making it *slightly* easier to write bounds for passing around state machines. that would be much better solved with generics-less instances.
* rp/pio: PioStateMachine{Instance, => ,Instance}pennae2023-05-031-1/+1
| | | | next step: get rid of the insance trait entirely
* rp/pio: add PioPin traitpennae2023-05-031-9/+8
| | | | | pio can only access pins in bank 0, so it doesn't make sense to even allow wrapping of other banks' pins.
* rp/pio: drop SmInstance{,Base}pennae2023-05-021-2/+2
| | | | these are just overly convoluted ways of writing down numbers.
* rp/pio: make PioCommon a structpennae2023-05-021-3/+1
| | | | | the PioCommon trait does not serve much of a purpose; there can be only two implementations and they only differ in a few associated constants.
* rp/pio: PioInstance::split -> Pio::newpennae2023-05-021-4/+6
| | | | | | | not requiring a PioInstance for splitting lets us split from a PeripheralRef or borrowed PIO as well, mirroring every other peripheral in embassy_rp. pio pins still have to be constructed from owned pin instances for now.
* rp/pio: remove PioPeripheralpennae2023-05-021-3/+2
| | | | | | merge into PioInstance instead. PioPeripheral was mostly a wrapper around PioInstance anyway, and the way the wrapping was done required PioInstanceBase<N> types where PIO{N} could've been used instead.
* rp/pio: add hd44780 examplepennae2023-05-021-0/+244
add an hd44780 example for pio. hd44780 with busy polling is a pretty complicated protocol if the busy polling is to be done by the peripheral, and this example exercises many pio features that we don't have good examples for yet.