annotate FontPack/base_upperRegion.c @ 16:11f56f208b92

... FontPack CPU1 project
author jdg@air
date Tue, 26 Dec 2017 18:22:49 +0100
parents
children 58007c7b5499
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
1 /**
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
2 ******************************************************************************
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
3 * @copyright heinrichs weikamp
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
4 * @file base_upperRegion.c
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
5 * @author heinrichs/weikamp, Christian Weikamp
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
6 * @date 31-August-2015
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
7 * @version V0.0.3
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
8 * @since 03-Dez-2016
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
9 * @brief The beginning of it all. main() is part of this.
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
10 * @bug
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
11 * @warning
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
12 @verbatim
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
13 ==============================================================================
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
14 ##### New characters in fonts #####
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
15 ==============================================================================
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
16 [..] Use font_tmore.c and add line to corresponding font like font_t54c
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
17 Don't forget to adjust the length of the font in the last line starting
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
18 const tFont .....
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
19
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
20 [..] last char vor der großen Lücke, Stand 160217
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
21 image_data_FontT24_0x002b[364]
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
22 __attribute__((at( START_T24_FONT + (1647 * 28) ))), START_T24_FONT (0x08142F00 - MINUS_BANK)
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
23
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
24 -> frei ab 0x0814E490
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
25 geht dann weiter mit image_data_ostc_fuer_Tauchcomputer_240px
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
26 sind ca. 120 kByte frei!
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
27
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
28 @endverbatim
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
29 ******************************************************************************
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
30 * @attention
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
31 *
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
32 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
33 *
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
34 ******************************************************************************
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
35 */
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
36
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
37 /* Includes ------------------------------------------------------------------*/
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
38 #include "stdio.h"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
39 #include <string.h> // for memcopy
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
40
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
41 #include "stm32f4xx_hal.h"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
42 #include "gfx_engine.h"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
43
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
44 /* HINT chsw 160114
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
45 * using Jef Driesen dctool.exe I found out that from 150K to 230K there is only '0's!!!
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
46 */
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
47
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
48 #define VARIABLE_UPPER_REGION
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
49 //#define FIXED_UPPER_REGION
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
50
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
51 #ifdef VARIABLE_UPPER_REGION
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
52 //static const uint8_t image_data_HelloWorld[] __attribute__((at(0x08132000 ))) = "Hello World ";
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
53
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
54 typedef struct
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
55 {
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
56 uint8_t versionFirst;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
57 uint8_t versionSecond;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
58 uint8_t versionNOTUSED;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
59 uint8_t versionBeta;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
60 uint8_t signature[4];
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
61 uint8_t release_year;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
62 uint8_t release_month;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
63 uint8_t release_day;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
64 uint8_t release_sub;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
65 char release_info[48];
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
66 char dummy[4];
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
67 } SHelloWorldData;
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
68
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
69 static const SHelloWorldData FirmwareData __attribute__((at(0x08132000))) = {
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
70
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
71 .versionFirst = 0,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
72 .versionSecond = 9,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
73 .versionNOTUSED = 0,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
74 .versionBeta = 0,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
75
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
76 /* 4 bytes with trailing 0 */
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
77 .signature = "cw",
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
78
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
79 .release_year = 16,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
80 .release_month = 1,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
81 .release_day = 13,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
82 .release_sub = 0,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
83
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
84 /* max 48 with trailing 0 */
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
85 //release_info ="12345678901234567890123456789012345678901"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
86 .release_info ="",
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
87
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
88 /* for safety reasons and coming functions */
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
89 .dummy[0] = 0,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
90 .dummy[1] = 0,
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
91 .dummy[2] = 0xF0, /* the magic byte for fonts*/
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
92 .dummy[3] = 0xFF
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
93 };
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
94 static const uint8_t image_data_end_of_header[] __attribute__((at(0x0813217e - 5 ))) = "chsw";
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
95
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
96
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
97 // at the moment 09. Sept. 2015, font_T144_plus is the first code starting at 0x0813217e
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
98 #include "font_T144_plus.c" // 0x0813217e, max. 69 kB
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
99 #include "font_T24.c" // 0x08142F00 max. 47 kB
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
100 // grosse Lücke von 120 kB
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
101 #include "image_ostc.c" // 0x0816BAD2
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
102 #include "font_T84.c" // 0x08170000
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
103 #include "font_T54.c" // 0x081762EE
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
104 #include "font_T105.c" // 0x0817bd00
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
105 // der letzte Font ist T42, dahinter ist Platz von 0x081aa5a0 (Stand 151214) bis 0x081DFFFF
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
106 #include "font_T42.c" // 0x0818f9c0
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
107 // starts at BASE_TMORE = 0x081aa5a0, defined in fontT_config.h
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
108 #include "font_Tmore.c" // 0x081aa5a0
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
109
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
110
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
111 // im regulären unteren Speicher
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
112 // for checked / unchecked only at the moment
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
113 //#include "font_awe48.c"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
114 //#include "battery2_complete.c"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
115 #endif
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
116
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
117 // starts at 0x081E0000
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
118 #ifdef FIXED_UPPER_REGION
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
119 #include "font_T48_plus.c"
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
120 #include "image_heinrichs_weikamp.c" /* with no fixed region color lookup table */
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
121 #endif
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
122
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
123
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
124 int main(void) //__attribute__((at(0x08000000)))
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
125 {
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
126 }
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
127
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
128
11f56f208b92 ... FontPack CPU1 project
jdg@air
parents:
diff changeset
129 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/