chore: make use of comptime control flow when working with tuples

This commit is contained in:
2022-10-31 03:22:08 -03:00
parent 2ef4bb7dcc
commit 472457b9f3
4 changed files with 19 additions and 43 deletions

View File

@@ -335,10 +335,10 @@ fn DmaController(comptime id: u2) type {
}
pub fn pollDmaOnBlank(bus: *Bus, comptime kind: DmaKind) void {
bus.dma[0].poll(kind);
bus.dma[1].poll(kind);
bus.dma[2].poll(kind);
bus.dma[3].poll(kind);
comptime var i: usize = 0;
inline while (i < 4) : (i += 1) {
bus.dma[i].poll(kind);
}
}
const Adjustment = enum(u2) {