Skip to content

Commit

Permalink
Merge pull request #61 from a1ien/add_missing_descriptor_getters
Browse files Browse the repository at this point in the history
Add getters for bRefresh and bSynchAddress
  • Loading branch information
a1ien authored May 4, 2021
2 parents ad2bde7 + b513be5 commit 6b19e2c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/endpoint_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ impl<'a> EndpointDescriptor<'a> {
}
}
}

/// For audio devices only: return the rate at which synchronization feedback is provided.
pub fn refresh(&self) -> u8 {
self.descriptor.bRefresh
}

/// For audio devices only: return the address if the synch endpoint.
pub fn synch_address(&self) -> u8 {
self.descriptor.bSynchAddress
}
}

impl<'a> fmt::Debug for EndpointDescriptor<'a> {
Expand Down

0 comments on commit 6b19e2c

Please # to comment.