Split embassy-time from embassy-executor.
This commit is contained in:
@ -16,7 +16,7 @@ flavors = [
|
||||
|
||||
[features]
|
||||
|
||||
time = ["embassy-executor/time"]
|
||||
time = ["dep:embassy-time"]
|
||||
|
||||
defmt = ["dep:defmt", "embassy-executor/defmt", "embassy-util/defmt", "embassy-usb?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"]
|
||||
|
||||
@ -57,7 +57,7 @@ _nrf5340-net = ["_nrf5340", "nrf5340-net-pac"]
|
||||
_nrf5340 = ["_gpio-p1", "_dppi"]
|
||||
_nrf9160 = ["nrf9160-pac", "_dppi"]
|
||||
|
||||
_time-driver = ["embassy-executor/time-tick-32768hz", "time"]
|
||||
_time-driver = ["dep:embassy-time", "embassy-time?/tick-32768hz"]
|
||||
|
||||
_ppi = []
|
||||
_dppi = []
|
||||
@ -65,6 +65,7 @@ _gpio-p1 = []
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.1.0", path = "../embassy-executor", optional = true }
|
||||
embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true }
|
||||
embassy-util = { version = "0.1.0", path = "../embassy-util" }
|
||||
embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]}
|
||||
embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
|
||||
|
@ -3,7 +3,7 @@ use core::sync::atomic::{compiler_fence, AtomicU32, AtomicU8, Ordering};
|
||||
use core::{mem, ptr};
|
||||
|
||||
use critical_section::CriticalSection;
|
||||
use embassy_executor::time::driver::{AlarmHandle, Driver};
|
||||
use embassy_time::driver::{AlarmHandle, Driver};
|
||||
use embassy_util::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_util::blocking_mutex::CriticalSectionMutex as Mutex;
|
||||
|
||||
@ -119,7 +119,7 @@ struct RtcDriver {
|
||||
}
|
||||
|
||||
const ALARM_STATE_NEW: AlarmState = AlarmState::new();
|
||||
embassy_executor::time_driver_impl!(static DRIVER: RtcDriver = RtcDriver {
|
||||
embassy_time::time_driver_impl!(static DRIVER: RtcDriver = RtcDriver {
|
||||
period: AtomicU32::new(0),
|
||||
alarm_count: AtomicU8::new(0),
|
||||
alarms: Mutex::const_new(CriticalSectionRawMutex::new(), [ALARM_STATE_NEW; ALARM_COUNT]),
|
||||
|
@ -12,9 +12,9 @@ use core::sync::atomic::Ordering::SeqCst;
|
||||
use core::task::Poll;
|
||||
|
||||
use embassy_embedded_hal::SetConfig;
|
||||
#[cfg(feature = "time")]
|
||||
use embassy_executor::time::{Duration, Instant};
|
||||
use embassy_hal_common::{into_ref, PeripheralRef};
|
||||
#[cfg(feature = "time")]
|
||||
use embassy_time::{Duration, Instant};
|
||||
use embassy_util::waitqueue::AtomicWaker;
|
||||
use futures::future::poll_fn;
|
||||
|
||||
|
Reference in New Issue
Block a user