vga: remove V_SYNC defines

This commit is contained in:
Zack Buhman 2023-12-24 20:32:52 +08:00
parent e340c3ca02
commit 4842b489d1

12
vga.cpp
View File

@ -97,26 +97,22 @@ void vga2()
void v_sync_in()
{
#define V_SYNC (1<<13)
while (!(V_SYNC & holly.SPG_STATUS)) {
while (!spg_status::vsync(holly.SPG_STATUS)) {
asm volatile ("nop");
}
while ((V_SYNC & holly.SPG_STATUS)) {
while (spg_status::vsync(holly.SPG_STATUS)) {
asm volatile ("nop");
}
#undef V_SYNC
}
void v_sync_out()
{
#define V_SYNC (1<<13)
while ((V_SYNC & holly.SPG_STATUS)) {
while (spg_status::vsync(holly.SPG_STATUS)) {
asm volatile ("nop");
}
while (!(V_SYNC & holly.SPG_STATUS)) {
while (!spg_status::vsync(holly.SPG_STATUS)) {
asm volatile ("nop");
}
#undef V_SYNC
}
void vga()