blob: 810ea3769ab468e3f97a88e989a239b11f3053d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//! PIC End-of-Interrupt
const ports = @import("ports.zig");
const asm_io = @import("../../asm/io/io.zig");
pub fn send(irq: u4) void {
if (irq >= 8) {
asm_io.outb(ports.pic2_command, ports.eoi);
}
asm_io.outb(ports.pic1_command, ports.eoi);
}
pub fn send_master() void {
asm_io.outb(ports.pic1_command, ports.eoi);
}
pub fn send_slave() void {
asm_io.outb(ports.pic2_command, ports.eoi);
asm_io.outb(ports.pic1_command, ports.eoi);
}
|