From 729e63dece229d84ea1bbae9ac1088d8e878b884 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Mon, 23 Jul 2018 23:57:34 +0200 Subject: [PATCH] crt9128: Rename VT interface functions to be private So that they can be used in multi-head setups. Signed-off-by: Tormod Volden --- Kernel/dev/crt9128.c | 24 ++++++++++++------------ Kernel/dev/crt9128.h | 11 +++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Kernel/dev/crt9128.c b/Kernel/dev/crt9128.c index ea2ecdf9..b8682b95 100644 --- a/Kernel/dev/crt9128.c +++ b/Kernel/dev/crt9128.c @@ -62,7 +62,7 @@ void crt9128_init(void) crt9128_write_reg(CRT9128_REG_MODE_REGISTER, 0); crt9128_write_reg(CRT9128_REG_ATTDAT, attdat); crt9128_set_tos_line(vram_start_line); - clear_lines(0, display_lines); + crt9128_clear_lines(0, display_lines); } /* return cursor address as a bonus */ @@ -95,7 +95,7 @@ static void crt9128_blank_hidden_line(void) /* interface to Kernel/vt.c VT52 emulation */ -void clear_across(int8_t y, int8_t x, int16_t num) +void crt9128_clear_across(int8_t y, int8_t x, int16_t num) { uint16_t end_addr; @@ -104,7 +104,7 @@ void clear_across(int8_t y, int8_t x, int16_t num) } /* also sets cursor to first cleared line */ -void clear_lines(int8_t y, int8_t num) +void crt9128_clear_lines(int8_t y, int8_t num) { uint16_t end_addr; @@ -114,7 +114,7 @@ void clear_lines(int8_t y, int8_t num) crt9128_fill(end_addr, ' '); } -void scroll_up(void) +void crt9128_scroll_up(void) { crt9128_blank_hidden_line(); if (vram_start_line == vram_lines - 1) @@ -124,7 +124,7 @@ void scroll_up(void) crt9128_set_tos_line(vram_start_line); } -void scroll_down(void) +void crt9128_scroll_down(void) { crt9128_blank_hidden_line(); if (vram_start_line == 0) @@ -134,19 +134,19 @@ void scroll_down(void) crt9128_set_tos_line(vram_start_line); } -void plot_char(int8_t y, int8_t x, uint16_t c) +void crt9128_plot_char(int8_t y, int8_t x, uint16_t c) { crt9128_set_cursor(y, x); crt9128_write_reg(CRT9128_REG_CHARACTER, c & 0x7f); } -void cursor_off(void) +void crt9128_cursor_off(void) { attdat |= CRT9128_ATTDAT_CURSOR_SUPRESS; crt9128_write_reg(CRT9128_REG_ATTDAT, attdat); } -void cursor_on(int8_t newy, int8_t newx) +void crt9128_cursor_on(int8_t newy, int8_t newx) { crt9128_set_cursor(newy, newx); @@ -154,14 +154,14 @@ void cursor_on(int8_t newy, int8_t newx) crt9128_write_reg(CRT9128_REG_ATTDAT, attdat); } -void vtattr_notify(void) +void crt9128_vtattr_notify(void) {} -void video_cmd(uint8_t *ptr) +void crt9128_video_cmd(uint8_t *ptr) {} -void video_read(uint8_t *ptr) +void crt9128_video_read(uint8_t *ptr) {} -void video_write(uint8_t *ptr) +void crt9128_video_write(uint8_t *ptr) {} diff --git a/Kernel/dev/crt9128.h b/Kernel/dev/crt9128.h index 9c3c6b26..1b1357b7 100644 --- a/Kernel/dev/crt9128.h +++ b/Kernel/dev/crt9128.h @@ -33,3 +33,14 @@ void crt9128_init(void); +void crt9128_clear_across(int8_t y, int8_t x, int16_t num); +void crt9128_clear_lines(int8_t y, int8_t num); +void crt9128_scroll_up(void); +void crt9128_scroll_down(void); +void crt9128_plot_char(int8_t y, int8_t x, uint16_t c); +void crt9128_cursor_off(void); +void crt9128_cursor_on(int8_t newy, int8_t newx); +void crt9128_vtattr_notify(void); +void crt9128_video_cmd(uint8_t *ptr); +void crt9128_video_read(uint8_t *ptr); +void crt9128_video_write(uint8_t *ptr); -- 2.34.1