mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2025-04-21 12:27:27 +03:00
ubb-vga: gently prepare the code for sharing mode information
This is tricky: if we just make "mode" global, the whole timing may fall apart, with the DMA locking up. So let's take small bisectable steps to get there ... - ubb-vga.c (struct mode), ubb-vga.h: moved mode entry declaration to ubb-vga.h - ubb-vga.c (mode_db): moved up
This commit is contained in:
@@ -23,6 +23,15 @@
|
||||
#define Y_VAL (1 << 2)
|
||||
|
||||
|
||||
struct mode {
|
||||
const char *name; /* NULL for end of table */
|
||||
int xres, yres;
|
||||
int clkdiv; /* pixel clock = 336 MHz/(clkdiv+1) */
|
||||
int line_cycles; /* 31.77 us for official VGA */
|
||||
int hsync_end; /* 0.79+3.77 us for official VGA */
|
||||
};
|
||||
|
||||
|
||||
void *map(off_t addr, size_t size);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user