1
0
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:
Werner Almesberger
2011-05-01 15:08:02 -03:00
parent 90b087cea0
commit f7eb220401
2 changed files with 50 additions and 45 deletions

View File

@@ -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);