Merge pull request #4155 from marcemmers/remove-instance-from-rp-uart-type

[embassy-rp] Remove <T: Instance> from Uart and BufferedUart
This commit is contained in:
Ulf Lilleengen
2025-05-09 19:34:52 +02:00
committed by GitHub
11 changed files with 344 additions and 290 deletions

View File

@@ -31,7 +31,7 @@ use rand::RngCore;
use static_cell::{ConstStaticCell, StaticCell};
use {defmt_rtt as _, panic_probe as _};
type UartAsyncMutex = mutex::Mutex<CriticalSectionRawMutex, UartTx<'static, UART0, uart::Async>>;
type UartAsyncMutex = mutex::Mutex<CriticalSectionRawMutex, UartTx<'static, uart::Async>>;
struct MyType {
inner: u32,

View File

@@ -48,7 +48,7 @@ async fn main(spawner: Spawner) {
}
#[embassy_executor::task]
async fn reader(mut rx: BufferedUartRx<'static, UART0>) {
async fn reader(mut rx: BufferedUartRx) {
info!("Reading...");
loop {
let mut buf = [0; 31];

View File

@@ -39,7 +39,7 @@ async fn main(spawner: Spawner) {
}
#[embassy_executor::task]
async fn reader(mut rx: UartRx<'static, UART1, Async>) {
async fn reader(mut rx: UartRx<'static, Async>) {
info!("Reading...");
loop {
// read a total of 4 transmissions (32 / 8) and then print the result