Turnstone Operating System
|
i/o port functions More...
#include <types.h>
Macros | |
#define | ___PORTS_H 0 |
#define | COM1 0x03F8 |
#define | COM2 0x02F8 |
#define | COM3 0x03E8 |
#define | COM4 0x02E8 |
Functions | |
static void | outb (uint16_t port, uint8_t data) |
write one byte to the port More... | |
static uint8_t | inb (uint16_t port) |
read one byte from the port More... | |
static void | outw (uint16_t port, uint16_t data) |
write one word (two bytes) to the port More... | |
static uint16_t | inw (uint16_t port) |
read one word (two bytes) from the port More... | |
static void | outl (uint16_t port, uint32_t data) |
write double word (four bytes) to the port More... | |
static uint32_t | inl (uint16_t port) |
read double word (four bytes) from the port More... | |
void | init_serial (uint16_t port) |
setups serial port More... | |
uint8_t | read_serial (uint16_t port) |
reads one byte from serial port More... | |
void | write_serial (uint16_t port, uint8_t data) |
writes one byte to serial port More... | |
i/o port functions
this functions uses inline assembly
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
#define ___PORTS_H 0 |
prevent duplicate header error macro
#define COM1 0x03F8 |
COM1 value
read one byte from the port
[in] | port | port to write |
void init_serial | ( | uint16_t | port | ) |
setups serial port
[in] | port | port to setups |
read double word (four bytes) from the port
[in] | port | port to write |
read one word (two bytes) from the port
[in] | port | port to write |
write one byte to the port
[in] | port | port to write |
[in] | data | one byte data to write |
write double word (four bytes) to the port
[in] | port | port to write |
[in] | data | double word (four bytes) data to write |
write one word (two bytes) to the port
[in] | port | port to write |
[in] | data | one word (two bytes) data to write |
reads one byte from serial port
[in] | port | port to read |