Struct capsules::sdcard::SDCardDriver
[−]
[src]
pub struct SDCardDriver<'a, A: Alarm + 'a> { sdcard: &'a SDCard<'a, A>, app: MapCell<App>, kernel_buf: TakeCell<'static, [u8]>, }
Application driver for SD Card capsule, layers on top of SD Card capsule This is used if the SDCard is going to be attached directly to userspace syscalls. SDCardDriver can be ignored if another capsule is going to build off of the SDCard instead
Fields
sdcard: &'a SDCard<'a, A>
app: MapCell<App>
kernel_buf: TakeCell<'static, [u8]>
Methods
impl<'a, A: Alarm + 'a> SDCardDriver<'a, A>
[src]
Functions for SDCardDriver
pub fn new(
sdcard: &'a SDCard<'a, A>,
kernel_buf: &'static mut [u8; 512]
) -> SDCardDriver<'a, A>
[src]
sdcard: &'a SDCard<'a, A>,
kernel_buf: &'static mut [u8; 512]
) -> SDCardDriver<'a, A>
Create new SD card userland interface
sdcard - SDCard interface to provide application access to kernel_buf - buffer used to hold SD card blocks, must be at least 512 bytes in length
Trait Implementations
impl<'a, A: Alarm + 'a> SDCardClient for SDCardDriver<'a, A>
[src]
Handle callbacks from SDCard
fn card_detection_changed(&self, installed: bool)
[src]
fn init_done(&self, block_size: u32, total_size: u64)
[src]
fn read_done(&self, data: &'static mut [u8], len: usize)
[src]
fn write_done(&self, buffer: &'static mut [u8])
[src]
fn error(&self, error: u32)
[src]
impl<'a, A: Alarm + 'a> Driver for SDCardDriver<'a, A>
[src]
Connections to userspace syscalls
fn allow(
&self,
_appid: AppId,
allow_num: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
[src]
&self,
_appid: AppId,
allow_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
fn subscribe(&self, subscribe_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 command(
&self,
command_num: usize,
data: usize,
_: usize,
_: AppId
) -> ReturnCode
[src]
&self,
command_num: usize,
data: usize,
_: usize,
_: AppId
) -> ReturnCode
command
instructs a driver to perform some action synchronously. This returns ENOSUPPORT
if not used. Read more