aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge remote-tracking branch 'w5500/main' into w5500Dario Nieuwenhuis2023-05-314-0/+552
|\
| * move embassy-net-w5500 to subdir.Dario Nieuwenhuis2023-05-314-0/+552
|
* cyw43: adapt build to main embassy repo.Dario Nieuwenhuis2023-05-303-0/+360
|
* Switch to DMA, use new clocks, don't take ownership of pio commonCaleb Jamison2023-05-191-13/+31
|
* Pin fix, improve fifo handlingCaleb Jamison2023-05-191-1/+5
|
* rp/clocks: don't expose unstable pac itemspennae2023-05-171-2/+2
| | | | | | | exposing pac items kind of undermines the unstable-pac feature. directly exposing register structure is also pretty inconvenient since the clock switching code takes care of the src/aux difference in behavior, so a user needn't really be forced to write down decomposed register values.
* rp: Read flash unique id and jedec idkalkyl2023-05-161-0/+10
|
* Merge #1458bors[bot]2023-05-157-33/+52
|\ | | | | | | | | | | | | | | 1458: rp: remove take!, add bind_interrupts! r=Dirbaio a=pennae both of the uart interrupts now check a flag that only the dma rx path ever sets (and now unsets again on drop) to return early if it's not as they expect. this is ... not our preferred solution, but if bind_interrupts *must* allow mutiple handlers to be specified then this is the only way we can think of that doesn't break uarts. Co-authored-by: pennae <[email protected]>
| * rp: remove take!, add bind_interrupts!pennae2023-05-157-33/+52
| |
* | net: do not use smoltcp Instant/Duration in public API.Dario Nieuwenhuis2023-05-151-1/+1
|/
* rp: don't use SetConfig trait in PWM and PIO.Dario Nieuwenhuis2023-05-135-5/+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.
* Merge branch 'master' into masterCaleb Jamison2023-05-092-1/+153
|\
| * Fix some typosDirk Stolle2023-05-081-1/+1
| |
| * Merge #1435bors[bot]2023-05-081-0/+152
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1435: Added example for multi priority executors rp2040 r=Dirbaio a=fakusb I added an example for multiple priorities of tasks on rp2040 by adjusting [examples/nrf52840/src/bin/multiprio.rs](https://github.com/embassy-rs/embassy/blob/master/examples/nrf52840/src/bin/multiprio.rs) . This needs https://github.com/embassy-rs/rp-pac/pull/2 , and this commit also adds the 6 new interrupt handlers for software interrupts to embassy-rs. We might need to change the git path for rp-pac in [embassy-rp/Cargo.toml](https://github.com/embassy-rs/embassy/compare/master...fakusb:rp2040-multiprio-executor?expand=1#diff-47463ea358745927ecdb686f52feab816fde5d402a9628a136c116f34a802ab0) Closes #1413 Co-authored-by: Fabian Kunze <[email protected]>
| | * added example multi priority executors rp2040Fabian Kunze2023-05-071-0/+152
| | |
* | | Dirbaio comments round 2Caleb Jamison2023-05-091-5/+5
| | |
* | | Improve gpout example, clk_gpout_freqCaleb Jamison2023-05-091-6/+19
| | |
* | | Add missing functions, Cleanup, Gpout exampleCaleb Jamison2023-05-081-0/+21
|/ /
* | 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-064-64/+81
| | | | | | | | | | | | 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-064-48/+13
| | | | | | | | | | | | | | | | 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-053-14/+14
|/ | | | | | 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-034-13/+14
| | | | | | | 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-032-6/+10
| | | | | | | | | 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-034-6/+4
| | | | | | | 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-034-10/+10
| | | | next step: get rid of the insance trait entirely
* rp/pio: add PioPin traitpennae2023-05-033-17/+14
| | | | | 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-023-12/+12
| | | | these are just overly convoluted ways of writing down numbers.
* rp/pio: make PioCommon a structpennae2023-05-024-17/+8
| | | | | 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-024-23/+39
| | | | | | | 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-024-14/+13
| | | | | | 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.
* Merge #1414bors[bot]2023-05-011-1/+8
|\ | | | | | | | | | | | | | | 1414: rp: report errors from buffered and dma uart receives r=Dirbaio a=pennae neither of these reported errors so far, which is not ideal. add error reporting to both of them that matches the blocking error reporting as closely as is feasible, even allowing partial receives from buffered uarts before errors are reported where they would have been by the blocking code. dma transfers don't do this, if an errors applies to any byte in a transfer the entire transfer is nuked (though we probably could report how many bytes have been transferred). Co-authored-by: pennae <[email protected]>
| * rp/uart: report errors from dma receivepennae2023-05-011-1/+8
| |
* | rp/pio: write instr memory only from commonpennae2023-05-013-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instruction memory is a shared resource. writing it only from PioCommon clarifies this, and perhaps makes it more obvious that multiple state machines can share the same instructions. this also allows *freeing* of instruction memory to reprogram the system, although this interface is not entirely safe yet. it's safe in the sense rusts understands things, but state machines may misbehave if their instruction memory is freed and rewritten while they are running. fixing this is out of scope for now since it requires some larger changes to how state machines are handled. the interface provided currently is already unsafe in that it lets people execute instruction memory that has never been written, so this isn't much of a drawback for now.
* | rp/pio: move non-sm-specific methods to PioCommonpennae2023-05-012-12/+19
|/ | | | | | | | | | pin and irq operations affect the entire pio block. with pins this is not very problematic since pins themselves are resources, but irqs are not treated like that and can thus interfere across state machines. the ability to wait for an irq on a state machine is kept to make synchronization with user code easier, and since we can't inspect loaded programs at build time we wouldn't gain much from disallowing waits from state machines anyway.
* Add lora-phy examples.ceekdee2023-04-234-0/+437
|
* rp: add PWM apipennae2023-04-231-0/+27
|
* Update embedded-hal crates.Dario Nieuwenhuis2023-04-061-123/+35
|
* Example using the PIO to drive WS2812 aka Neopixel RGB ledsCaleb Jamison2023-03-111-0/+142
| | | | This example also uses a pio program compiled at runtime, rather than one built at compile time. There's no reason to do that, but it's probably useful to have an example that does this as well.
* Fix a typo in "PioPeripheral"sekoia2023-02-152-2/+2
|
* usb: unify ControlHandler+DeviceStateHandler, route all control requests to ↵Dario Nieuwenhuis2023-02-082-2/+0
| | | | | | | | all handlers. - Allows classes to handle vendor requests. - Allows classes to use a single handler for multiple interfaces. - Allows classes to access the other events (previously only `reset` was available).
* net: allocate space for 2 sockets, needed for dhcp.Dario Nieuwenhuis2023-01-191-1/+1
|
* Add smoltcp dhcp socket configurationPaweł Jan Czochański2023-01-191-8/+3
|
* Merge #1142bors[bot]2023-01-141-1/+1
|\ | | | | | | | | | | | | | | | | | | 1142: More rp2040 BufferedUart fixes r=Dirbaio a=timokroeger * Refactor init code * Make it possible to drop RX without breaking TX (or vice versa) * Correctly handle RX buffer full scenario Co-authored-by: Timo Kröger <[email protected]>
| * rp: Fix BufferedUart drop codeTimo Kröger2023-01-041-1/+1
| | | | | | | | Only unregister the interrupt handler when both parts are inactive
* | rp2040: add {tx,rx}-only constructors to UARTPedro Ferreira2023-01-041-0/+42
|/
* Remove lifetime, use pac fieldskalkyl2022-12-241-3/+3
|
* embassy-rp: Add Watchdogkalkyl2022-12-241-0/+48
|