Commit graph

261 commits

Author SHA1 Message Date
Dario Nieuwenhuis
5d4f09156a nrf: add manually_create_executor example. 2022-12-09 23:33:53 +01:00
bors[bot]
58ab829049
Merge #1049
1049: embassy-nrf: Add I2S module r=lulf a=chris-zen

This PR adds I2S support for the nrf52 series (`nrf52832`, `nrf52833`, `nrf52840`).

We could only test it in a `nrf52840` in master mode for an output stream (see `i2s_waveform` example), using a clone of the [Adafruit I2S Stereo Decoder - UDA1334A](https://learn.adafruit.com/adafruit-i2s-stereo-decoder-uda1334a/overview).

We were wondering if this could be a welcome addition to embassy, as we are working on this very informally and don't have much free time for it.

<img src="https://user-images.githubusercontent.com/932644/202316127-a8cf90ef-1e1a-4e1d-b796-961b8ad6cef5.png" width="600">

https://user-images.githubusercontent.com/932644/202316609-e53cd912-e463-4e01-839e-0bbdf37020da.mp4


Co-authored-by: `@brainstorm` <brainstorm@nopcode.org>

Co-authored-by: Christian Perez Llamas <932644+chris-zen@users.noreply.github.com>
Co-authored-by: Roman Valls Guimera <brainstorm@users.noreply.github.com>
2022-12-09 07:49:40 +00:00
Christian Perez Llamas
5fdd521a76 Move the responsibility to manage buffers to the I2S stream 2022-12-08 20:22:50 +01:00
Dario Nieuwenhuis
1dcb0ea1f5 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
Christian Perez Llamas
199504be56 Optimization to be able to work with only 2 buffers 2022-11-29 01:09:47 +01:00
Dario Nieuwenhuis
1e2fb0459d Switch to async-fn-in-trait 2022-11-25 21:02:06 +01:00
bors[bot]
83b199a874
Merge #1056
1056: embassy-nrf: Add TWIS module r=Dirbaio a=kalkyl

Verified to be working on nrf9160

Co-authored-by: kalkyl <henrik.alser@me.com>
Co-authored-by: Henrik Alsér <henrik.alser@me.com>
2022-11-22 21:50:42 +00:00
Henrik Alsér
cf900a8a3f Rename write to respond_to_read 2022-11-22 22:10:04 +01:00
Christian Perez Llamas
15a93246d6 Buffer management in line with other peripherals. Constructor and config redesign 2022-11-19 19:18:20 +01:00
Christian Perez Llamas
16838f8a66 Fix format 2022-11-19 00:32:09 +01:00
Christian Perez Llamas
6b88057aef Add missing parts and Cleanup 2022-11-19 00:29:05 +01:00
Christian Perez Llamas
1ed260b105 Fix buffer overruns 2022-11-17 00:19:22 +01:00
kalkyl
43c1afb6a6 Return number of bytes written, add address match getter 2022-11-14 11:22:14 +01:00
kalkyl
eba42cb5f4 embassy-nrf: Add TWIS module 2022-11-13 22:15:19 +01:00
Christian Perez Llamas
4fe834db2f Mono channels 2022-11-13 02:48:07 +01:00
Christian Perez Llamas
17857bc18f Minor changes 2022-11-13 02:12:58 +01:00
Henrik Alsér
dca11095e2 Disable UARTE in embassy-nrf::init 2022-11-13 01:49:55 +01:00
Christian Perez Llamas
d2e8794f29 Investigating discontinuities in the signal 2022-11-13 01:41:32 +01:00
Christian Perez Llamas
122a31d208 Interrupts, async, sine oscillator 2022-11-12 18:48:57 +01:00
Christian Perez Llamas
4a2e810485 Restrict to pacs supporting i2s 2022-11-10 23:13:01 +01:00
Christian Perez Llamas
5a64bf651c Buffer trait. Simpler config. 2022-11-10 00:10:42 +01:00
Christian Perez Llamas
356beabc3b Apply config 2022-11-09 23:08:09 +01:00
Roman Valls Guimera
3760b60db3 Make bors grin ;) 2022-11-09 22:31:19 +01:00
Christian Perez Llamas
cecd77938c Draft: Initial support for I2S with a working example.
Co-authored-by: @brainstorm <brainstorm@nopcode.org>
2022-11-09 19:19:01 +01:00
Henrik Alsér
af34fc4ccc rustfmt 2022-11-05 01:40:20 +01:00
Henrik Alsér
7da18e194a Add status checks 2022-11-05 01:12:25 +01:00
Henrik Alsér
1920e90dcd embassy-nrf: Add SPIS module 2022-11-05 00:15:43 +01:00
Dario Nieuwenhuis
eeb072d9cb Update Rust nightly. 2022-10-26 16:47:29 +02:00
bors[bot]
ce1cba761c
Merge #855
855: PDM microphone support for nrf r=Dirbaio a=pbert519

