aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/uarte.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update to embedded-io 0.7Dario Nieuwenhuis2025-12-191-0/+20
|
* [nRF] Add delay in uart anomaly fixDion Dokter2025-10-291-0/+8
|
* feat: improve nrf54 support using new nrf-pacUlf Lilleengen2025-10-281-67/+95
| | | | | | | | | | | | | * Update nrf-pac to version that modifies nrf52 register layout to match nrf54 to reduce the amount of cfg needed for nrf54 support. * Make the following peripherals available on nrf54: twim, twis, spim, spis, uart, buffered uarte, dppi, gpiote, pwm, saadc * Add examples tested on the nrf54 dk Some code is based on or copied from other pull requests, modified to match the new nrf-pac layout. Co-authored-by: Dmitry Tarnyagin <[email protected]>
* Rustfmt for edition 2024.Dario Nieuwenhuis2025-10-061-2/+2
|
* nrf/uart,timer: erase instance generics.Dario Nieuwenhuis2025-09-281-57/+91
|
* Update Rust nightly, stable.Dario Nieuwenhuis2025-07-041-1/+1
|
* BufferedUart initializationMichael Gomez2025-04-041-2/+2
| | | | | | | This change modifies UART initialization throughout Embassy to take pins before interrupts. Related to #1304.
* Remove Peripheral trait, rename PeripheralRef->Peri.Dario Nieuwenhuis2025-03-271-75/+49
|
* Just impl WriteAlexander Walter2024-12-141-18/+0
|
* Add trait embedded_io_async to uarteAlexander Walter2024-12-141-0/+57
|
* nrf: port to chiptool-based `nrf-pac`.Dario Nieuwenhuis2024-11-041-171/+185
|
* nrf: fix wrong order configuring gpios.Dario Nieuwenhuis2024-06-251-2/+3
| | | | | Docs say "PSEL.RXD, PSEL.RTS, PSEL.RTS, and PSEL.TXD must only be configured when the UARTE is disabled." For some reason nrf52 doesn't care but nrf91 does.
* nrf: remove mod sealed.Dario Nieuwenhuis2024-04-051-32/+25
|
* nrf/uarte: prevent accidentally driving tx pin on rxonly uart if it was left ↵Dario Nieuwenhuis2024-02-221-34/+26
| | | | in PSEL.
* nrf/uart: Add support for rx-only or tx-only BufferedUart.Dario Nieuwenhuis2024-02-211-1/+1
|
* nrf/uart: share waker state between buffered and nonbuffered.Dario Nieuwenhuis2024-02-211-9/+9
|
* nrf/uart: add split_by_ref.Dario Nieuwenhuis2024-02-211-0/+8
|
* nrf: More nits cleaned up - useless cast and struct itemPriit Laes2024-02-171-1/+1
|
* nrf: Remove useless borrowsPriit Laes2024-02-171-5/+5
|
* nrf: Use .is_empty() instead of .len() == 0Priit Laes2024-02-171-5/+5
|
* Address @Dirbaio's commentsJustin Beaurivage2024-02-051-9/+9
|
* RustfmtJustin Beaurivage2024-01-311-3/+9
|
* Add error handling to UarteRxWithIdleJustin Beaurivage2024-01-311-12/+23
|
* Handle Uarte RX errorsJustin Beaurivage2024-01-301-11/+84
|
* Update embedded-hal to 1.0.0-rc.1 (#1783)Dario Nieuwenhuis2023-08-161-48/+0
|
* Rename embassy-hal-common to embassy-hal-internal, document it's for ↵Dario Nieuwenhuis2023-07-281-2/+2
| | | | internal use only. (#1700)
* embassy-nrf: Idle detection for RX only uarteTimo Kröger2023-06-131-44/+51
| | | | | Introduce `with_idle()` to upgrade an `UarteRx` instance to `UarteRxWithIdle`. Use the method in the split constructor aswell.
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-081-11/+11
| | | | | | | | | | | | - 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-7/+7
|
* nrf/uarte: fix deref warning, fix errata not being applied on nrf53.Dario Nieuwenhuis2023-05-191-6/+4
|
* Remove the _todo_embedded_hal_serial impls. EH will probably not have these ↵Dario Nieuwenhuis2023-04-151-77/+0
| | | | serial traits.
* 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-42/+43
|
* nrf/buffered_uarte: remove PeripheralMutex, make it work without rts/cts.Dario Nieuwenhuis2023-03-041-0/+5
| | | | | | | | | | | | | | | | | | | > 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-24/+52
|
* Fix a typoKentaro Okuda2022-12-301-1/+1
|
* nrf/uart: do not error on zero length transfers.Dario Nieuwenhuis2022-12-151-10/+10
| | | | | | It's a perfectly fine thing to do, should be just a noop. Erroring is really annoying when you're writing a payload to uart that might be zero-length or not.
* Switch to async-fn-in-traitDario Nieuwenhuis2022-11-251-2/+24
|
* Removes some of the code duplication for UarteWithIdlehuntc2022-10-091-267/+131
| | | | 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.
* Update embedded-hal versions and explicitly pinUlf Lilleengen2022-09-291-2/+2
|
* Replace futures::future::poll_fn -> core::future::poll_fn.Dario Nieuwenhuis2022-09-221-1/+1
|
* Do not use cfg_if for embedded-hal-async feature gates.Dario Nieuwenhuis2022-08-311-49/+50
| | | | 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.
* split `embassy-util` into `embassy-futures`, `embassy-sync`.Dario Nieuwenhuis2022-08-221-1/+1
|
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-291-1/+1
|
* nrf: replace PhantomData usages with PeripheralRef.Dario Nieuwenhuis2022-07-231-15/+14
|
* Remove PeripheralRef::into_inner()Dario Nieuwenhuis2022-07-231-21/+40
|
* Rename Unborrowed -> PeripheralRef, Unborrow -> PeripheralDario Nieuwenhuis2022-07-231-78/+78
|
* WIP: Make unborrow safe to useGrant Miller2022-07-231-53/+34
|
* nrf/uart: add support for tx-only and rx-only uart.Dario Nieuwenhuis2022-06-251-27/+149
| | | | | Allow creating UarteRx/UarteTx directly. This allows using uart unidirectionally (rx-only or tx-only), without having to 'waste' a pin for the unused direction.
* Add more API docs for embassy-cortex-m and embassy-nrfUlf Lilleengen2022-06-231-3/+3
|