aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp
diff options
context:
space:
mode:
authorMichael Gomez <[email protected]>2025-03-19 20:44:16 -0700
committerMichael Gomez <[email protected]>2025-04-04 21:54:36 -0700
commitf1feedf19031d0c007628569add51ff89ae08447 (patch)
treeb9ecb4c4e809115a9e8cd8a7bc4cae293dbfc713 /embassy-rp
parenta44abaf7e4562fa5393087fd845bf0d02141325b (diff)
BufferedUart initialization
This change modifies UART initialization throughout Embassy to take pins before interrupts. Related to #1304.
Diffstat (limited to 'embassy-rp')
-rw-r--r--embassy-rp/CHANGELOG.md1
-rw-r--r--embassy-rp/src/uart/buffered.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/embassy-rp/CHANGELOG.md b/embassy-rp/CHANGELOG.md
index 8ad3b0b76..7ac0a47cb 100644
--- a/embassy-rp/CHANGELOG.md
+++ b/embassy-rp/CHANGELOG.md
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16- rp235x: add ImageDef features. ([#3890](https://github.com/embassy-rs/embassy/pull/3890)) 16- rp235x: add ImageDef features. ([#3890](https://github.com/embassy-rs/embassy/pull/3890))
17- doc: Fix "the the" ([#3903](https://github.com/embassy-rs/embassy/pull/3903)) 17- doc: Fix "the the" ([#3903](https://github.com/embassy-rs/embassy/pull/3903))
18- pio: Add access to DMA engine byte swapping ([#3935](https://github.com/embassy-rs/embassy/pull/3935)) 18- pio: Add access to DMA engine byte swapping ([#3935](https://github.com/embassy-rs/embassy/pull/3935))
19- Modify BufferedUart initialization to take pins before interrupts ([#3983](https://github.com/embassy-rs/embassy/pull/3983))
19 20
20## 0.3.1 - 2025-02-06 21## 0.3.1 - 2025-02-06
21 22
diff --git a/embassy-rp/src/uart/buffered.rs b/embassy-rp/src/uart/buffered.rs
index 5b5159d22..da18138b5 100644
--- a/embassy-rp/src/uart/buffered.rs
+++ b/embassy-rp/src/uart/buffered.rs
@@ -91,9 +91,9 @@ impl<'d, T: Instance> BufferedUart<'d, T> {
91 /// Create a buffered UART instance. 91 /// Create a buffered UART instance.
92 pub fn new( 92 pub fn new(
93 _uart: Peri<'d, T>, 93 _uart: Peri<'d, T>,
94 irq: impl Binding<T::Interrupt, BufferedInterruptHandler<T>>,
95 tx: Peri<'d, impl TxPin<T>>, 94 tx: Peri<'d, impl TxPin<T>>,
96 rx: Peri<'d, impl RxPin<T>>, 95 rx: Peri<'d, impl RxPin<T>>,
96 irq: impl Binding<T::Interrupt, BufferedInterruptHandler<T>>,
97 tx_buffer: &'d mut [u8], 97 tx_buffer: &'d mut [u8],
98 rx_buffer: &'d mut [u8], 98 rx_buffer: &'d mut [u8],
99 config: Config, 99 config: Config,
@@ -110,11 +110,11 @@ impl<'d, T: Instance> BufferedUart<'d, T> {
110 /// Create a buffered UART instance with flow control. 110 /// Create a buffered UART instance with flow control.
111 pub fn new_with_rtscts( 111 pub fn new_with_rtscts(
112 _uart: Peri<'d, T>, 112 _uart: Peri<'d, T>,
113 irq: impl Binding<T::Interrupt, BufferedInterruptHandler<T>>,
114 tx: Peri<'d, impl TxPin<T>>, 113 tx: Peri<'d, impl TxPin<T>>,
115 rx: Peri<'d, impl RxPin<T>>, 114 rx: Peri<'d, impl RxPin<T>>,
116 rts: Peri<'d, impl RtsPin<T>>, 115 rts: Peri<'d, impl RtsPin<T>>,
117 cts: Peri<'d, impl CtsPin<T>>, 116 cts: Peri<'d, impl CtsPin<T>>,
117 irq: impl Binding<T::Interrupt, BufferedInterruptHandler<T>>,
118 tx_buffer: &'d mut [u8], 118 tx_buffer: &'d mut [u8],
119 rx_buffer: &'d mut [u8], 119 rx_buffer: &'d mut [u8],
120 config: Config, 120 config: Config,