Hacky debugging function by setting VESA pixels, sometimes useful
authorH. Peter Anvin <hpa@zytor.com>
Thu, 31 May 2007 22:40:14 +0000 (15:40 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 31 May 2007 22:40:14 +0000 (15:40 -0700)
com32/lib/sys/vesa/vesa.h

index 55e64b4..56c1738 100644 (file)
@@ -97,4 +97,17 @@ struct vesa_info {
 
 extern struct vesa_info __vesa_info;
 
+#if 0
+static inline void vesa_debug(uint32_t color, int pos)
+{
+  uint32_t *stp = (uint32_t *)__vesa_info.mi.lfb_ptr;
+  stp[pos*3] = color;
+}
+#else
+static inline void vesa_debug(uint32_t color, int pos)
+{
+  (void)color; (void)pos;
+}
+#endif
+
 #endif /* LIB_SYS_VESA_H */