Rev 2927 | Rev 4344 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2927 | Rev 4343 | ||
---|---|---|---|
Line 71... | Line 71... | ||
71 | * Get byte from port |
71 | * Get byte from port |
72 | * |
72 | * |
73 | * @param port Port to read from |
73 | * @param port Port to read from |
74 | * @return Value read |
74 | * @return Value read |
75 | */ |
75 | */ |
76 | static inline uint8_t inb(uint16_t port) |
76 | static inline uint8_t pio_read_8(uint16_t port) |
77 | { |
77 | { |
78 | uint8_t val; |
78 | uint8_t val; |
79 | 79 | ||
80 | asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port)); |
80 | asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port)); |
81 | return val; |
81 | return val; |
Line 86... | Line 86... | ||
86 | * Output byte to port |
86 | * Output byte to port |
87 | * |
87 | * |
88 | * @param port Port to write to |
88 | * @param port Port to write to |
89 | * @param val Value to write |
89 | * @param val Value to write |
90 | */ |
90 | */ |
91 | static inline void outb(uint16_t port, uint8_t val) |
91 | static inline void pio_write_8(uint16_t port, uint8_t val) |
92 | { |
92 | { |
93 | asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port)); |
93 | asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port)); |
94 | } |
94 | } |
95 | 95 | ||
96 | /** Swap Hidden part of GS register with visible one */ |
96 | /** Swap Hidden part of GS register with visible one */ |