Fix examples for rp235x
This commit is contained in:
parent
d799af9dd8
commit
371373886b
@ -31,7 +31,7 @@ use rand::RngCore;
|
|||||||
use static_cell::{ConstStaticCell, StaticCell};
|
use static_cell::{ConstStaticCell, StaticCell};
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
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 {
|
struct MyType {
|
||||||
inner: u32,
|
inner: u32,
|
||||||
|
|||||||
@ -48,7 +48,7 @@ async fn main(spawner: Spawner) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[embassy_executor::task]
|
#[embassy_executor::task]
|
||||||
async fn reader(mut rx: BufferedUartRx<'static, UART0>) {
|
async fn reader(mut rx: BufferedUartRx) {
|
||||||
info!("Reading...");
|
info!("Reading...");
|
||||||
loop {
|
loop {
|
||||||
let mut buf = [0; 31];
|
let mut buf = [0; 31];
|
||||||
|
|||||||
@ -39,7 +39,7 @@ async fn main(spawner: Spawner) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[embassy_executor::task]
|
#[embassy_executor::task]
|
||||||
async fn reader(mut rx: UartRx<'static, UART1, Async>) {
|
async fn reader(mut rx: UartRx<'static, Async>) {
|
||||||
info!("Reading...");
|
info!("Reading...");
|
||||||
loop {
|
loop {
|
||||||
// read a total of 4 transmissions (32 / 8) and then print the result
|
// read a total of 4 transmissions (32 / 8) and then print the result
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user