Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1015:4ef0511c6665 | 1016:0dd92e9b70a2 |
|---|---|
| 37 typedef struct { | 37 typedef struct { |
| 38 const uint8_t *data; | 38 const uint8_t *data; |
| 39 uint16_t width; | 39 uint16_t width; |
| 40 uint16_t height; | 40 uint16_t height; |
| 41 } tImage; | 41 } tImage; |
| 42 typedef struct { | |
| 43 uint8_t *data; | |
| 44 const uint8_t *dataComp; | |
| 45 uint16_t sizeComp; | |
| 46 uint16_t width; | |
| 47 uint16_t height; | |
| 48 } tImageComp; | |
| 42 | 49 |
| 43 typedef struct { | 50 typedef struct { |
| 44 long int code; | 51 long int code; |
| 45 const tImage *image; | 52 const tImage *image; |
| 46 } tChar; | 53 } tChar; |
| 54 | |
| 55 typedef struct { | |
| 56 long int code; | |
| 57 const tImageComp *image; | |
| 58 } tCharComp; | |
| 59 | |
| 47 | 60 |
| 48 typedef struct { | 61 typedef struct { |
| 49 uint32_t length; | 62 uint32_t length; |
| 50 const tChar *chars; | 63 const tChar *chars; |
| 51 uint8_t spacesize; | 64 uint8_t spacesize; |
| 52 uint8_t spacesize2Monospaced; | 65 uint8_t spacesize2Monospaced; |
| 53 uint8_t height; | 66 uint8_t height; |
| 54 } tFont; | 67 } tFont; |
| 68 | |
| 69 typedef struct { | |
| 70 uint32_t length; | |
| 71 const tCharComp *chars; | |
| 72 uint8_t spacesize; | |
| 73 uint8_t spacesize2Monospaced; | |
| 74 uint8_t height; | |
| 75 } tFontComp; | |
| 76 | |
| 55 | 77 |
| 56 typedef struct { | 78 typedef struct { |
| 57 uint32_t x; | 79 uint32_t x; |
| 58 uint32_t y; | 80 uint32_t y; |
| 59 } point_t; | 81 } point_t; |
