aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/uart
Commit message (Collapse)AuthorAgeFilesLines
...
* cortex-m: remove owned interrupts.Dario Nieuwenhuis2023-06-012-15/+13
|
* Fix return definitionAlpha3__02023-05-251-2/+2
|
* Implement eh 0.2.* serial::Write for Uart/UartTxAlpha3__02023-05-251-0/+38
|
* rp: remove take!, add bind_interrupts!pennae2023-05-152-141/+169
|
* Fix some typosDirk Stolle2023-05-082-3/+3
|
* rp: remove leftovers from #1414pennae2023-05-021-5/+3
| | | | forgot to remove these when they were no longer necessary or useful. oops.
* rp/uart: report errors from dma receivepennae2023-05-012-14/+139
|
* rp/uart: extract fifo draining from blocking_readpennae2023-05-011-23/+27
| | | | this will also be needed for dma operations.
* rp/uart: make dma multicore-safepennae2023-05-011-2/+2
| | | | | running rx and tx on different cores could lead to hangs if the dmacr register modifys run concurrently. this is bad.
* rp/uart: report errors from buffered uartpennae2023-05-011-14/+72
| | | | | | | | | this reports errors at the same location the blocking uart would, which works out to being mostly exact (except in the case of overruns, where one extra character is dropped). this is actually easier than going nuclear in the case of errors and nuking both the buffer contents and the rx fifo, both of which are things we'd have to do in addition to what's added here, and neither are needed for correctness.
* rp/uart: extract common code from async and blocking buffered readspennae2023-05-011-47/+39
| | | | | once we add error propagation the common code will become even larger, so it makes sense to move it out.
* rp/uart: rename state to buffered_statepennae2023-05-012-14/+14
| | | | we'll add a dma state soon as well.
* rp/uart: add set-break functionspennae2023-05-012-1/+95
| | | | | | | sending break conditions is necessary to implement some protocols, and the hardware supports this natively. we do have to make sure that we don't assert a break condition while the uart is busy though, otherwise the break may be inserted before the last character in the tx fifo.
* rp/uart: add UartRx::new_blockingpennae2023-05-011-0/+10
|
* Merge #1378bors[bot]2023-04-181-6/+47
|\ | | | | | | | | | | | | | | | | | | 1378: Add ability to invert UART pins, take 2 r=Dirbaio a=jakewins Same PR as before, except this now works :) There was a minor hiccup in the UartRx code where the rx pin got passed as the tx argument, so the invert settings didn't get applied. With this fix, my local setup at least is happily reading inverted uart data. Co-authored-by: Jacob Davis-Hansson <[email protected]>
| * Pass rx pin to right init argJacob Davis-Hansson2023-04-181-7/+23
| |
| * outover instead of inoverJacob Davis-Hansson2023-04-151-3/+3
| |
| * Add ability to invert UART pinsJacob Davis-Hansson2023-04-141-4/+29
| | | | | | | | | | | | This is useful in some cases where the surrounding circuit for some reason inverts the UART signal, for instance if you're talking to a device via an optocoupler.
* | Remove the _todo_embedded_hal_serial impls. EH will probably not have these ↵Dario Nieuwenhuis2023-04-152-110/+0
|/ | | | serial traits.
* Merge #1318bors[bot]2023-04-021-0/+16
|\ | | | | | | | | | | | | | | | | | | 1318: rp: Allow zero len reads for buffered uart r=Dirbaio a=timokroeger Prevents the read methods from getting stuck forever. cc `@MathiasKoch` can you test if this fixes the problem you described in the chat? Co-authored-by: Timo Kröger <[email protected]>
| * rp: Allow zero len writes for buffered uartTimo Kröger2023-04-021-0/+8
| | | | | | | | Prevents the write methods from getting stuck forever.
| * rp: Allow zero len reads for buffered uartTimo Kröger2023-04-011-0/+8
| | | | | | | | Prevents the read methods from getting stuck forever.
* | Fix set_baudrate on RP-PICOThierry Fleury2023-04-011-4/+4
|/
* Fix return type for EH-nb traitsMathias2023-03-231-4/+4
|
* Add embedded-io blocking Read + Write for BufferedUartMathias2023-03-231-10/+56
|
* Add HIL test for into_buffered uart on embassy-rpMathias2023-03-141-2/+1
|
* Allow upgrading a blocking uart to a BufferedUart, and implement blocking ↵Mathias2023-03-142-50/+340
| | | | serial traits for BufferedUart
* RP-PICO UART adding set_baudrate: missing to run rust-fmtAndres Hurtado Lopez2023-02-261-14/+10
|
* RP-PICO UART adding set_baudrate: Changing static call from specific type to ↵Andres Hurtado Lopez2023-02-261-2/+2
| | | | a Self (requires adding lifetime specifier)
* RP-PICO UART adding set_baudrate: refactoring of methodsAndres Hurtado Lopez2023-02-261-28/+23
|
* RP-PICO UART adding set_baudrateAndres Hurtado Lopez2023-02-261-14/+36
|
* Merge #1142bors[bot]2023-01-141-188/+151
|\ | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * rp: Fix formatting string to please CITimo Kröger2023-01-051-1/+1
| |
| * rp: Improve BufferedUart interrupt handlingTimo Kröger2023-01-051-21/+58
| | | | | | | | | | | | * Only clear interrupt flags that have fired (so that we do not lose any error flags) * Enable RX interrupt when a read is requested, disable it when the RX buffer is full * Rework TX interrupt handling: its "edge" triggered by a FIFO threshold
| * rp: Disable RX interrupts when ring buffer is fullTimo Kröger2023-01-041-52/+35
| | | | | | | | | | | | | | | | When data is in the RX fifo the RX timeout interrupt goes high again even after clearing it. The result is a deadlock because execution is stuck in the interrupt handler. No other code can run to clear the receive buffer. Enable and disable RX interrupts based on the buffer fill level. Use the same approach for the TX code path.
| * rp: Fix BufferedUart drop codeTimo Kröger2023-01-041-25/+26
| | | | | | | | Only unregister the interrupt handler when both parts are inactive
| * rp: Common init function for BufferedUartTimo Kröger2023-01-041-122/+64
| | | | | | | | BufferedUart, BufferedUartRx and BufferedUartTX can all use the same init code.
* | rp2040: add {tx,rx}-only constructors to UARTPedro Ferreira2023-01-041-4/+28
|/
* rp: Fill and empty FIFOs in buffered uart interruptTimo Kröger2022-12-271-10/+28
| | | | | Fixes an issue where only the first byte was transmitted. Should improve throughput aswell.
* embassy-rp: Add split() to BufferedUartkalkyl2022-12-221-0/+7
|
* rp/uart: use lockfree ringbuffer.Dario Nieuwenhuis2022-11-252-352/+395
| | | | This gets rid of another PeripheralMutex usage.
* Switch to async-fn-in-traitDario Nieuwenhuis2022-11-251-43/+17
|
* Update Rust nightly.Dario Nieuwenhuis2022-10-261-8/+8
|
* Update embedded-hal versions and explicitly pinUlf Lilleengen2022-09-291-6/+6
|
* Add preliminary I2C implementation for RP2040Mathias2022-09-271-0/+5
|
* Fix bufferedUart read and write testsMathias2022-09-272-49/+46
|
* Rename from {Rx,Tx}BufferedUart to BufferedUart{Rx,Tx} to be compliant with ↵Mathias2022-09-271-13/+13
| | | | stm32 and nrf implementations
* Add HIL test for bufferedUartMathias2022-09-261-2/+1
|
* Remove code-duplication in async bufferedUart implementationsMathias2022-09-211-126/+89
|
* FormattingMathias2022-09-091-3/+1
|