aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-06-27 02:12:33 +0200
committerDario Nieuwenhuis <[email protected]>2023-06-27 02:12:33 +0200
commit80407aa930279a7d23bd1295c7703d0d9064aa58 (patch)
treee234c8cd174ff4c9298e613fa931280a198970ca
parenta575e40a3503f4bf500b7ee3cadcce44727c7c6f (diff)
stm32/otg: set tx fifo num in IN endpoints on configure.
-rw-r--r--embassy-stm32/src/usb_otg/usb.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/embassy-stm32/src/usb_otg/usb.rs b/embassy-stm32/src/usb_otg/usb.rs
index 1a0d44fd2..b2f7eb852 100644
--- a/embassy-stm32/src/usb_otg/usb.rs
+++ b/embassy-stm32/src/usb_otg/usb.rs
@@ -124,7 +124,7 @@ impl<T: Instance> interrupt::typelevel::Handler<T::Interrupt> for InterruptHandl
124 } 124 }
125 125
126 state.ep_in_wakers[ep_num].wake(); 126 state.ep_in_wakers[ep_num].wake();
127 trace!("in ep={} irq val={:b}", ep_num, ep_ints.0); 127 trace!("in ep={} irq val={:08x}", ep_num, ep_ints.0);
128 } 128 }
129 129
130 ep_mask >>= 1; 130 ep_mask >>= 1;
@@ -144,7 +144,7 @@ impl<T: Instance> interrupt::typelevel::Handler<T::Interrupt> for InterruptHandl
144 // // clear all 144 // // clear all
145 // r.doepint(ep_num).write_value(ep_ints); 145 // r.doepint(ep_num).write_value(ep_ints);
146 // state.ep_out_wakers[ep_num].wake(); 146 // state.ep_out_wakers[ep_num].wake();
147 // trace!("out ep={} irq val={=u32:b}", ep_num, ep_ints.0); 147 // trace!("out ep={} irq val={:08x}", ep_num, ep_ints.0);
148 // } 148 // }
149 149
150 // ep_mask >>= 1; 150 // ep_mask >>= 1;
@@ -571,6 +571,8 @@ impl<'d, T: Instance> Bus<'d, T> {
571 w.set_mpsiz(ep.max_packet_size); 571 w.set_mpsiz(ep.max_packet_size);
572 w.set_eptyp(to_eptyp(ep.ep_type)); 572 w.set_eptyp(to_eptyp(ep.ep_type));
573 w.set_sd0pid_sevnfrm(true); 573 w.set_sd0pid_sevnfrm(true);
574 w.set_txfnum(index as _);
575 w.set_snak(true);
574 } 576 }
575 }); 577 });
576 }); 578 });