Text Video Drivers¶
A text video driver provides a means of putting printable characters to the screen. A higher-level system component, e.g., a console, uses video text operations to communicate with the text video driver.
Text Video Drivers provided by tomOSii¶
Datatypes Provided for the Video Text Drivers¶
Video Text Operations¶
The interface between higher-level system components like a console and the text video driver.
-
struct video_text_operations_t¶
Callbacks provided by video text drivers.
These callbacks provide a higher-level console driver with access to lower-level hardware via a common interface. The callbacks have to be implemented by a video text driver, e.g., the video vga text driver.
This data structure and the callbacks defined in it are based on
struct conswfrom the Linux kernel (as of 6.17.5). They are adapted and simplified and may have long diverged in order to make tomOSii a prototypical teaching operating system.Public Members
-
void (*vid_txt_putc)(console_t *con, uint16_t ca, unsigned int y, unsigned int x)¶
Emit one character with attributes
cato [x,y].
-
void (*vid_txt_clear)(console_t *con, unsigned int y, unsigned int x, size_t count)¶
Erase
countcharacters starting at [x,y].
-
void (*vid_txt_cursor)(console_t *con, unsigned int y, unsigned int x, bool enable)¶
Set the cursor’s [
x,y] position andenabledstate.
-
void (*vid_txt_scroll)(console_t *con, unsigned int top, unsigned int bottom, vid_txt_scroll_t dir, unsigned int lines)¶
scroll the display from
top(inclusive) tobottom(exclusive) in directiondirbylines.
-
void (*vid_txt_putc)(console_t *con, uint16_t ca, unsigned int y, unsigned int x)¶
Video Text Scroll Directions¶
The direction for scrolling the text display has its own type to avoid magic numbers: