Deprecate *recv* in favor of *receive*
This commit is contained in:
@ -35,7 +35,7 @@ async fn main(spawner: Spawner) {
|
||||
unwrap!(spawner.spawn(my_task()));
|
||||
|
||||
loop {
|
||||
match CHANNEL.recv().await {
|
||||
match CHANNEL.receive().await {
|
||||
LedState::On => led.set_high(),
|
||||
LedState::Off => led.set_low(),
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ async fn recv_task(led: AnyPin, receiver: Receiver<'static, NoopRawMutex, LedSta
|
||||
let mut led = Output::new(led, Level::Low, OutputDrive::Standard);
|
||||
|
||||
loop {
|
||||
match receiver.recv().await {
|
||||
match receiver.receive().await {
|
||||
LedState::On => led.set_high(),
|
||||
LedState::Off => led.set_low(),
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ async fn main(spawner: Spawner) {
|
||||
// back out the buffer we receive from the read
|
||||
// task.
|
||||
loop {
|
||||
let buf = CHANNEL.recv().await;
|
||||
let buf = CHANNEL.receive().await;
|
||||
info!("writing...");
|
||||
unwrap!(tx.write(&buf).await);
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ async fn core1_task(
|
||||
};
|
||||
|
||||
loop {
|
||||
let buffer: [u8; 3] = CHANNEL.recv().await;
|
||||
let buffer: [u8; 3] = CHANNEL.receive().await;
|
||||
match lora.prepare_for_tx(&mdltn_params, 20, false).await {
|
||||
Ok(()) => {}
|
||||
Err(err) => {
|
||||
|
@ -56,7 +56,7 @@ async fn core0_task() {
|
||||
async fn core1_task(mut led: Output<'static, PIN_25>) {
|
||||
info!("Hello from core 1");
|
||||
loop {
|
||||
match CHANNEL.recv().await {
|
||||
match CHANNEL.receive().await {
|
||||
LedState::On => led.set_high(),
|
||||
LedState::Off => led.set_low(),
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ impl<'a> Leds<'a> {
|
||||
|
||||
async fn show(&mut self) {
|
||||
self.leds[self.current_led].set_high();
|
||||
if let Ok(new_message) = with_timeout(Duration::from_millis(500), CHANNEL.recv()).await {
|
||||
if let Ok(new_message) = with_timeout(Duration::from_millis(500), CHANNEL.receive()).await {
|
||||
self.leds[self.current_led].set_low();
|
||||
self.process_event(new_message).await;
|
||||
} else {
|
||||
self.leds[self.current_led].set_low();
|
||||
if let Ok(new_message) = with_timeout(Duration::from_millis(200), CHANNEL.recv()).await {
|
||||
if let Ok(new_message) = with_timeout(Duration::from_millis(200), CHANNEL.receive()).await {
|
||||
self.process_event(new_message).await;
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ async fn main(spawner: Spawner) -> ! {
|
||||
unwrap!(spawner.spawn(reader(rx)));
|
||||
|
||||
loop {
|
||||
let buf = CHANNEL.recv().await;
|
||||
let buf = CHANNEL.receive().await;
|
||||
info!("writing...");
|
||||
unwrap!(tx.write(&buf).await);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ async fn main(spawner: Spawner) -> ! {
|
||||
unwrap!(spawner.spawn(reader(rx)));
|
||||
|
||||
loop {
|
||||
let buf = CHANNEL.recv().await;
|
||||
let buf = CHANNEL.receive().await;
|
||||
info!("writing...");
|
||||
unwrap!(tx.write(&buf).await);
|
||||
}
|
||||
|
Reference in New Issue
Block a user