Mercurial > public > ostc4
annotate Discovery/Inc/gfx_fonts.h @ 85:923c4566a2a1 kittz
increased interCPU baudrate, cpu2: i2c in SPI1 IRQ
author | Dmitry Romanov <kitt@bk.ru> |
---|---|
date | Wed, 21 Nov 2018 12:49:54 +0300 |
parents | f2d98ad6f1be |
children | 1c95f811967c |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Inc/gfx_fonts.h | |
5 /// \brief Header file to control placement of font in STM32 Flash | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 14-Aug-2014 | |
8 /// | |
9 /// $Id$ | |
10 /////////////////////////////////////////////////////////////////////////////// | |
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
12 /// | |
13 /// This program is free software: you can redistribute it and/or modify | |
14 /// it under the terms of the GNU General Public License as published by | |
15 /// the Free Software Foundation, either version 3 of the License, or | |
16 /// (at your option) any later version. | |
17 /// | |
18 /// This program is distributed in the hope that it will be useful, | |
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 /// GNU General Public License for more details. | |
22 /// | |
23 /// You should have received a copy of the GNU General Public License | |
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
25 ////////////////////////////////////////////////////////////////////////////// | |
26 | |
27 /* Define to prevent recursive inclusion -------------------------------------*/ | |
28 #ifndef GFX_FONTS_H | |
29 #define GFX_FONTS_H | |
30 | |
31 #include "gfx.h" | |
32 | |
33 // From image_heinrichs_weikamp.c | |
34 enum { indexHWcolorSIZE = 256 }; | |
35 | |
36 // Forward declarations | |
37 // | |
38 // 2018-01-01 jDG: | |
39 // - the exact address is fixed in linker script CPU1-F429.ld, | |
40 // so that every font can be used even when not included in the actual | |
41 // binary (boot-loader, fonts, or firmware). | |
42 // | |
43 // - Actual font data is defined by the OSTC4/FontPack project, that shall | |
44 // be loaded before the firmware is executed. | |
45 // | |
46 // - Font directory starts at address 0x081E0000. Each header is 12 bytes. | |
47 // A 0xFFFFFFFF (32 bits) marks the directory's end. | |
48 // It is stored between __font_directory and __font_directory_end; | |
49 // | |
50 // - Font data (chars) is stored after 0x08132040 (end of font's SFirmareData). | |
51 // So there is space for 0x081E0000 - 0x08132040 = ADFC0 = 694 KB of fonts. | |
52 // Actual data is stored between __upper_font_data and __upper_font_data_end, | |
53 // and uses 0x081b9a3a - 0x08132040 = 879FA = 542 KB. | |
54 // | |
55 extern const tFont Awe48; | |
56 extern const tFont FontT24; | |
57 extern const tFont FontT42; | |
58 extern const tFont FontT48; | |
59 extern const tFont FontT54; | |
60 extern const tFont FontT84; | |
61 extern const tFont FontT105; | |
62 extern const tFont FontT144; | |
63 | |
64 extern const tFont Batt24; | |
65 | |
66 extern const tImage ImgHWcolor; | |
67 extern const tImage ImgOSTC; | |
68 | |
69 extern const uint32_t indexHWcolor[indexHWcolorSIZE]; | |
70 | |
71 // Macro to store in UPPER rom font sections | |
44
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
72 /* TODO: Looking at older map files the directories should be placed within the firmware memory */ |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
73 /* As well as the image data => to be confirmed */ |
74 | 74 #define UPPER_FONT_DIRECTORY __attribute__ (( used, section(".upper_font_directory") )) |
44
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
75 |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
76 #define UPPER_IMAGE_DIRECTORY __attribute__(( section(".lower_image_directory") )) |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
77 #define UPPER_IMAGES __attribute__(( section(".lower_images") )) |
38 | 78 |
79 #endif // GFX_FONTS_H |