hal: dma: Cast channel index in claim_unused_channel (#170)

`i` is `usize` but `channel()` expects a `u4`.
wch-ch32v003
Grazfather 7 months ago committed by GitHub
parent 196bbd8094
commit b1cbd1bf34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,7 +26,7 @@ pub fn claim_unused_channel() ?Channel {
for (0..num_channels) |i| { for (0..num_channels) |i| {
if (claimed_channels.get(i)) { if (claimed_channels.get(i)) {
claimed_channels.set(i, true); claimed_channels.set(i, true);
return channel(i); return channel(@intCast(i));
} }
} }

Loading…
Cancel
Save