summaryrefslogtreecommitdiff
path: root/src/drivers/video/vga.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-30 11:11:10 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-30 11:11:10 +0200
commitad7f1dd777eda2d6505118c4e47faba3f21e78ba (patch)
tree7ec61f6349dbec0e70bbb22cd9e83113e2b1a923 /src/drivers/video/vga.c
parent58df0d3172ad548b85627e5bb0b92a27a6072736 (diff)
downloadabaos-ad7f1dd777eda2d6505118c4e47faba3f21e78ba.tar.gz
abaos-ad7f1dd777eda2d6505118c4e47faba3f21e78ba.tar.bz2
added a VGA wait for retrace in graphics mode
Diffstat (limited to 'src/drivers/video/vga.c')
-rw-r--r--src/drivers/video/vga.c6
1 files changed, 6 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 ) );
+}
+