@@ -116,16 +116,16 @@ pub const interrupt = struct {
116116 const shift : u4 = @intCast (4 * (num & 0x4 ));
117117 const set_mask : u16 = @as (u16 , @intFromEnum (priority )) << shift ;
118118 const clear_mask : u16 = @as (u16 , 0xf ) << shift ;
119- csr .meifa .clear (.{ .index = index , .window = clear_mask });
120- csr .meifa .set (.{ .index = index , .window = set_mask });
119+ csr .meipra .clear (.{ .index = index , .window = clear_mask });
120+ csr .meipra .set (.{ .index = index , .window = set_mask });
121121 }
122122
123123 pub fn get_priority (int : ExternalInterrupt ) Priority {
124124 const num : u7 = @intFromEnum (int );
125125 const index : u5 = @intCast (num >> 2 );
126126 const shift : u4 = @intCast (4 * (num & 0x4 ));
127127 const mask : u16 = @as (u16 , 0xf ) << shift ;
128- return @enumFromInt ((csr .meifa .read_set (.{ .index = index }).window & mask ) >> shift );
128+ return @enumFromInt ((csr .meipra .read_set (.{ .index = index }).window & mask ) >> shift );
129129 }
130130
131131 pub inline fn has_ram_vectors () bool {
@@ -219,9 +219,6 @@ pub const startup_logic = struct {
219219 @memcpy (& ram_vectors , & startup_logic .external_interrupt_table );
220220 }
221221
222- // NOTE: tact1m4n3: I don't think it's fine to enable this behind the user's back.
223- interrupt .core .enable (.MachineExternal );
224-
225222 microzig_main ();
226223 }
227224
0 commit comments