Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
Loading...
Searching...
No Matches
kprintf.h
Go to the documentation of this file.
1
12#ifndef UTILS_KPRINTF_H
13#define UTILS_KPRINTF_H
14
21typedef struct serial_t {
24 void (*putc)(char chr);
25
28 char (*getc)();
30
39void set_kprintf_console(serial_t console);
40
52int kprintf(const char *format, ...) __attribute__((format(printf, 1, 2)));
53
54#endif // UTILS_KPRINTF_H
void set_kprintf_console(serial_t console)
Configures the global serial console used by kprintf.
Definition kprintf.c:175
int kprintf(const char *format,...)
Standard formatted print to the serial console.
Definition kprintf.c:181
Hardware abstraction layer for serial I/O operations.
Definition kprintf.h:21
char(* getc)()
Function pointer to receive a single character from the serial port.
Definition kprintf.h:28
void(* putc)(char chr)
Function pointer to transmit a single character over the serial port.
Definition kprintf.h:24