From 5028e48df4b3ea92788d36a6c81fc1b64b956e9e Mon Sep 17 00:00:00 2001 From: Robert Zieba Date: Fri, 7 Mar 2025 16:06:47 -0700 Subject: [PATCH] asynchronous/embassy: Add `enable_source` wrapper --- src/asynchronous/embassy/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/asynchronous/embassy/mod.rs b/src/asynchronous/embassy/mod.rs index 7070b24..93a3c7e 100644 --- a/src/asynchronous/embassy/mod.rs +++ b/src/asynchronous/embassy/mod.rs @@ -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> { + self.lock_inner().await.enable_source(port, enable).await + } + /// Returns the number of ports pub fn num_ports(&self) -> usize { self.controller.num_ports