mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 14:22:33 +00:00
rustfmt
This commit is contained in:
parent
1434d2f97a
commit
5c1f9cf99c
@ -109,8 +109,8 @@ pub trait Driver: Send + Sync + 'static {
|
|||||||
/// Try allocating an alarm handle. Returns None if no alarms left.
|
/// Try allocating an alarm handle. Returns None if no alarms left.
|
||||||
/// Initially the alarm has no callback set, and a null `ctx` pointer.
|
/// Initially the alarm has no callback set, and a null `ctx` pointer.
|
||||||
///
|
///
|
||||||
/// The allocated alarm is a reusable resource and can be used multiple times.
|
/// The allocated alarm is a reusable resource and can be used multiple times.
|
||||||
/// Once the alarm has fired, it remains allocated and can be set again without needing
|
/// Once the alarm has fired, it remains allocated and can be set again without needing
|
||||||
/// to be reallocated.
|
/// to be reallocated.
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
@ -120,8 +120,8 @@ pub trait Driver: Send + Sync + 'static {
|
|||||||
/// Set the callback function to be called when the alarm triggers.
|
/// Set the callback function to be called when the alarm triggers.
|
||||||
/// The callback may be called from any context (interrupt or thread mode).
|
/// The callback may be called from any context (interrupt or thread mode).
|
||||||
///
|
///
|
||||||
/// The callback is maintained after the alarm has fired. Callers do not need
|
/// The callback is maintained after the alarm has fired. Callers do not need
|
||||||
/// to set a callback again before setting another alarm, unless they want to
|
/// to set a callback again before setting another alarm, unless they want to
|
||||||
/// change the callback function or context.
|
/// change the callback function or context.
|
||||||
fn set_alarm_callback(&self, alarm: AlarmHandle, callback: fn(*mut ()), ctx: *mut ());
|
fn set_alarm_callback(&self, alarm: AlarmHandle, callback: fn(*mut ()), ctx: *mut ());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user