aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32g4
diff options
context:
space:
mode:
authorSjoerd Simons <[email protected]>2024-08-18 21:06:13 +0200
committerSjoerd Simons <[email protected]>2024-08-18 21:19:16 +0200
commit1b0661ebb17fca93d11891a1c488005d3d644784 (patch)
tree919b6ec0beabb996d7a90ca9f04daed409101e6e /examples/stm32g4
parentd8459685fd1e53a0fb57f44d950e0bc4f450c5f7 (diff)
[UCPD] Add support for non-SOP packets
Allow capturing (and distinguishing) non-SOP packets as well. The default configuration will just configure SOP packets. For ease of use the default receive function signature is unchanged as for PD sinks (which is likely the common usage) just SOP is enough so no need to differentiate.
Diffstat (limited to 'examples/stm32g4')
-rw-r--r--examples/stm32g4/src/bin/usb_c_pd.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32g4/src/bin/usb_c_pd.rs b/examples/stm32g4/src/bin/usb_c_pd.rs
index 7caea634f..2e87d3931 100644
--- a/examples/stm32g4/src/bin/usb_c_pd.rs
+++ b/examples/stm32g4/src/bin/usb_c_pd.rs
@@ -55,7 +55,7 @@ async fn main(_spawner: Spawner) {
55 55
56 info!("Hello World!"); 56 info!("Hello World!");
57 57
58 let mut ucpd = Ucpd::new(p.UCPD1, Irqs {}, p.PB6, p.PB4); 58 let mut ucpd = Ucpd::new(p.UCPD1, Irqs {}, p.PB6, p.PB4, Default::default());
59 ucpd.cc_phy().set_pull(CcPull::Sink); 59 ucpd.cc_phy().set_pull(CcPull::Sink);
60 60
61 info!("Waiting for USB connection..."); 61 info!("Waiting for USB connection...");