Struct hosp::HospDevice [−][src]
pub struct HospDevice<'a> { pub timeout_ms: i32, // some fields omitted }
Context object for managing the HID device.
Fields
timeout_ms: i32
The read timeout in milliseconds: 0 by default, -1 for blocking reads
Methods
impl<'a> HospDevice<'a>
[src]
impl<'a> HospDevice<'a>
pub fn from_hid(hid: &'a HidApi) -> HospResult<Self>
[src]
pub fn from_hid(hid: &'a HidApi) -> HospResult<Self>
Open the ODROID Smart Power
pub fn get_version(&self) -> HospResult<Option<String>>
[src]
pub fn get_version(&self) -> HospResult<Option<String>>
Try to get the version string
pub fn get_status(&self) -> HospResult<Option<HospStatus>>
[src]
pub fn get_status(&self) -> HospResult<Option<HospStatus>>
Try to get the device status
pub fn toggle_onoff(&self) -> HospResult<()>
[src]
pub fn toggle_onoff(&self) -> HospResult<()>
Toggle the ON/OFF status
pub fn toggle_startstop(&self) -> HospResult<()>
[src]
pub fn toggle_startstop(&self) -> HospResult<()>
Toggle the START/STOP status
pub fn get_data(&self) -> HospResult<Option<HospData>>
[src]
pub fn get_data(&self) -> HospResult<Option<HospData>>
Try to get data from the device
Auto Trait Implementations
impl<'a> !Send for HospDevice<'a>
impl<'a> !Send for HospDevice<'a>
impl<'a> !Sync for HospDevice<'a>
impl<'a> !Sync for HospDevice<'a>