hack: disallow stalling in rp2040

This commit is contained in:
Naxdy 2024-10-12 16:30:50 +02:00
parent da9ce32909
commit 683e4d2f86
Signed by: Naxdy
GPG key ID: CC15075846BCE91B

View file

@ -413,40 +413,11 @@ impl<'d, T: Instance> driver::Bus for Bus<'d, T> {
}
fn endpoint_set_stalled(&mut self, ep_addr: EndpointAddress, stalled: bool) {
let n = ep_addr.index();
if n == 0 {
T::regs().ep_stall_arm().modify(|w| {
if ep_addr.is_in() {
w.set_ep0_in(stalled);
} else {
w.set_ep0_out(stalled);
}
});
}
let ctrl = if ep_addr.is_in() {
T::dpram().ep_in_buffer_control(n)
} else {
T::dpram().ep_out_buffer_control(n)
};
ctrl.modify(|w| w.set_stall(stalled));
let wakers = if ep_addr.is_in() { &EP_IN_WAKERS } else { &EP_OUT_WAKERS };
wakers[n].wake();
warn!("Call to unsupported function set_stalled!")
}
fn endpoint_is_stalled(&mut self, ep_addr: EndpointAddress) -> bool {
let n = ep_addr.index();
let ctrl = if ep_addr.is_in() {
T::dpram().ep_in_buffer_control(n)
} else {
T::dpram().ep_out_buffer_control(n)
};
ctrl.read().stall()
warn!("Call to unsupported function is_stalled!")
}
fn endpoint_set_enabled(&mut self, ep_addr: EndpointAddress, enabled: bool) {