Skip to content

Commit 476ec23

Browse files
committed
zephyr: timer: Callback
Expose the fields so that the user can actually create a Callback. Signed-off-by: David Brown <[email protected]>
1 parent f3528b3 commit 476ec23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zephyr/src/timer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,10 @@ impl Drop for SimpleTimer {
265265
/// Note that this handler owns the data, but passes a reference to the handler. This will
266266
/// typically be a `SpinMutex` to allow for proper sharing with IRQ context.
267267
pub struct Callback<T: Send + Sync> {
268-
call: fn(data: &T),
269-
data: T,
268+
/// The callback function.
269+
pub call: fn(data: &T),
270+
/// The data passed into the callback.
271+
pub data: T,
270272
}
271273

272274
/// A zephyr timer that calls a callback each time the timer expires.

0 commit comments

Comments
 (0)