Skip to content

Commit

Permalink
asynchronous/embassy: Add enable_source wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertZ2011 committed Mar 7, 2025
1 parent 882a12f commit 5028e48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/asynchronous/embassy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ impl<'a, M: RawMutex, B: I2c> Tps6699x<'a, M, B> {
self.lock_inner().await.set_system_config(config).await
}

/// Wrapper for `enable_source`
pub async fn enable_source(&mut self, port: PortId, enable: bool) -> Result<(), Error<B::Error>> {
self.lock_inner().await.enable_source(port, enable).await
}

/// Returns the number of ports
pub fn num_ports(&self) -> usize {
self.controller.num_ports
Expand Down

0 comments on commit 5028e48

Please sign in to comment.