diff Discovery/Inc/gfx.h @ 1016:0dd92e9b70a2 BootloaderOstc5

Bootloader use compressed fonts: The previous Bootloader was larger than 128k => not fitting into the first sectors of the second flash bank. Most memory is occupied by the two fonts in use. In order to make the bootloader small enough for the bootloader update function the fonts need to be compressed. To avoid code changes in visualization functions the compressed fonts are decompressed into RAM and then used in the same way as before.
author Ideenmodellierer
date Wed, 28 May 2025 17:20:44 +0200
parents 5f11787b4f42
children
line wrap: on
line diff
--- a/Discovery/Inc/gfx.h	Tue May 06 21:56:03 2025 +0200
+++ b/Discovery/Inc/gfx.h	Wed May 28 17:20:44 2025 +0200
@@ -39,6 +39,13 @@
 		 uint16_t width;
 		 uint16_t height;
 		 } tImage;
+typedef struct {
+		 uint8_t *data;
+		 const uint8_t *dataComp;
+		 uint16_t sizeComp;
+ 		 uint16_t width;
+ 		 uint16_t height;
+ 		 } tImageComp;
 
 typedef struct {
 		 long int code;
@@ -46,6 +53,12 @@
 		 } tChar;
 
 typedef struct {
+		long int code;
+		const tImageComp *image;
+		} tCharComp;
+
+
+typedef struct {
 		 uint32_t length;
 		 const tChar *chars;
 		 uint8_t spacesize;
@@ -54,6 +67,15 @@
 		 } tFont;
 
 typedef struct {
+ 		 uint32_t length;
+ 		 const tCharComp *chars;
+ 		 uint8_t spacesize;
+ 		 uint8_t spacesize2Monospaced;
+ 		 uint8_t height;
+ 		 } tFontComp;
+
+
+typedef struct {
 		uint32_t x;
 		uint32_t y;
 } point_t;