From 156aad061f5054829c94c233208c09b356efd9c6 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 25 Feb 2024 23:45:28 -0500 Subject: kernel: vcons: Add more documentation Signed-off-by: Ian Moffett --- sys/dev/vcons/vcons.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/vcons/vcons.c b/sys/dev/vcons/vcons.c index 1c69cf3..262e3f7 100644 --- a/sys/dev/vcons/vcons.c +++ b/sys/dev/vcons/vcons.c @@ -44,6 +44,11 @@ __KERNEL_META("$Hyra$: kern_vcons.c, Ian Marco Moffett, " static struct vcons_screen *screen = NULL; +/* + * Draw the console cursor. + * + * @color: Cursor color + */ static void vcons_draw_cursor(struct vcons_screen *scr, uint32_t color) { @@ -65,6 +70,9 @@ vcons_draw_cursor(struct vcons_screen *scr, uint32_t color) } } +/* + * Clear everything out of the console. + */ static void vcons_clear_scr(struct vcons_screen *scr) { @@ -102,6 +110,12 @@ vcons_draw_char(struct vcons_screen *scr, char c, uint32_t x, uint32_t y) } } +/* + * Update the cursor position. + * + * XXX: This function also accounts for the old cursor + * and clears it before drawing the new cursor. + */ void vcons_update_cursor(struct vcons_screen *scr) { @@ -122,6 +136,11 @@ vcons_update_cursor(struct vcons_screen *scr) cursor->is_drawing = false; } +/* + * Write out a character on the console. + * + * @c: Character to write. + */ int vcons_putch(struct vcons_screen *scr, char c) { -- cgit v1.2.3