Struct nrf5x::ble_advertising_driver::BLE
[−]
[src]
pub struct BLE<'a, B, A> where
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a, {
radio: &'a B,
busy: Cell<bool>,
app: Grant<App>,
kernel_tx: TakeCell<'static, [u8]>,
alarm: &'a A,
sending_app: Cell<Option<AppId>>,
receiving_app: Cell<Option<AppId>>,
}
Fields
radio: &'a B
busy: Cell<bool>
app: Grant<App>
kernel_tx: TakeCell<'static, [u8]>
alarm: &'a A
sending_app: Cell<Option<AppId>>
receiving_app: Cell<Option<AppId>>
Methods
impl<'a, B, A> BLE<'a, B, A> where
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
[src]
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
pub fn new(
radio: &'a B,
container: Grant<App>,
tx_buf: &'static mut [u8],
alarm: &'a A
) -> BLE<'a, B, A>
[src]
radio: &'a B,
container: Grant<App>,
tx_buf: &'static mut [u8],
alarm: &'a A
) -> BLE<'a, B, A>
fn reset_active_alarm(&self)
[src]
Trait Implementations
impl<'a, B, A> Client for BLE<'a, B, A> where
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
[src]
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
fn fired(&self)
[src]
Callback signaled when the alarm's clock reaches the value set in Alarm#set_alarm
. Read more
impl<'a, B, A> RxClient for BLE<'a, B, A> where
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
[src]
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
fn receive_event(&self, buf: &'static mut [u8], len: u8, result: ReturnCode)
[src]
impl<'a, B, A> TxClient for BLE<'a, B, A> where
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
[src]
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
fn transmit_event(&self, _crc_ok: ReturnCode)
[src]
impl<'a, B, A> Driver for BLE<'a, B, A> where
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
[src]
B: BleAdvertisementDriver + BleConfig + 'a,
A: Alarm + 'a,
fn command(
&self,
command_num: usize,
data: usize,
_: usize,
appid: AppId
) -> ReturnCode
[src]
&self,
command_num: usize,
data: usize,
_: usize,
appid: AppId
) -> ReturnCode
command
instructs a driver to perform some action synchronously. This returns ENOSUPPORT
if not used. Read more
fn allow(
&self,
appid: AppId,
allow_num: usize,
slice: Option<AppSlice<Shared, u8>>
) -> ReturnCode
[src]
&self,
appid: AppId,
allow_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
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
subscribe
lets an application pass a callback to the driver to be called later. This returns ENOSUPPORT
if not used. Read more