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 ab6e138 commit e249642Copy full SHA for e249642
port/raspberrypi/rp2xxx/src/hal/usb.zig
@@ -254,6 +254,8 @@ pub fn F(comptime config: UsbConfig) type {
254
// TODO: assert!(UsbDir::of_endpoint_addr(ep.descriptor.endpoint_address) == UsbDir::In);
255
256
const ep = hardware_endpoint_get_by_address(ep_addr);
257
+ // wait for controller to give processor ownership of the buffer before writing it.
258
+ while (ep.buffer_control.?.read().AVAILABLE_0 == 1) {}
259
260
// TODO: please fixme: https://github.com/ZigEmbeddedGroup/microzig/issues/452
261
std.mem.copyForwards(u8, ep.data_buffer[0..buffer.len], buffer);
0 commit comments