Commit Graph

68 Commits

Author SHA1 Message Date
be37eee13d Update embedded-hal crates. 2023-04-06 22:41:50 +02:00
12d6e37b3f Example using the PIO to drive WS2812 aka Neopixel RGB leds
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.
2023-03-11 02:58:28 -05:00
e641db1f75 Fix a typo in "PioPeripheral" 2023-02-15 14:10:07 +01:00
3af991ab63 usb: unify ControlHandler+DeviceStateHandler, route all control requests to 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).
2023-02-08 00:17:08 +01:00
fe15a7beee net: allocate space for 2 sockets, needed for dhcp. 2023-01-19 14:44:01 +01:00
8f4fae9b36 Add smoltcp dhcp socket configuration 2023-01-19 14:44:01 +01:00
b6c8505697 Merge #1142
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 <timokroeger93@gmail.com>
2023-01-14 00:07:02 +00:00
6d4c6e0481 rp2040: add {tx,rx}-only constructors to UART 2023-01-04 21:11:19 +01:00
a24037edf9 rp: Fix BufferedUart drop code
Only unregister the interrupt handler when both parts are inactive
2023-01-04 15:59:03 +01:00
e090ab1915 Remove lifetime, use pac fields 2022-12-24 03:22:51 +01:00
eaad0cc1dc embassy-rp: Add Watchdog 2022-12-24 02:51:06 +01:00
aa92ce6dc7 embassy-rp: Add split() to BufferedUart 2022-12-22 23:03:05 +01:00
5ae91ed3b6 cargo fmt 2022-12-20 14:59:49 +08:00
849a0e174f add convert_to_celsius function in the adc module
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.
2022-12-20 09:12:01 +08:00
e9219405ca usb/cdc-ncm: add embassy-net Device implementation. 2022-12-13 16:43:25 +01:00
3d68c0400b Merge branch 'master' into multicore 2022-12-13 13:51:48 +01:00
13d9d8fde1 Refactor after review 2022-12-13 13:49:51 +01:00
96d6c7243b Cleanup 2022-12-10 13:43:29 +01:00
34eaade14f fmt 2022-12-10 08:33:09 +01:00
1ee58492fb embassy-rp: Add multicore support 2022-12-10 08:26:35 +01:00
cd59046e6c Added RelocateProgram class for adjusting PIO-programs for different origins. 2022-12-09 20:18:41 +01:00
35db6e639b PIO support for RPi Pico 2022-12-09 20:18:41 +01:00
f13639e78c Merge #1059
1059: embassy-rp: Add basic ADC module r=kalkyl a=kalkyl

Oneshot ADC

Co-authored-by: Henrik Alsér <henrik.alser@me.com>
2022-11-22 01:06:25 +00:00
a444a65ebf feat: embassy-usb-logger and example for rpi pico
* Add embassy-usb-logger which allows logging over USB for any device
  implementing embassy-usb
* Add example using logger for rpi pico.
2022-11-18 11:22:58 +01:00
eb149a0bd4 embassy-rp: Add basic ADC module 2022-11-15 16:12:07 +01:00
3c6c382465 Remove random delay from example, and move flash functions to allow using without embedded-storage in scope 2022-10-27 07:10:35 +02:00
1669e39565 Buffer data to be written to flash in ram if it does not already reside in ram 2022-10-26 15:02:39 +02:00
80e58426fc Add flash example & flash HIL test 2022-10-26 12:24:04 +02:00
b7d0944265 Merge #984 #1006
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 <jeremy@goop.org>
Co-authored-by: huntc <huntchr@gmail.com>
2022-10-12 19:41:52 +00:00
1ee4bb22de embassy-rp i2c: async (non-blocking) example
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.
2022-10-01 13:43:37 -07:00
c96581879c update embedded-hal api
Also pin to alpha.9 since its a breaking change
2022-10-01 01:34:45 -07:00
d5abd32da2 rename to i2c_blocking 2022-10-01 01:29:10 -07:00
9f77dbf5ae rp i2c: blocking example
i2c example talking to mcp23017 i2c gpio expander.
2022-10-01 01:29:10 -07:00
72c2e985bb Update embedded-hal versions and explicitly pin 2022-09-29 11:27:46 +02:00
f27a47a37b usb: move classes into the embassy-usb crate. 2022-09-26 13:00:21 +02:00
10d1ad2343 Replace futures::future::join -> embassy_futures::join::join. 2022-09-22 16:48:35 +02:00
897b72c872 Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-22 16:38:14 +02:00
9ff5c50774 Cleanup examples 2022-09-01 15:12:44 +02:00
99dd2a9386 Reorder args 2022-09-01 15:12:44 +02:00
6d347af9fa transfer_in_place 2022-09-01 15:12:43 +02:00
c8ecc55710 Fix example 2022-09-01 15:12:43 +02:00
44150c4830 impl embedded-hal-async 2022-09-01 15:12:43 +02:00
07c64d902e example 2022-09-01 15:12:43 +02:00
464ae67108 net: feature-gate nightly-only async traits to allow building on stable. 2022-08-30 19:43:32 +02:00
e4d4166da2 Merge pull request #927 from embassy-rs/rp-usb
rp: add usb device support.
2022-08-30 19:15:44 +02:00
a730e2cd0f rp: add usb device support. 2022-08-25 00:03:55 +02:00
a29972413b Fix uart rp2040 blocking example 2022-08-19 08:48:52 +02:00
aefa5275a2 Merge #910
910: (embassy-rp): Implement remaining logic for blocking UART r=lulf a=MathiasKoch

async read/write is still `todo!()`, awaiting DMA implementation.

Co-authored-by: Mathias <mk@blackbird.online>
2022-08-18 18:36:27 +00:00
0f74f870b0 Fix rp uart example 2022-08-18 14:01:37 +02:00
5daa173ce4 Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00