Struct capsules::alarm::AlarmDriver
[−]
[src]
pub struct AlarmDriver<'a, A: Alarm + 'a> {
alarm: &'a A,
num_armed: Cell<usize>,
app_alarm: Grant<AlarmData>,
}Fields
alarm: &'a A
num_armed: Cell<usize>
app_alarm: Grant<AlarmData>
Methods
impl<'a, A: Alarm> AlarmDriver<'a, A>[src]
pub const fn new(alarm: &'a A, grant: Grant<AlarmData>) -> AlarmDriver<'a, A>[src]
fn reset_active_alarm(&self)[src]
Trait Implementations
impl<'a, A: Alarm> Driver for AlarmDriver<'a, A>[src]
fn subscribe(
&self,
_subscribe_num: usize,
callback: Option<Callback>,
app_id: AppId
) -> ReturnCode[src]
&self,
_subscribe_num: usize,
callback: Option<Callback>,
app_id: AppId
) -> ReturnCode
fn command(
&self,
cmd_type: usize,
data: usize,
_: usize,
caller_id: AppId
) -> ReturnCode[src]
&self,
cmd_type: usize,
data: usize,
_: usize,
caller_id: AppId
) -> ReturnCode
Setup and read the alarm.
command_num
0: Driver check.1: Return the clock frequency in Hz.2: Read the the current clock value3: Stop the alarm if it is outstanding4: Set an alarm to fire at a given clock valuetime.
fn allow(
&self,
app: AppId,
minor_num: usize,
slice: Option<AppSlice<Shared, u8>>
) -> ReturnCode[src]
&self,
app: AppId,
minor_num: usize,
slice: Option<AppSlice<Shared, u8>>
) -> ReturnCode
allow lets an application give the driver access to a buffer in the application's memory. This returns ENOSUPPORT if not used. Read more