fix(io): resolve embarrasingly simple regression

introduced in 21eddac31e
This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-23 04:39:31 -03:00
parent 928ce674d9
commit 4b8ed3cebb
2 changed files with 4 additions and 4 deletions

View File

@ -11,8 +11,8 @@ const Bus = @import("../Bus.zig");
const DmaController = @import("dma.zig").DmaController;
const Scheduler = @import("../scheduler.zig").Scheduler;
const setHi = util.setLo;
const setLo = util.setHi;
const setHi = util.setHi;
const setLo = util.setLo;
const log = std.log.scoped(.@"I/O");

View File

@ -275,7 +275,7 @@ pub const audio = struct {
};
/// Sets the high bits of an integer to a value
pub inline fn setHi(comptime T: type, left: T, right: HalfInt(T)) T {
pub inline fn setLo(comptime T: type, left: T, right: HalfInt(T)) T {
return switch (T) {
u32 => (left & 0xFFFF_0000) | right,
u16 => (left & 0xFF00) | right,
@ -285,7 +285,7 @@ pub inline fn setHi(comptime T: type, left: T, right: HalfInt(T)) T {
}
/// sets the low bits of an integer to a value
pub inline fn setLo(comptime T: type, left: T, right: HalfInt(T)) T {
pub inline fn setHi(comptime T: type, left: T, right: HalfInt(T)) T {
return switch (T) {
u32 => (left & 0x0000_FFFF) | @as(u32, right) << 16,
u16 => (left & 0x00FF) | @as(u16, right) << 8,