Skip to content

Commit

Permalink
Cleanup/address PR comments in zig-master (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather authored Mar 11, 2025
1 parent c0b5f25 commit 4be8f2b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
16 changes: 14 additions & 2 deletions core/src/core/usb.zig
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ pub fn Usb(comptime f: anytype) type {
}

fn device() types.UsbDevice {
return .{ .fn_ready = device_ready, .fn_control_transfer = device_control_transfer, .fn_control_ack = device_control_ack, .fn_endpoint_open = device_endpoint_open, .fn_endpoint_transfer = device_endpoint_transfer };
return .{
.fn_ready = device_ready,
.fn_control_transfer = device_control_transfer,
.fn_control_ack = device_control_ack,
.fn_endpoint_open = device_endpoint_open,
.fn_endpoint_transfer = device_endpoint_transfer,
};
}

fn device_ready() bool {
Expand Down Expand Up @@ -504,7 +510,13 @@ pub fn Usb(comptime f: anytype) type {
// Driver support stuctures
// +++++++++++++++++++++++++++++++++++++++++++++++++

pub const DeviceConfiguration = struct { device_descriptor: *const types.DeviceDescriptor, config_descriptor: []const u8, lang_descriptor: []const u8, descriptor_strings: []const []const u8, drivers: []types.UsbClassDriver };
pub const DeviceConfiguration = struct {
device_descriptor: *const types.DeviceDescriptor,
config_descriptor: []const u8,
lang_descriptor: []const u8,
descriptor_strings: []const []const u8,
drivers: []types.UsbClassDriver,
};

/// USB interrupt status
///
Expand Down
3 changes: 1 addition & 2 deletions port/raspberrypi/rp2xxx/patches/rp2040.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const microzig = @import("microzig/build-internals");
const Patch = microzig.Patch;
const Patch = @import("microzig/build-internals").Patch;

pub const patches: []const Patch = &.{
.{
Expand Down
3 changes: 1 addition & 2 deletions port/raspberrypi/rp2xxx/patches/rp2350.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const microzig = @import("microzig/build-internals");
const Patch = microzig.Patch;
const Patch = @import("microzig/build-internals").Patch;

pub const patches: []const Patch = &.{
.{ .add_enum = .{
Expand Down

0 comments on commit 4be8f2b

Please sign in to comment.