Remove default, reorder generic params

This commit is contained in:
ivmarkov
2022-09-24 12:08:46 +03:00
parent 8536666148
commit c5ce02b30e
4 changed files with 16 additions and 12 deletions

View File

@ -12,6 +12,7 @@ use embassy_futures::select::{select, Either};
use embassy_nrf::gpio::{Input, Pin, Pull};
use embassy_nrf::usb::{Driver, PowerUsb};
use embassy_nrf::{interrupt, pac};
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::signal::Signal;
use embassy_usb::control::OutResponse;
use embassy_usb::{Builder, Config, DeviceStateHandler};
@ -77,7 +78,7 @@ async fn main(_spawner: Spawner) {
// Build the builder.
let mut usb = builder.build();
let remote_wakeup: Signal<_> = Signal::new();
let remote_wakeup: Signal<CriticalSectionRawMutex, _> = Signal::new();
// Run the USB device.
let usb_fut = async {

View File

@ -4,11 +4,12 @@
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::signal::Signal;
use embassy_time::{Duration, Timer};
use {defmt_rtt as _, panic_probe as _};
static SIGNAL: Signal<u32> = Signal::new();
static SIGNAL: Signal<CriticalSectionRawMutex, u32> = Signal::new();
#[embassy_executor::task]
async fn my_sending_task() {

View File

@ -12,6 +12,7 @@ use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use embassy_stm32::interrupt;
use embassy_stm32::interrupt::{Interrupt, InterruptExt};
use embassy_stm32::subghz::*;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_sync::signal::Signal;
use {defmt_rtt as _, panic_probe as _};
@ -64,7 +65,7 @@ async fn main(_spawner: Spawner) {
let button = Input::new(p.PA0, Pull::Up);
let mut pin = ExtiInput::new(button, p.EXTI0);
static IRQ_SIGNAL: Signal<()> = Signal::new();
static IRQ_SIGNAL: Signal<CriticalSectionRawMutex, ()> = Signal::new();
let radio_irq = interrupt::take!(SUBGHZ_RADIO);
radio_irq.set_handler(|_| {
IRQ_SIGNAL.signal(());