diff options
| author | JanKomarekNXP <[email protected]> | 2025-12-01 18:07:58 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-01 18:07:58 +0100 |
| commit | 717346f21a4cf4993c2a1f046e26b6bf647d89cb (patch) | |
| tree | 81dcbf726769eac5726796b340542d661debe407 /examples/src/bin/lpuart_buffered.rs | |
| parent | 3b239cb6de22b7bb8c2d87defb3205294653be7a (diff) | |
Refactor LPUART driver constructors (#51)
* Refactor LPUART driver constructors
- Add new_with_rtscts(), new_with_rts(), new_with_cts() methods
- Store RTS/CTS pins in TX/RX structs
- Remove enable_tx, enable_rx, enable_rx_rts, enable_tx_cts config fields
- Fix typo: msb_firs -> msb_first
- Fix write_byte() return type to Result<()>
* Update hello example for LPUART driver changes
* Refactor buffered LPUART initialization logic
- Split new_inner() into init_common() and separate helpers for full-duplex, TX-only, and RX-only
- Replace assert!() with proper Error::InvalidArgument returns for empty buffers
- Simplify constructor implementations by removing expect() calls
Diffstat (limited to 'examples/src/bin/lpuart_buffered.rs')
| -rw-r--r-- | examples/src/bin/lpuart_buffered.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/examples/src/bin/lpuart_buffered.rs b/examples/src/bin/lpuart_buffered.rs index 7f77d557d..420589d00 100644 --- a/examples/src/bin/lpuart_buffered.rs +++ b/examples/src/bin/lpuart_buffered.rs | |||
| @@ -27,8 +27,6 @@ async fn main(_spawner: Spawner) { | |||
| 27 | // UART configuration (enable both TX and RX) | 27 | // UART configuration (enable both TX and RX) |
| 28 | let config = Config { | 28 | let config = Config { |
| 29 | baudrate_bps: 115_200, | 29 | baudrate_bps: 115_200, |
| 30 | enable_tx: true, | ||
| 31 | enable_rx: true, | ||
| 32 | rx_fifo_watermark: 0, | 30 | rx_fifo_watermark: 0, |
| 33 | tx_fifo_watermark: 0, | 31 | tx_fifo_watermark: 0, |
| 34 | ..Default::default() | 32 | ..Default::default() |
