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@49 | 25 | |
paul@49 | 26 | uint8_t framebuffer[SCREEN_SIZE]; |
paul@49 | 27 | |
paul@49 | 28 | display_config_t display_config = { |
paul@50 | 29 | |
paul@50 | 30 | /* Set the reserved memory as the framebuffer. */ |
paul@50 | 31 | |
paul@49 | 32 | .framebuffer = framebuffer, |
paul@50 | 33 | .screen_start = framebuffer, |
paul@50 | 34 | .screen_limit = framebuffer + SCREEN_SIZE, |
paul@50 | 35 | |
paul@50 | 36 | /* Define screen dimensions and properties. */ |
paul@50 | 37 | |
paul@49 | 38 | .screen_size = SCREEN_SIZE, |
paul@49 | 39 | .line_length = LINE_LENGTH, |
paul@49 | 40 | .line_count = LINE_COUNT, |
paul@49 | 41 | .line_multiplier = LINE_MULTIPLIER, |
paul@49 | 42 | .cell_size = CELL_SIZE, |
paul@50 | 43 | |
paul@50 | 44 | /* Define display region properties. */ |
paul@50 | 45 | |
paul@53 | 46 | .hfreq_limit = HFREQ_LIMIT, |
paul@53 | 47 | .hsync_start = HSYNC_START, |
paul@53 | 48 | .hsync_end = HSYNC_END, |
paul@50 | 49 | .visible_start = VISIBLE_START, |
paul@50 | 50 | .vfp_start = VFP_START, |
paul@50 | 51 | .vsync_start = VSYNC_START, |
paul@50 | 52 | .vsync_end = VSYNC_END, |
paul@50 | 53 | |
paul@49 | 54 | }; |
paul@49 | 55 | |
paul@50 | 56 | #endif /* __DISPLAY_CONFIG_H__ */ |