aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* embassy-rp: Add split() to BufferedUartkalkyl2022-12-221-0/+57
|
* cargo fmtAaron Tsui2022-12-201-2/+2
|
* add convert_to_celsius function in the adc moduleAaron Tsui2022-12-201-1/+6
| | | | | | modify RP2040 adc example to get inside biased bipolar diode voltage, then convert this temperature sensor data into Celsius degree, according to chapter 4.9.5. Temperature Sensor in RP2040 datasheet.
* usb/cdc-ncm: add embassy-net Device implementation.Dario Nieuwenhuis2022-12-131-123/+17
|
* Merge branch 'master' into multicoreHenrik Alsér2022-12-132-0/+181
|\
| * Added RelocateProgram class for adjusting PIO-programs for different origins.Simon Berg2022-12-092-16/+25
| |
| * PIO support for RPi PicoSimon Berg2022-12-092-0/+172
| |
* | Refactor after reviewkalkyl2022-12-131-3/+2
| |
* | Cleanupkalkyl2022-12-101-4/+3
| |
* | fmtkalkyl2022-12-101-2/+2
| |
* | embassy-rp: Add multicore supportkalkyl2022-12-101-0/+62
|/
* Merge #1059bors[bot]2022-11-221-0/+33
|\ | | | | | | | | | | | | | | 1059: embassy-rp: Add basic ADC module r=kalkyl a=kalkyl Oneshot ADC Co-authored-by: Henrik Alsér <[email protected]>
| * embassy-rp: Add basic ADC moduleHenrik Alsér2022-11-151-0/+33
| |
* | feat: embassy-usb-logger and example for rpi picoUlf Lilleengen2022-11-181-0/+30
|/ | | | | | * Add embassy-usb-logger which allows logging over USB for any device implementing embassy-usb * Add example using logger for rpi pico.
* Remove random delay from example, and move flash functions to allow using ↵Mathias2022-10-271-1/+7
| | | | without embedded-storage in scope
* Buffer data to be written to flash in ram if it does not already reside in ramMathias2022-10-261-1/+0
|
* Add flash example & flash HIL testMathias2022-10-261-0/+84
|
* Merge #984 #1006bors[bot]2022-10-121-0/+102
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 984: rp pico async i2c implementation r=Dirbaio a=jsgf This implements an interrupt-driven async i2c master. It is based on https://github.com/embassy-rs/embassy/pull/914, a bit of https://github.com/embassy-rs/embassy/pull/978 and `@ithinuel's` https://github.com/ithinuel/rp2040-async-i2c.git This is still work-in-progress, and is currently untested. 1006: Removes some of the code duplication for UarteWithIdle r=Dirbaio a=huntc This PR removes some of the code duplications for `UarteWithIdle` at the slight expense of requiring a split when using idle processing. As the nRF example illustrates though given the LoC removed, this expense seems worth the benefit in terms of maintenance, and the avoidance of copying over methods. My main motivation for this PR was actually due to the `event_endtx` method not having been copied across to the idle-related code. Tested the uart_idle example on my nRF52840-dk, and from within my app. Both appear to work fine. Co-authored-by: Jeremy Fitzhardinge <[email protected]> Co-authored-by: huntc <[email protected]>
| * embassy-rp i2c: async (non-blocking) exampleJeremy Fitzhardinge2022-10-011-0/+102
| | | | | | | | | | | | Simple example exercising an mcp23017 GPIO expander, configured on RP2040 GPIOs 14+15 (i2c1) with 8 inputs and 8 outputs. Input bit 0 controls whether to display a mcp23017 register dump.
* | update embedded-hal apiJeremy Fitzhardinge2022-10-011-1/+1
| | | | | | | | Also pin to alpha.9 since its a breaking change
* | rename to i2c_blockingJeremy Fitzhardinge2022-10-011-0/+0
| |
* | rp i2c: blocking exampleJeremy Fitzhardinge2022-10-011-0/+70
|/ | | | i2c example talking to mcp23017 i2c gpio expander.
* Update embedded-hal versions and explicitly pinUlf Lilleengen2022-09-291-6/+6
|
* usb: move classes into the `embassy-usb` crate.Dario Nieuwenhuis2022-09-262-2/+2
|
* Replace futures::future::join -> embassy_futures::join::join.Dario Nieuwenhuis2022-09-221-1/+1
|
* Update Rust nightly.Dario Nieuwenhuis2022-09-222-2/+0
| | | | Removes feature(generic_associated_types)
* Cleanup examplesHenrik Alsér2022-09-012-4/+4
|
* Reorder argsHenrik Alsér2022-09-011-1/+1
|
* transfer_in_placeHenrik Alsér2022-09-011-1/+1
|
* Fix exampleHenrik Alsér2022-09-011-2/+3
|
* impl embedded-hal-asyncHenrik Alsér2022-09-011-4/+2
|
* exampleHenrik Alsér2022-09-012-2/+33
|
* net: feature-gate nightly-only async traits to allow building on stable.Dario Nieuwenhuis2022-08-301-1/+1
|