aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vcons
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-25 23:45:28 -0500
committerIan Moffett <ian@osmora.org>2024-02-25 23:45:28 -0500
commit156aad061f5054829c94c233208c09b356efd9c6 (patch)
tree60eeb781f3c089877a4fda75e1d102a301c87c40 /sys/dev/vcons
parentc9b48569f0aee7cbd643201d7eaf922ed1b7e8dc (diff)
kernel: vcons: Add more documentation
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev/vcons')
-rw-r--r--sys/dev/vcons/vcons.c19
1 files changed, 19 insertions, 0 deletions
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)
{