diff options
| author | EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> | 2024-05-07 11:07:03 -0400 |
|---|---|---|
| committer | EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> | 2024-05-07 11:07:03 -0400 |
| commit | abaab98bd757cd0818cfcddc983eee25ab7672ed (patch) | |
| tree | 4e5d407cf55877b38699ac12b904be2dc3d99864 /kernel/include | |
| parent | 47d94ed4fd724d0e8b7819e7e3d0783c798ea190 (diff) | |
Made framebuffer class, serial write functions, and finally got makefile to build without having to make clean
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/arch/x86_64/serial.h | 19 | ||||
| -rw-r--r-- | kernel/include/framebuffer.h | 18 |
2 files changed, 37 insertions, 0 deletions
diff --git a/kernel/include/arch/x86_64/serial.h b/kernel/include/arch/x86_64/serial.h new file mode 100644 index 0000000..2ee63c5 --- /dev/null +++ b/kernel/include/arch/x86_64/serial.h @@ -0,0 +1,19 @@ +#ifndef SERIAL_H
+#define SERIAL_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void serial_putchar(char c);
+void serial_write(const char* data, size_t size);
+void serial_writestring(const char* data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file diff --git a/kernel/include/framebuffer.h b/kernel/include/framebuffer.h new file mode 100644 index 0000000..6080810 --- /dev/null +++ b/kernel/include/framebuffer.h @@ -0,0 +1,18 @@ +#ifndef FRAMEBUFFER_H
+#define FRAMEBUFFER_H
+
+#include <stdint.h>
+
+class Framebuffer {
+ private:
+ uint32_t* addr;
+ const uint64_t width;
+ const uint64_t height;
+
+ public:
+ Framebuffer(uint32_t* addr, const uint64_t width, const uint64_t height);
+ void clear();
+ void drawpixel(const uint64_t x, const uint64_t y, const uint32_t color);
+};
+
+#endif
\ No newline at end of file |
