Ignore the doctest driver registration to prevent duplicate registrations

This commit is contained in:
Chris Price 2024-01-09 17:36:39 +00:00
parent 372a9b2833
commit 3db8655e25
2 changed files with 6 additions and 2 deletions

View file

@ -42,7 +42,6 @@
//! use embassy_time::driver::{Driver, AlarmHandle};
//!
//! struct MyDriver{} // not public!
//! embassy_time::time_driver_impl!(static DRIVER: MyDriver = MyDriver{});
//!
//! impl Driver for MyDriver {
//! fn now(&self) -> u64 {
@ -59,6 +58,9 @@
//! }
//! }
//! ```
//! ```ignore
//! embassy_time::time_driver_impl!(static DRIVER: MyDriver = MyDriver{});
//! ```
/// Alarm handle, assigned by the driver.
#[derive(Clone, Copy)]

View file

@ -23,7 +23,6 @@
//! use embassy_time::queue::{TimerQueue};
//!
//! struct MyTimerQueue{}; // not public!
//! embassy_time::timer_queue_impl!(static QUEUE: MyTimerQueue = MyTimerQueue{});
//!
//! impl TimerQueue for MyTimerQueue {
//! fn schedule_wake(&'static self, at: Instant, waker: &Waker) {
@ -31,6 +30,9 @@
//! }
//! }
//! ```
//! ```ignore
//! embassy_time::timer_queue_impl!(static QUEUE: MyTimerQueue = MyTimerQueue{});
//! ```
use core::task::Waker;
use crate::Instant;