Skip to content

Commit 1c84e1d

Browse files
committed
.
1 parent b73f2b9 commit 1c84e1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.zig

Lines changed: 1 addition & 1 deletion
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(@ctz(self.mask()) + i);
289+
return @truncate(u5, @ctz(self.mask()) + i);
290290
}
291291
pub fn read(self: Pins) u32 {
292292
return (@bitCast(u32, Gpio.registers.in.read()) & self.mask()) >> self.bitPosition(0);

0 commit comments

Comments
 (0)