1 /* 2 * Initialisation of application-specific display configuration. This requires 3 * the prior definition of various display properties. 4 * 5 * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk> 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __DISPLAY_CONFIG_H__ 22 #define __DISPLAY_CONFIG_H__ 23 24 #include "display.h" 25 #include "vga.h" 26 27 uint8_t framebuffer[SCREEN_SIZE]; 28 29 display_config_t display_config = { 30 31 /* Set the reserved memory as the framebuffer. */ 32 33 .framebuffer = framebuffer, 34 .screen_start = framebuffer, 35 .screen_limit = framebuffer + SCREEN_SIZE, 36 37 /* Define screen dimensions and properties. */ 38 39 .screen_size = SCREEN_SIZE, 40 .line_length = LINE_LENGTH, 41 .line_count = LINE_COUNT, 42 .line_multiplier = LINE_MULTIPLIER, 43 .cell_size = CELL_SIZE, 44 .transfer_cell_size = TRANSFER_CELL_SIZE, 45 46 /* Define display region properties. */ 47 48 .hfreq_limit = HFREQ_LIMIT, 49 .hsync_start = HSYNC_START, 50 .hsync_end = HSYNC_END, 51 .visible_start = VISIBLE_START, 52 .vfp_start = VFP_START, 53 .vsync_start = VSYNC_START, 54 .vsync_end = VSYNC_END, 55 56 }; 57 58 #endif /* __DISPLAY_CONFIG_H__ */