Skip to content

Commit

Permalink
Merge pull request #639 from mrdxxm/usb-set-device-patch
Browse files Browse the repository at this point in the history
Fix of usb device address mask
  • Loading branch information
ithinuel authored Jun 27, 2023
2 parents 08f5e0f + 59ceb47 commit b1eea90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rp2040-hal/src/usb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ impl UsbBusTrait for UsbBus {
inner
.ctrl_reg
.addr_endp
.modify(|_, w| unsafe { w.address().bits(addr & 0x3F) });
.modify(|_, w| unsafe { w.address().bits(addr & 0x7F) });
// reset ep0
inner.ctrl_dpram.ep_buffer_control[0].modify(|_, w| w.pid_0().set_bit());
inner.ctrl_dpram.ep_buffer_control[1].modify(|_, w| w.pid_0().set_bit());
Expand Down

0 comments on commit b1eea90

Please sign in to comment.