Struct capsules::dac::Dac
[−]
[src]
pub struct Dac<'a> { dac: &'a DacChannel, }
Fields
dac: &'a DacChannel
Methods
impl<'a> Dac<'a>
[src]
pub fn new(dac: &'a DacChannel) -> Dac<'a>
[src]
Trait Implementations
impl<'a> Driver for Dac<'a>
[src]
fn command(
&self,
command_num: usize,
data: usize,
_: usize,
_: AppId
) -> ReturnCode
[src]
&self,
command_num: usize,
data: usize,
_: usize,
_: AppId
) -> ReturnCode
Control the DAC.
command_num
0
: Driver check.1
: Initialize and enable the DAC.2
: Set the output todata1
, a scaled output value.
fn subscribe(&self, minor_num: usize, callback: Callback) -> ReturnCode
[src]
subscribe
lets an application pass a callback to the driver to be called later. This returns ENOSUPPORT
if not used. Read more
fn allow(
&self,
app: AppId,
minor_num: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
[src]
&self,
app: AppId,
minor_num: usize,
slice: 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