From 4842b489d1a650f4ac6c4f4a6c99ad60d7797cf6 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Sun, 24 Dec 2023 20:32:52 +0800 Subject: [PATCH] vga: remove V_SYNC defines --- vga.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vga.cpp b/vga.cpp index 0e1d8ae..82f4b81 100644 --- a/vga.cpp +++ b/vga.cpp @@ -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()