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