diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
| commit | 8251da342161767fe203627223ccd4a7026701c6 (patch) | |
| tree | af2db0f11b0ea8ad35f88663a855bab39a80f679 /arch/x86_64/hal/serial_com.h | |
| download | jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.gz jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.bz2 jove-kernel-8251da342161767fe203627223ccd4a7026701c6.zip | |
initial commit. working on tasking
Diffstat (limited to 'arch/x86_64/hal/serial_com.h')
| -rw-r--r-- | arch/x86_64/hal/serial_com.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86_64/hal/serial_com.h b/arch/x86_64/hal/serial_com.h new file mode 100644 index 0000000..2dbb0cd --- /dev/null +++ b/arch/x86_64/hal/serial_com.h @@ -0,0 +1,26 @@ +#ifndef _JOVE_SERIAL_COM_H +#define _JOVE_SERIAL_COM_H 1 + +#include <stdint.h> +#include "obj.h" + +#define SERIAL_COM1 0x3F8 + +#define SERIAL_COM_TR(com) (com) +#define SERIAL_COM_IER(com) (com + 1) +#define SERIAL_COM_II(com) (com + 2) +#define SERIAL_COM_FIFO(com) (com + 2) +#define SERIAL_COM_LCR(com) (com + 3) +#define SERIAL_COM_MCR(com) (com + 4) +#define SERIAL_COM_LSR(com) (com + 5) +#define SERIAL_COM_MSR(com) (com + 6) +#define SERIAL_COM_SR(com) (com + 7) + +#define SERIAL_COM_DLAB_BAUD_LO(com) (com) +#define SERIAL_COM_DLAB_BAUD_HI(com) (com + 1) + +void serial_com_init(void); + +int serial_com_write(jove_owned_obj_t *obj, const char *s, size_t len); + +#endif |
