File tree Expand file tree Collapse file tree 1 file changed +0
-45
lines changed Expand file tree Collapse file tree 1 file changed +0
-45
lines changed Original file line number Diff line number Diff line change @@ -329,52 +329,7 @@ impl UsbBus for Usbd<'_> {
329
329
interrupt:: free ( |cs| {
330
330
let regs = self . periph . borrow ( cs) ;
331
331
332
- // Neat little hack to work around svd2rust not coalescing these on its own.
333
- let epin = [
334
- & regs. epin0 ,
335
- & regs. epin1 ,
336
- & regs. epin2 ,
337
- & regs. epin3 ,
338
- & regs. epin4 ,
339
- & regs. epin5 ,
340
- & regs. epin6 ,
341
- & regs. epin7 ,
342
- ] ;
343
- let epout = [
344
- & regs. epout0 ,
345
- & regs. epout1 ,
346
- & regs. epout2 ,
347
- & regs. epout3 ,
348
- & regs. epout4 ,
349
- & regs. epout5 ,
350
- & regs. epout6 ,
351
- & regs. epout7 ,
352
- ] ;
353
-
354
332
// TODO: Initialize ISO buffers
355
- // Initialize all data pointers for the endpoint buffers, since they never change.
356
- for i in 0 ..8 {
357
- let in_enabled = self . used_in & ( 1 << i) != 0 ;
358
- let out_enabled = self . used_out & ( 1 << i) != 0 ;
359
-
360
- if in_enabled {
361
- unsafe {
362
- epin[ i] . ptr . write ( |w| w. bits ( self . bufs . in_bufs [ i] as u32 ) ) ;
363
- epin[ i]
364
- . maxcnt
365
- . write ( |w| w. bits ( u32:: from ( self . bufs . in_lens [ i] ) ) ) ;
366
- }
367
- }
368
-
369
- if out_enabled {
370
- unsafe {
371
- epout[ i] . ptr . write ( |w| w. bits ( self . bufs . out_bufs [ i] as u32 ) ) ;
372
- epout[ i]
373
- . maxcnt
374
- . write ( |w| w. bits ( u32:: from ( self . bufs . out_lens [ i] ) ) ) ;
375
- }
376
- }
377
- }
378
333
379
334
// XXX this is not spec compliant; the endpoints should only be enabled after the device
380
335
// has been put in the Configured state. However, usb-device provides no hook to do that
You can’t perform that action at this time.
0 commit comments