pub struct HidbusSynchronousProxy { /* private fields */ }
Implementations§
Source§impl HidbusSynchronousProxy
impl HidbusSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<HidbusEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<HidbusEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn query(
&self,
___deadline: MonotonicInstant,
) -> Result<HidbusQueryResult, Error>
pub fn query( &self, ___deadline: MonotonicInstant, ) -> Result<HidbusQueryResult, Error>
Obtain information about the hidbus device and supported features. Safe to call at any time.
Sourcepub fn start(
&self,
___deadline: MonotonicInstant,
) -> Result<HidbusStartResult, Error>
pub fn start( &self, ___deadline: MonotonicInstant, ) -> Result<HidbusStartResult, Error>
Start the hidbus device. The device may begin queueing hid reports via OnReportReceived before this function returns. The hidbus device will keep track of the number of times Start has been called and will only be stopped when Stop has been called for each Start that has been called. Theoretically, Start should not be called again by the same client unless it has called Stop.
Sourcepub fn get_descriptor(
&self,
desc_type: HidDescriptorType,
___deadline: MonotonicInstant,
) -> Result<HidbusGetDescriptorResult, Error>
pub fn get_descriptor( &self, desc_type: HidDescriptorType, ___deadline: MonotonicInstant, ) -> Result<HidbusGetDescriptorResult, Error>
Methods matching HID spec 1.11 Chapter 7 Requests 7.1.1 Get_Descriptor
Sourcepub fn set_descriptor(
&self,
desc_type: HidDescriptorType,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<HidbusSetDescriptorResult, Error>
pub fn set_descriptor( &self, desc_type: HidDescriptorType, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<HidbusSetDescriptorResult, Error>
7.1.2 Set_Descriptor (optional)
Sourcepub fn get_report(
&self,
rpt_type: ReportType,
rpt_id: u8,
len: u64,
___deadline: MonotonicInstant,
) -> Result<HidbusGetReportResult, Error>
pub fn get_report( &self, rpt_type: ReportType, rpt_id: u8, len: u64, ___deadline: MonotonicInstant, ) -> Result<HidbusGetReportResult, Error>
7.2.1 Get_Report
Sourcepub fn set_report(
&self,
rpt_type: ReportType,
rpt_id: u8,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<HidbusSetReportResult, Error>
pub fn set_report( &self, rpt_type: ReportType, rpt_id: u8, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<HidbusSetReportResult, Error>
7.2.2 Set_Report
Sourcepub fn get_idle(
&self,
rpt_id: u8,
___deadline: MonotonicInstant,
) -> Result<HidbusGetIdleResult, Error>
pub fn get_idle( &self, rpt_id: u8, ___deadline: MonotonicInstant, ) -> Result<HidbusGetIdleResult, Error>
7.2.3 Get_Idle
Sourcepub fn set_idle(
&self,
rpt_id: u8,
duration: i64,
___deadline: MonotonicInstant,
) -> Result<HidbusSetIdleResult, Error>
pub fn set_idle( &self, rpt_id: u8, duration: i64, ___deadline: MonotonicInstant, ) -> Result<HidbusSetIdleResult, Error>
7.2.4 Set_Idle
Sourcepub fn get_protocol(
&self,
___deadline: MonotonicInstant,
) -> Result<HidbusGetProtocolResult, Error>
pub fn get_protocol( &self, ___deadline: MonotonicInstant, ) -> Result<HidbusGetProtocolResult, Error>
7.2.5 Get_Protocol
Sourcepub fn set_protocol(
&self,
protocol: HidProtocol,
___deadline: MonotonicInstant,
) -> Result<HidbusSetProtocolResult, Error>
pub fn set_protocol( &self, protocol: HidProtocol, ___deadline: MonotonicInstant, ) -> Result<HidbusSetProtocolResult, Error>
7.2.6 Set_Protocol
Trait Implementations§
Source§impl Debug for HidbusSynchronousProxy
impl Debug for HidbusSynchronousProxy
Source§impl SynchronousProxy for HidbusSynchronousProxy
impl SynchronousProxy for HidbusSynchronousProxy
Source§type Proxy = HidbusProxy
type Proxy = HidbusProxy
Source§type Protocol = HidbusMarker
type Protocol = HidbusMarker
Proxy
controls.