diff options
| author | Timo Kröger <[email protected]> | 2024-03-14 22:14:20 +0100 |
|---|---|---|
| committer | Timo Kröger <[email protected]> | 2024-03-14 22:14:20 +0100 |
| commit | 7b80de5e3db69a3d348bc74f6294e8642a11785e (patch) | |
| tree | 04ea11051daffa367e6f7dfeb94aec2d1da04e30 | |
| parent | 57ca072dc3807a868415d91b39f814c30c2e844b (diff) | |
[UCPD] Enable dead-battery support in example
| -rw-r--r-- | examples/stm32g4/src/bin/usb_c_pd.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/stm32g4/src/bin/usb_c_pd.rs b/examples/stm32g4/src/bin/usb_c_pd.rs index c850b2753..7caea634f 100644 --- a/examples/stm32g4/src/bin/usb_c_pd.rs +++ b/examples/stm32g4/src/bin/usb_c_pd.rs | |||
| @@ -49,8 +49,9 @@ async fn wait_attached<T: ucpd::Instance>(cc_phy: &mut CcPhy<'_, T>) -> CableOri | |||
| 49 | 49 | ||
| 50 | #[embassy_executor::main] | 50 | #[embassy_executor::main] |
| 51 | async fn main(_spawner: Spawner) { | 51 | async fn main(_spawner: Spawner) { |
| 52 | // TODO: Disable DBCC pin functionality by default but have flag in the config to keep it enabled when required. | 52 | let mut config = Config::default(); |
| 53 | let p = embassy_stm32::init(Config::default()); | 53 | config.enable_ucpd1_dead_battery = true; |
| 54 | let p = embassy_stm32::init(config); | ||
| 54 | 55 | ||
| 55 | info!("Hello World!"); | 56 | info!("Hello World!"); |
| 56 | 57 | ||
