Mercurial > public > ostc4
annotate Discovery/Inc/gfx_fonts.h @ 780:e40790a67165
Discovery<=>SmallCPU inferface update:
The sensor data struct is extended to store the data of up to three (three visible O2 sensors). To avoid unnecessary payload on the SPI only the last update sensor data item is transfered. The sender receiver uses the sensor ID which is provided in parallel to identify the correct storage location.
author | Ideenmodellierer |
---|---|
date | Tue, 23 May 2023 21:50:19 +0200 |
parents | 3508e6dc4f22 |
children | bc6c90e20d9e |
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 | |
567 | 64 extern const tFont FontT84Spaced; |
65 | |
66 extern const tFont FontT54Extra; | |
67 extern const tFont FontT84Extra; | |
68 extern const tFont FontT105Extra; | |
38 | 69 extern const tFont Batt24; |
70 | |
71 extern const tImage ImgHWcolor; | |
72 extern const tImage ImgOSTC; | |
73 | |
74 extern const uint32_t indexHWcolor[indexHWcolorSIZE]; | |
75 | |
76 // Macro to store in UPPER rom font sections | |
44
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
77 /* 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
|
78 /* As well as the image data => to be confirmed */ |
74 | 79 #define UPPER_FONT_DIRECTORY __attribute__ (( used, section(".upper_font_directory") )) |
569 | 80 #define LOWER_FONT_DIRECTORY __attribute__ (( used, section(".lower_font_directory") )) /* store new fonts within firmware image to avoid fontlib update */ |
44
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
81 |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
82 #define UPPER_IMAGE_DIRECTORY __attribute__(( section(".lower_image_directory") )) |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
83 #define UPPER_IMAGES __attribute__(( section(".lower_images") )) |
38 | 84 |
85 #endif // GFX_FONTS_H |