Feature-gate time-driver in embassy-rp
This commit is contained in:
@ -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"]
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user