Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/tools-regz-wizard.yml

This file was deleted.

47 changes: 29 additions & 18 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const std = @import("std");
const Build = std.Build;
const LazyPath = Build.LazyPath;
const assert = std.debug.assert;

const internals = @import("build-internals");
pub const Target = internals.Target;
Expand Down Expand Up @@ -138,25 +139,35 @@ fn generate_release_steps(b: *Build) void {
}
}

pub const PortSelect = blk: {
var fields: []const std.builtin.Type.StructField = &.{};
for (port_list) |port| {
fields = fields ++ [_]std.builtin.Type.StructField{.{
.name = port.name,
.type = bool,
.default_value_ptr = @as(*const anyopaque, @ptrCast(&false)),
.is_comptime = false,
.alignment = @alignOf(bool),
}};
pub const PortSelect = struct {
esp: bool = false,
gd32: bool = false,
atsam: bool = false,
avr: bool = false,
nrf5x: bool = false,
lpc: bool = false,
mcx: bool = false,
rp2xxx: bool = false,
stm32: bool = false,
ch32v: bool = false,

pub const all: PortSelect = blk: {
var ret: PortSelect = undefined;
for (@typeInfo(PortSelect).@"struct".fields) |field| {
@field(ret, field.name) = true;
}

break :blk ret;
};

comptime {
// assumes fields are in the same order as the port list
for (port_list, @typeInfo(PortSelect).@"struct".fields) |port_entry, field| {
assert(std.mem.eql(u8, port_entry.name, field.name));
const default_value_ptr: *const bool = @ptrCast(field.default_value_ptr);
assert(false == default_value_ptr.*);
}
}
break :blk @Type(.{
.@"struct" = .{
.layout = .auto,
.fields = fields,
.decls = &.{},
.is_tuple = false,
},
});
};

// Don't know if this is required but it doesn't hurt either.
Expand Down
59 changes: 0 additions & 59 deletions tools/regz-wizard/build.zig

This file was deleted.

19 changes: 0 additions & 19 deletions tools/regz-wizard/build.zig.zon

This file was deleted.

43 changes: 0 additions & 43 deletions tools/regz-wizard/src/VirtualFilesystem.zig

This file was deleted.

143 changes: 0 additions & 143 deletions tools/regz-wizard/src/main.zig

This file was deleted.

1 change: 1 addition & 0 deletions tools/sorcerer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Sorcerer
Loading
Loading