1 unstable release

0.1.0 Jan 11, 2024

#2011 in Embedded development

Download history 123/week @ 2024-01-06 1263/week @ 2024-01-13 2110/week @ 2024-01-20 2025/week @ 2024-01-27 1406/week @ 2024-02-03 2052/week @ 2024-02-10 3812/week @ 2024-02-17 2773/week @ 2024-02-24 3387/week @ 2024-03-02 4459/week @ 2024-03-09 4385/week @ 2024-03-16 3536/week @ 2024-03-23 4510/week @ 2024-03-30 3705/week @ 2024-04-06

16,777 downloads per month
Used in 52 crates (2 directly)

MIT/Apache

5KB

embassy-time-queue-driver

This crate contains the driver trait used by the embassy-time timer queue.

You should rarely need to use this crate directly. Only use it when implementing your own timer queue.

There is two timer queue implementations, one in embassy-time enabled by the generic-queue feature, and another in embassy-executor enabled by the integrated-timers feature.


lib.rs:

Implementing a timer queue

Example

use core::task::Waker;

use embassy_time::Instant;
use embassy_time::queue::{TimerQueue};

struct MyTimerQueue{}; // not public!

impl TimerQueue for MyTimerQueue {
    fn schedule_wake(&'static self, at: u64, waker: &Waker) {
        todo!()
    }
}

embassy_time_queue_driver::timer_queue_impl!(static QUEUE: MyTimerQueue = MyTimerQueue{});

Dependencies