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