Skip to content

Commit

Permalink
hal: dma: Cast channel index in claim_unused_channel (#170)
Browse files Browse the repository at this point in the history
`i` is `usize` but `channel()` expects a `u4`.
  • Loading branch information
Grazfather authored Feb 18, 2024
1 parent 196bbd8 commit b1cbd1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion board-support/raspberrypi-rp2040/src/hal/dma.zig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn claim_unused_channel() ?Channel {
for (0..num_channels) |i| {
if (claimed_channels.get(i)) {
claimed_channels.set(i, true);
return channel(i);
return channel(@intCast(i));
}
}

Expand Down

0 comments on commit b1cbd1b

Please sign in to comment.