Skip to content

Commit c52e4bd

Browse files
committed
update zig 10
1 parent 5ff9676 commit c52e4bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ pub const Pins = packed struct {
286286
return (@bitCast(u32, Gpio.registers.out.read()) & self.mask()) >> self.bitPosition(0);
287287
}
288288
fn bitPosition(self: Pins, i: u32) u5 {
289-
return @truncate(u5, @ctz(u32, self.mask()) + i);
289+
return @truncate(@ctz(u32, self.mask()) + i);
290290
}
291291
pub fn read(self: Pins) u32 {
292292
return (@bitCast(u32, Gpio.registers.in.read()) & self.mask()) >> self.bitPosition(0);
@@ -295,7 +295,7 @@ pub const Pins = packed struct {
295295
Gpio.registers.out.set(self);
296296
}
297297
fn width(self: Pins) u32 {
298-
return 32 - @clz(u32, self.mask()) - @ctz(u32, self.mask());
298+
return 32 - @clz(self.mask()) - @ctz(u32, self.mask());
299299
}
300300
pub fn write(self: Pins, x: u32) void {
301301
var new = Gpio.registers.out.read().mask() & ~self.mask();

0 commit comments

Comments
 (0)