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 b73f2b9 commit 1c84e1dCopy full SHA for 1c84e1d
main.zig
@@ -286,7 +286,7 @@ pub const Pins = packed struct {
286
return (@bitCast(u32, Gpio.registers.out.read()) & self.mask()) >> self.bitPosition(0);
287
}
288
fn bitPosition(self: Pins, i: u32) u5 {
289
- return @truncate(@ctz(self.mask()) + i);
+ return @truncate(u5, @ctz(self.mask()) + i);
290
291
pub fn read(self: Pins) u32 {
292
return (@bitCast(u32, Gpio.registers.in.read()) & self.mask()) >> self.bitPosition(0);
0 commit comments