sync: flatten module structure.
This commit is contained in:
parent
21072bee48
commit
5677b13a86
19 changed files with 18 additions and 21 deletions
|
@ -12,7 +12,7 @@ use embassy_stm32::subghz::{
|
|||
Status, SubGhz, TcxoMode, TcxoTrim, Timeout, TxParams,
|
||||
};
|
||||
use embassy_stm32::Peripheral;
|
||||
use embassy_sync::channel::signal::Signal;
|
||||
use embassy_sync::signal::Signal;
|
||||
use lorawan_device::async_device::radio::{Bandwidth, PhyRxTx, RfConfig, RxQuality, SpreadingFactor, TxConfig};
|
||||
use lorawan_device::async_device::Timings;
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@ where
|
|||
/// Establish a new bounded channel. For example, to create one with a NoopMutex:
|
||||
///
|
||||
/// ```
|
||||
/// use embassy_sync::channel::mpmc::Channel;
|
||||
/// use embassy_sync::channel::Channel;
|
||||
/// use embassy_sync::blocking_mutex::raw::NoopRawMutex;
|
||||
///
|
||||
/// // Declare a bounded channel of 3 u32s.
|
|
@ -1,5 +0,0 @@
|
|||
//! Async channels
|
||||
|
||||
pub mod mpmc;
|
||||
pub mod pubsub;
|
||||
pub mod signal;
|
|
@ -14,4 +14,6 @@ pub mod blocking_mutex;
|
|||
pub mod channel;
|
||||
pub mod mutex;
|
||||
pub mod pipe;
|
||||
pub mod pubsub;
|
||||
pub mod signal;
|
||||
pub mod waitqueue;
|
||||
|
|
|
@ -34,8 +34,8 @@ pub use subscriber::{DynSubscriber, Subscriber};
|
|||
///
|
||||
/// ```
|
||||
/// # use embassy_sync::blocking_mutex::raw::NoopRawMutex;
|
||||
/// # use embassy_sync::channel::pubsub::WaitResult;
|
||||
/// # use embassy_sync::channel::pubsub::PubSubChannel;
|
||||
/// # use embassy_sync::pubsub::WaitResult;
|
||||
/// # use embassy_sync::pubsub::PubSubChannel;
|
||||
/// # use futures_executor::block_on;
|
||||
/// # let test = async {
|
||||
/// // Create the channel. This can be static as well
|
|
@ -19,7 +19,7 @@ use core::task::{Context, Poll, Waker};
|
|||
/// Signals are generally declared as `static`s and then borrowed as required.
|
||||
///
|
||||
/// ```
|
||||
/// use embassy_sync::channel::signal::Signal;
|
||||
/// use embassy_sync::signal::Signal;
|
||||
///
|
||||
/// enum SomeCommand {
|
||||
/// On,
|
|
@ -6,7 +6,7 @@ use defmt::unwrap;
|
|||
use embassy_executor::Spawner;
|
||||
use embassy_nrf::gpio::{Level, Output, OutputDrive};
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::mpmc::Channel;
|
||||
use embassy_sync::channel::Channel;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ use defmt::unwrap;
|
|||
use embassy_executor::Spawner;
|
||||
use embassy_nrf::gpio::{AnyPin, Level, Output, OutputDrive, Pin};
|
||||
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
|
||||
use embassy_sync::channel::mpmc::{Channel, Receiver, Sender};
|
||||
use embassy_sync::channel::{Channel, Receiver, Sender};
|
||||
use embassy_time::{Duration, Timer};
|
||||
use static_cell::StaticCell;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use defmt::unwrap;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::pubsub::{DynSubscriber, PubSubChannel, Subscriber};
|
||||
use embassy_sync::pubsub::{DynSubscriber, PubSubChannel, Subscriber};
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use embassy_nrf::peripherals::UARTE0;
|
|||
use embassy_nrf::uarte::UarteRx;
|
||||
use embassy_nrf::{interrupt, uarte};
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::mpmc::Channel;
|
||||
use embassy_sync::channel::Channel;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
static CHANNEL: Channel<ThreadModeRawMutex, [u8; 8], 1> = Channel::new();
|
||||
|
|
|
@ -15,7 +15,7 @@ use embassy_nrf::rng::Rng;
|
|||
use embassy_nrf::usb::{Driver, PowerUsb};
|
||||
use embassy_nrf::{interrupt, pac, peripherals};
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::mpmc::Channel;
|
||||
use embassy_sync::channel::Channel;
|
||||
use embassy_usb::{Builder, Config, UsbDevice};
|
||||
use embassy_usb_ncm::{CdcNcmClass, Receiver, Sender, State};
|
||||
use embedded_io::asynch::{Read, Write};
|
||||
|
|
|
@ -12,7 +12,7 @@ use embassy_futures::{select, Either};
|
|||
use embassy_nrf::gpio::{Input, Pin, Pull};
|
||||
use embassy_nrf::usb::{Driver, PowerUsb};
|
||||
use embassy_nrf::{interrupt, pac};
|
||||
use embassy_sync::channel::signal::Signal;
|
||||
use embassy_sync::signal::Signal;
|
||||
use embassy_usb::control::OutResponse;
|
||||
use embassy_usb::{Builder, Config, DeviceStateHandler};
|
||||
use embassy_usb_hid::{HidReaderWriter, ReportId, RequestHandler, State};
|
||||
|
|
|
@ -16,7 +16,7 @@ use embassy_stm32::exti::ExtiInput;
|
|||
use embassy_stm32::gpio::{AnyPin, Input, Level, Output, Pin, Pull, Speed};
|
||||
use embassy_stm32::peripherals::PA0;
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::mpmc::Channel;
|
||||
use embassy_sync::channel::Channel;
|
||||
use embassy_time::{with_timeout, Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use defmt::{info, unwrap};
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_sync::channel::signal::Signal;
|
||||
use embassy_sync::signal::Signal;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use embassy_stm32::dma::NoDma;
|
|||
use embassy_stm32::peripherals::{DMA1_CH1, UART7};
|
||||
use embassy_stm32::usart::{Config, Uart, UartRx};
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::mpmc::Channel;
|
||||
use embassy_sync::channel::Channel;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
#[embassy_executor::task]
|
||||
|
|
|
@ -16,7 +16,7 @@ use embassy_stm32::time::Hertz;
|
|||
use embassy_stm32::usb::Driver;
|
||||
use embassy_stm32::{interrupt, Config};
|
||||
use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex;
|
||||
use embassy_sync::channel::mpmc::Channel;
|
||||
use embassy_sync::channel::Channel;
|
||||
use embassy_usb::{Builder, UsbDevice};
|
||||
use embassy_usb_ncm::{CdcNcmClass, Receiver, Sender, State};
|
||||
use embedded_io::asynch::{Read, Write};
|
||||
|
|
|
@ -13,7 +13,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::channel::signal::Signal;
|
||||
use embassy_sync::signal::Signal;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
const PING_DATA: &str = "PING";
|
||||
|
|
Loading…
Reference in a new issue