sync: flatten module structure.

This commit is contained in:
Dario Nieuwenhuis 2022-08-22 22:00:06 +02:00
parent 21072bee48
commit 5677b13a86
19 changed files with 18 additions and 21 deletions

View file

@ -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;

View file

@ -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.

View file

@ -1,5 +0,0 @@
//! Async channels
pub mod mpmc;
pub mod pubsub;
pub mod signal;

View file

@ -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;

View file

@ -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

View file

@ -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,

View file

@ -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 _};

View file

@ -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 _};

View file

@ -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 _};

View file

@ -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();

View file

@ -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};

View file

@ -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};

View file

@ -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 _};

View file

@ -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 _};

View file

@ -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]

View file

@ -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};

View file

@ -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";