Commit Graph

684 Commits

Author SHA1 Message Date
eeb072d9cb Update Rust nightly. 2022-10-26 16:47:29 +02:00
0c9ec8dc36 Update usb 2022-10-26 10:39:29 +02:00
ea868920e6 Update nrf pacs 2022-10-26 09:13:26 +02:00
f78c706b89 Address review feedback 2022-10-24 11:10:59 +03:00
4d5550070f Change time Driver contract to never fire the alarm synchronously 2022-10-24 09:17:43 +03:00
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
a4afab4640 add support for pdm microphones in nrf driver 2022-10-13 18:37:53 +02:00
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
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
72c2e985bb Update embedded-hal versions and explicitly pin 2022-09-29 11:27:46 +02:00
17d8d11f73 usb: make HALs depend only on embassy-usb-driver. 2022-09-27 13:16:49 +02:00
7f7c14b7bc usb: split driver trait to separate crate. 2022-09-26 12:29:27 +02:00
eeb1515e9f Merge #958
958: Implement proper `Drop` for `BufferedUarte` r=lulf a=ZoeyR

The drop method in `BufferedUarte` was prone to hanging indefinitely and also didn't actually disable the peripheral. I mostly copied over the drop method from `Uarte` with some modifications since `BufferedUarte` could have a transmit lasting indefinitely.

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2022-09-23 11:58:43 +00:00
b4f2c2a05e Re-add timer.stop() 2022-09-23 12:34:02 +02:00
a0487380da Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-22 16:42:49 +02:00
897b72c872 Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-22 16:38:14 +02:00
5f7e0eb2ae Fix builds on other nrf pacs 2022-09-21 14:06:56 +02:00
15b4f9db90 Remove unused function 2022-09-21 11:19:47 +02:00
0f55f5a73d Remove left-in comments and logs 2022-09-21 11:06:06 +02:00
3d708a459c Implement proper Drop for BufferedUarte 2022-09-21 10:48:02 +02:00
5327b9c289 time: add more tick rates, use 1mhz as default. 2022-09-02 00:59:34 +02:00
838f3065ea Merge #936
936: Add split() method to BufferedUarte in embassy-nrf r=ZoeyR a=ZoeyR

I haven't completed testing this yet. I'm creating this PR early so that I can get corrected if I went way off course.

This PR adds a `split()` method to `BufferedUarte` as discussed on matrix.

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2022-08-31 10:20:40 +00:00
1fb6bfbec9 Merge #938
938: Do not use cfg_if for embedded-hal-async feature gates. r=Dirbaio a=Dirbaio

Old code used `cfg_if!` because rustc still parses code inside disabled cfg's, and Rust stable at that time couldn't parse the new GAT where-clause location. This is not the case anymore.


bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-31 01:11:49 +00:00
8ba421f324 Do not use cfg_if for embedded-hal-async feature gates.
Old code used `cfg_if!` because rustc still parses code inside disabled cfg's, and Rust stable at that time couldn't parse the new GAT where-clause location. This is not the case anymore.
2022-08-31 03:11:21 +02:00
30641d0564 Avoid context switch and wait for stop
Should be more efficient given the sub 100 cycles to wait.
2022-08-31 08:47:44 +10:00
171077bacf Avoid double-borrow 2022-08-30 15:57:38 +02:00
b2720117c4 Deduplicate IO methods 2022-08-30 15:48:50 +02:00
4781feafc4 Add split() method to BufferedUarte in embassy-nrf 2022-08-30 15:27:25 +02:00
dcd8c62169 Permits the future to be cancelled
Includes documentation
2022-08-30 20:56:56 +10:00
c0b7fd910e Additional doco 2022-08-30 09:49:04 +10:00
9a873d1dbf Ensure that the sampling is stopped
Ensures that nRF saadc sampling is stopped and is awaited prior to exiting the two sampling methods. Not doing so causes a potential power drain and the potential for dropped buffer writes when having finished continuous sampling.
2022-08-26 14:40:20 +10:00
91a9168a32 nrf/ppi: fix unsoundness due to task/event ptrs being public. 2022-08-24 01:54:27 +02:00
02562ed87d nrf/ppi: feature-gate dppi stuff. 2022-08-24 01:52:15 +02:00
21072bee48 split embassy-util into embassy-futures, embassy-sync. 2022-08-22 22:18:13 +02:00
3e155d2ec3 nRF documentation warning fixes 2022-08-22 16:37:35 +02:00
5daa173ce4 Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
fc6e1e06b3 Remove HAL initialization from #[embassy::main] macro. 2022-08-17 22:16:46 +02:00
67edea4168 Update to critical-section 1.0, atomic-polyfill 1.0 2022-08-17 19:01:56 +02:00
1924f2d67d Merge #890
890: Implement UsbSupply for a reference of SignalledSupply r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-08-02 20:29:29 +00:00
e4cfbf96ac Implement UsbSupply for a reference of SignalledSupply 2022-08-02 22:09:02 +02:00
43b8c0c71e Remove commented out logging code 2022-08-01 12:57:00 +02:00
fa2fbcbde0 Extend QSPI config with freq, delay, spi mode, and address mode 2022-08-01 12:54:49 +02:00
a0f1b0ee01 Split embassy crate into embassy-executor, embassy-util. 2022-07-29 23:40:36 +02:00
84cffc751a Merge #876
876: Add defmt support to embassy-embedded-hal errors r=Dirbaio a=matoushybl

`defmt::unwrap!()` should now work with shared buses. I tested it only with I2C as I don't have SPI in the target project.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-07-24 20:15:57 +00:00
c38755c5b7 Add defmt support to embassy-embedded-hal errors 2022-07-24 22:10:50 +02:00
709df0dc1d nrf: replace PhantomData usages with PeripheralRef. 2022-07-23 15:13:47 +02:00
f02ba35482 Remove PeripheralRef::into_inner() 2022-07-23 14:27:45 +02:00
4901c34d9c Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral 2022-07-23 14:00:19 +02:00
8a9d2f59af Update embassy-stm32 2022-07-23 02:40:13 +02:00
e0521ea249 fix nrf dppi 2022-07-23 02:17:45 +02:00