mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2025-04-21 12:27:27 +03:00
ubb-vga: express mode data in more common units and remove hard-coded constants
- ubb-vga.h (struct mode), ubb-vga.c (mode_db): replaced hsync_end with its constituends hsync_cycles and hback_cycles - ubb-vga.h (struct mode), ubb-vga.c (mode_db): added vsync_lines, vfront_lines, and vback_lines - ubb-vga.h (struct mode): changed "line_cycles" from "int" to "uint16_t" - ubb-vga.c (line): don't hard-code horizontal back porch - ubb-vga.c (line): don't hard-code sum of horizontal back porch and hsync - ubb-vga.c (hdelay): don't hard-code hsync - ubb-vga.c (frame): don't hard-code vsync and the vertical porches - ubb-vga.c (frame): don't hard-code hsync and horizontal back porch
This commit is contained in:
@@ -27,8 +27,12 @@ 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 */
|
||||
int vsync_lines; /* 2 lines, for official VGA */
|
||||
int vfront_lines; /* 32 lines */
|
||||
int vback_lines; /* 14 lines */
|
||||
uint16_t hsync_cycles; /* 3.77 us */
|
||||
uint16_t hback_cycles; /* 0.79 us */
|
||||
uint16_t line_cycles; /* 31.77 us */
|
||||
};
|
||||
|
||||
extern const struct mode *mode;
|
||||
|
||||
Reference in New Issue
Block a user