aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/buffered_uarte.rs
Commit message (Collapse)AuthorAgeFilesLines
* Reset rx_started state of nrf buffered_uarte on initftilde2023-12-291-0/+1
| | | | | | This was likely forgotten as part of c46418f12. Without this, when creating a uarte instance, dropping it and then creating another instance, this instance would never receive any bytes.
* Remove nightly and unstable-traits features in preparation for 1.75.Dario Nieuwenhuis2023-11-291-1/+0
|
* nrf/buffered_uarte: fix hang when buffer full due to PPI missing the endrx ↵Dario Nieuwenhuis2023-11-141-21/+58
| | | | | | event. Fixes #2181
* nrf/buffered_uarte: fix missing hwfc enable.Dario Nieuwenhuis2023-11-131-1/+3
|
* Update to embedded-io 0.5 (#1752)Dario Nieuwenhuis2023-08-071-11/+11
|
* Rename embassy-hal-common to embassy-hal-internal, document it's for ↵Dario Nieuwenhuis2023-07-281-2/+2
| | | | internal use only. (#1700)
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-081-6/+5
| | | | | | | | | | | | - Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`. - Reexport the PAC interrupt enum in `embassy_xx::interrupt`. This has a few advantages: - The `embassy_xx::interrupt` module is now more "standard". - It works with `cortex-m` functions for manipulating interrupts, for example. - It works with RTIC. - the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs. - When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
* cortex-m: remove owned interrupts.Dario Nieuwenhuis2023-06-011-4/+4
|
* Disable ppi group first to avoid BufferedUarte not getting dropped properlyLinus Harberg2023-05-261-0/+2
|
* common/peripheral: do not require mut in PeripheralRef clone_unchecked.Dario Nieuwenhuis2023-04-111-1/+1
|
* nrf/uart: switch to new interrupt binding.Dario Nieuwenhuis2023-03-061-111/+114
|
* nrf/buffered_uarte: add HIL tests.Dario Nieuwenhuis2023-03-041-1/+1
|
* nrf/buffered_uarte: make available on stable.Dario Nieuwenhuis2023-03-041-43/+116
|
* nrf/buffered_uarte: remove PeripheralMutex, make it work without rts/cts.Dario Nieuwenhuis2023-03-041-299/+373
| | | | | | | | | | | | | | | | | | | > dirbaio: so I was checking how zephyr does UARTE RX on nRF > dirbaio: because currently we have the ugly "restart DMA on line idle to flush it" hack > dirbaio: because according to the docs "For each byte received over the RXD line, an RXDRDY event will be generated. This event is likely to occur before the corresponding data has been transferred to Data RAM." > dirbaio: so as I understood it, the only way to guarantee the data is actually transferred to RAM is to stop+restart DMA > dirbaio: well, guess what? > dirbaio: they just count RXDRDY's, and process that amount of data without restarting DMA > dirbaio: with a timer configured as counter https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/serial/uart_nrfx_uarte.c#L650-L692 > dirbaio: 🤔🤷⁉️ > dirbaio: someone saying you can do the "hook up rxdrdy to a counter" trick, someone else saying it's wrong 🤪 https://devzone.nordicsemi.com/f/nordic-q-a/28420/uarte-in-circular-mode So we're going to do just that! - BufferedUarte is lock-free now. No PeripheralMutex. - The "restart DMA on line idle to flush it" hack is GONE. This means - It'll work correctly without RTS/CTS now. - It'll have better throughput when using RTS/CTS.
* nrf: docs.Dario Nieuwenhuis2023-02-011-2/+7
|
* Switch to async-fn-in-traitDario Nieuwenhuis2022-11-251-49/+17
|
* Update Rust nightly.Dario Nieuwenhuis2022-10-261-8/+8
|
* Merge #958bors[bot]2022-09-231-25/+17
|\ | | | | | | | | | | | | | | 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 <[email protected]>
| * Re-add timer.stop()Zoey Riordan2022-09-231-2/+3
| |
| * Fix builds on other nrf pacsZoey Riordan2022-09-211-4/+4
| |
| * Remove unused functionZoey Riordan2022-09-211-10/+0
| |
| * Remove left-in comments and logsZoey Riordan2022-09-211-2/+0
| |
| * Implement proper `Drop` for `BufferedUarte`Zoey Riordan2022-09-211-14/+17
| |
* | Replace futures::future::poll_fn -> core::future::poll_fn.Dario Nieuwenhuis2022-09-221-2/+1
|/
* Avoid double-borrowZoey Riordan2022-08-301-6/+9
|
* Deduplicate IO methodsZoey Riordan2022-08-301-169/+101
|
* Add split() method to BufferedUarte in embassy-nrfZoey Riordan2022-08-301-12/+167
|
* split `embassy-util` into `embassy-futures`, `embassy-sync`.Dario Nieuwenhuis2022-08-221-1/+1
|
* nRF documentation warning fixesUlf Lilleengen2022-08-221-0/+9
|
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-291-2/+12
|
* nrf: replace PhantomData usages with PeripheralRef.Dario Nieuwenhuis2022-07-231-6/+5
|
* Remove PeripheralRef::into_inner()Dario Nieuwenhuis2022-07-231-6/+3
|
* Rename Unborrowed -> PeripheralRef, Unborrow -> PeripheralDario Nieuwenhuis2022-07-231-12/+12
|
* WIP: Make unborrow safe to useGrant Miller2022-07-231-3/+6
|
* Add more API docs for embassy-cortex-m and embassy-nrfUlf Lilleengen2022-06-231-1/+1
|
* Run rustfmt.Dario Nieuwenhuis2022-06-121-14/+8
|
* Add embassy-cortex-m crate.Dario Nieuwenhuis2022-06-121-3/+3
| | | | | | - Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`. - Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore) - Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
* common/PeripheralMutex: remove unsafe API. (#802)Dario Nieuwenhuis2022-06-091-16/+14
| | | | | | Following the project's decision that "leak unsafe" APIs are not marked as "unsafe", update PeripheralMutex to accept non-'static state without unsafe. Fixes #801
* Revert "Fix irq pend behavior"chemicstry2022-05-261-2/+2
| | | | This reverts commit 9a447f1359ebaabc486ed4eb364eb3dd7b5275c9.
* Fix irq pend behaviorchemicstry2022-05-261-2/+2
|
* Implement BufRead for nrf BufferedUartechemicstry2022-05-261-0/+42
|
* nrf/buffered_uarte: fix out of bounds on read.Dario Nieuwenhuis2022-05-141-1/+1
|
* Replace embassy::io with embedded_io.Dario Nieuwenhuis2022-05-071-64/+80
|
* nrf: remove OptionalPinDario Nieuwenhuis2022-02-121-17/+7
|
* nrf: impl embedded-hal 1.0 and embedded-hal-async traits.Dario Nieuwenhuis2022-01-131-12/+2
|
* Documents the nRF BufferedUarte problemhuntc2021-12-121-1/+12
| | | | Please see https://github.com/embassy-rs/embassy/issues/536 for the rationale.
* Provides AsyncWrite with flushhuntc2021-12-101-0/+14
| | | | As per Tokio and others, this commit provides a `poll_flush` method on `AsyncWrite` so that a best-effort attempt at wakening once all bytes are flushed can be made.
* Applies the Uarte patchhuntc2021-12-081-1/+2
| | | | Applies the Nordic workaround found in the `Uarte` for the nRF9160 and nRF5340 to the `BufferedUarte`.
* Rationale for uarte usagehuntc2021-12-011-0/+4
|
* Removed unsafe from uartehuntc2021-12-011-16/+17
| | | | The constructors themselves are not strictly unsafe. Interactions with DMA can be generally unsafe if a future is dropped, but that's a separate issue. It is important that we use the `unsafe` keyword diligently as it can lead to confusion otherwise.