Feature-gate time-driver in embassy-rp

This commit is contained in:
Mathias
2022-09-09 12:45:03 +02:00
parent 9794bc59cc
commit f7267d493f
4 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,8 @@ defmt = ["dep:defmt", "embassy-usb?/defmt"]
# There are no plans to make this stable.
unstable-pac = []
time-driver = []
# Enable nightly-only features
nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb"]

View File

@ -8,6 +8,7 @@ pub mod dma;
pub mod gpio;
pub mod interrupt;
pub mod spi;
#[cfg(feature = "time-driver")]
pub mod timer;
pub mod uart;
#[cfg(feature = "nightly")]
@ -108,6 +109,7 @@ pub fn init(_config: config::Config) -> Peripherals {
unsafe {
clocks::init();
#[cfg(feature = "time-driver")]
timer::init();
dma::init();
}