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 /* Define DMA channels if not indicated in the build configuration. */ 28 29 /* CPU-based transfers: no channels. */ 30 31 #ifdef TRANSFER_CPU 32 #define LINE_CHANNELS 0 33 34 /* DMA-based transfers: single channel by default. */ 35 36 #else 37 38 #ifndef LINE_CHANNELS 39 #define LINE_CHANNELS 1 40 #endif 41 42 #endif 43 44 /* Define a structure containing the display parameters. */ 45 46 display_config_t display_config = { 47 48 /* Define display properties. */ 49 50 .scanlines = SCANLINES, 51 .line_channels = LINE_CHANNELS, 52 .cell_size = CELL_SIZE, 53 .transfer_cell_size = TRANSFER_CELL_SIZE, 54 55 /* Define display region properties. */ 56 57 .hfreq_limit = HFREQ_LIMIT, 58 .hsync_start = HSYNC_START, 59 .hsync_end = HSYNC_END, 60 .visible_start = VISIBLE_START, 61 .vfp_start = VFP_START, 62 .vsync_start = VSYNC_START, 63 .vsync_end = VSYNC_END, 64 65 }; 66 67 #endif /* __DISPLAY_CONFIG_H__ */