PDM microphones have a long startup phase, therefore the driver samples continuously and only switches the target buffer if the user requests sampling.

Co-authored-by: pbert <pbert@posteo.net>
2022-10-21 21:03:51 +00:00
pbert
a4afab4640 add support for pdm microphones in nrf driver 2022-10-13 18:37:53 +02:00
bors[bot]
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
ceekdee
327d3cf0df Change rak4631 feature to sx126x, removing use in board-specific processing; simplify the P2P examples; correct RSSI computation. 2022-10-10 12:35:42 -05:00
huntc
e1faf88607 Removes some of the code duplication for UarteWithIdle
This commit removes some of the code duplication for UarteWithIdle at the expense of requiring a split. As the example illustrates though, this expense seems worth the benefit in terms of maintenance, and the avoidance of copying over methods. My main motivation for this commit was actually due to the `event_endtx` method not having been copied across.
2022-10-09 13:07:25 +11:00
Chuck Davis
3d0ba58b2d
Merge branch 'embassy-rs:master' into master 2022-10-08 14:38:41 -05:00
ceekdee
f554962f54 Improve generics and consolidate antenna handling 2022-10-08 14:32:22 -05:00
chrysn
6718ca3a94 all Cargo.toml: Add license to all crate Cargo.toml files
Closes: https://github.com/embassy-rs/embassy/issues/1002
2022-10-07 12:41:56 +02:00
ceekdee
526e90d3f3 Update some outstanding questions 2022-09-28 14:27:34 -05:00
ceekdee
a89a0c2f12 Initial add for sx126x 2022-09-27 21:55:41 -05:00
Dario Nieuwenhuis
f27a47a37b usb: move classes into the embassy-usb crate. 2022-09-26 13:00:21 +02:00
ivmarkov
c5ce02b30e Remove default, reorder generic params 2022-09-25 09:40:36 +03:00
ivmarkov
ca92302d03 Parameterize Signal with RawMutex 2022-09-24 20:26:51 +03:00
Dario Nieuwenhuis
10d1ad2343 Replace futures::future::join -> embassy_futures::join::join. 2022-09-22 16:48:35 +02:00
Dario Nieuwenhuis
a0487380da Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-22 16:42:49 +02:00
Dario Nieuwenhuis
897b72c872 Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-22 16:38:14 +02:00
Alex Martens
f66f20b1ce usbd-hid: 0.5.2 -> 0.6.0 2022-09-04 10:00:02 -07:00
Dario Nieuwenhuis
464ae67108 net: feature-gate nightly-only async traits to allow building on stable. 2022-08-30 19:43:32 +02:00
Dario Nieuwenhuis
598689ef43 futures: move select* and join* to separate modules. 2022-08-29 01:00:22 +02:00
Dario Nieuwenhuis
5677b13a86 sync: flatten module structure. 2022-08-22 22:18:13 +02:00
Dario Nieuwenhuis
21072bee48 split embassy-util into embassy-futures, embassy-sync. 2022-08-22 22:18:13 +02:00
Dario Nieuwenhuis
478f472784 Remove Forever, switch to static_cell. 2022-08-22 16:11:40 +02:00