We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 393bf32 commit cfa8271Copy full SHA for cfa8271
src/context/mod.rs
@@ -299,6 +299,10 @@ impl<const N: usize> DeviceHandler for Device<N> {
299
300
&mut self.endpoints[dci - 1]
301
}
302
+
303
+ fn fill_endpoints_with_0(&mut self) {
304
+ self.endpoints.fill(Endpoint::new())
305
+ }
306
307
308
/// A trait to handle Device Context.
@@ -324,6 +328,9 @@ pub trait DeviceHandler {
324
328
/// This method panics if `dci > 31 || dci == 0`. Call [`DeviceHandler::slot_mut`] if you want
325
329
/// a mutable handler of Slot Context.
326
330
fn endpoint_mut(&mut self, dci: usize) -> &mut dyn EndpointHandler;
331
332
+ /// fill all endpoints with 0
333
+ fn fill_endpoints_with_0(&mut self);
327
334
335
336
/// Slot Context.
0 commit comments