summaryrefslogtreecommitdiff
path: root/arch/i386/pic.h
blob: da4a2eeb5f215f7317005178c8680ccf3b5e922a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef PIC_H
#define PIC_H

#include <stdint.h>

static inline void outb(uint16_t port, uint8_t value) {
        asm volatile("outb %0, %1" : : "a"(value), "Nd"(port));
}

static inline uint8_t inb(uint16_t port) {
        uint8_t ret;
        asm volatile("inb %1, %0" : "=a"(ret) : "Nd"(port));
        return ret;
}

#endif