From 8effff338302d82b08e2a8f0d97a2d69d9a7b96a Mon Sep 17 00:00:00 2001 From: kalkyl Date: Tue, 7 Nov 2023 20:45:01 +0100 Subject: [PATCH] rp: Remove control handler from USB raw bulk example --- examples/rp/src/bin/usb_raw_bulk.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/examples/rp/src/bin/usb_raw_bulk.rs b/examples/rp/src/bin/usb_raw_bulk.rs index ad31045f..288be5a4 100644 --- a/examples/rp/src/bin/usb_raw_bulk.rs +++ b/examples/rp/src/bin/usb_raw_bulk.rs @@ -36,7 +36,7 @@ use embassy_rp::peripherals::USB; use embassy_rp::usb::{Driver, InterruptHandler}; use embassy_usb::driver::{Endpoint, EndpointIn, EndpointOut}; use embassy_usb::msos::{self, windows_version}; -use embassy_usb::{Builder, Config, Handler}; +use embassy_usb::{Builder, Config}; use {defmt_rtt as _, panic_probe as _}; // This is a randomly generated GUID to allow clients on Windows to find our device @@ -78,8 +78,6 @@ async fn main(_spawner: Spawner) { let mut msos_descriptor = [0; 256]; let mut control_buf = [0; 64]; - let mut handler = ControlHandler; - let mut builder = Builder::new( driver, config, @@ -110,9 +108,7 @@ async fn main(_spawner: Spawner) { let mut alt = interface.alt_setting(0xFF, 0, 0, None); let mut read_ep = alt.endpoint_bulk_out(64); let mut write_ep = alt.endpoint_bulk_in(64); - drop(function); - builder.handler(&mut handler); // Build the builder. let mut usb = builder.build(); @@ -144,7 +140,3 @@ async fn main(_spawner: Spawner) { // If we had made everything `'static` above instead, we could do this using separate tasks instead. join(usb_fut, echo_fut).await; } - -/// Handle CONTROL endpoint requests and responses. -struct ControlHandler; -impl Handler for ControlHandler {}