summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/video/vga.c6
-rw-r--r--src/drivers/video/vga.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/video/vga.c b/src/drivers/video/vga.c
index b0b61f7..2080283 100644
--- a/src/drivers/video/vga.c
+++ b/src/drivers/video/vga.c
@@ -374,3 +374,9 @@ void vga_draw_char( vga_t *vga, const unsigned char c, const int x, const int y,
}
}
+void vga_wait_for_retrace( vga_t *vga )
+{
+ while( port8_read( &vga->attribute_controller_reset_port ) & 0x08 );
+ while( !( port8_read( &vga->attribute_controller_reset_port ) & 0x08 ) );
+}
+
diff --git a/src/drivers/video/vga.h b/src/drivers/video/vga.h
index 3b09c37..b9a5c87 100644
--- a/src/drivers/video/vga.h
+++ b/src/drivers/video/vga.h
@@ -80,5 +80,6 @@ void vga_set_pixel( vga_t *vga, const int x, const int y, const vga_color_t colo
void vga_draw_rectangle( vga_t *vga, const int x, const int y, const int w, const int h, const vga_color_t color );
void vga_clear_screen( vga_t *vga, const vga_color_t color );
void vga_draw_char( vga_t *vga, const unsigned char c, const int x, const int y, const vga_color_t background, const vga_color_t foreground );
+void vga_wait_for_retrace( vga_t *vga );
#endif // VGA_H