pub struct BLEHIDDevice { /* private fields */ }

Implementations§

source§

impl BLEHIDDevice

source

pub fn new(server: &mut BLEServer) -> Self

source

pub fn report_map(&mut self, map: &[u8])

Sets the Plug n Play characteristic value.

source

pub fn manufacturer(&mut self, name: &str)

source

pub fn pnp(&mut self, sig: u8, vid: u16, pid: u16, version: u16)

source

pub fn hid_info(&mut self, country: u8, flags: u8)

Sets the HID Information characteristic value.1

source

pub fn input_report(&mut self, report_id: u8) -> Arc<Mutex<BLECharacteristic>>

Create input report characteristic

source

pub fn output_report(&mut self, report_id: u8) -> Arc<Mutex<BLECharacteristic>>

source

pub fn feature_report(&mut self, report_id: u8) -> Arc<Mutex<BLECharacteristic>>

source

pub fn boot_input(&self) -> Arc<Mutex<BLECharacteristic>>

Creates a keyboard boot input report characteristic

source

pub fn boot_output(&self) -> Arc<Mutex<BLECharacteristic>>

Creates a keyboard boot input report characteristic

source

pub fn hid_control(&self) -> &Arc<Mutex<BLECharacteristic>>

Returns the HID control point characteristic.

source

pub fn protocol_mode(&self) -> &Arc<Mutex<BLECharacteristic>>

Returns the protocol mode characteristic.

source

pub fn set_battery_level(&mut self, level: u8)

Set the battery level characteristic value.

source

pub fn hid_service(&self) -> &Arc<Mutex<BLEService>>

Returns a pointer to the HID service.

Auto Trait Implementations§

§

impl !RefUnwindSafe for BLEHIDDevice

§

impl Send for BLEHIDDevice

§

impl Sync for BLEHIDDevice

§

impl Unpin for BLEHIDDevice

§

impl !UnwindSafe for BLEHIDDevice

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.