├── .gitattributes ├── 3B-DIRECT ├── direct.jpg └── README.md ├── 3A-TOUCHGFX ├── TouchGFX.jpg └── README.md ├── 1-HOWTO ├── z_displ_ST7735_test.h ├── fonts.h ├── README.md ├── z_displ_ST7735.h ├── z_displ_ST7735_test.c ├── font8.c ├── font12.c ├── z_displ_ST7735.c └── font16.c ├── LICENSE ├── README.md └── 2-BACKLIGHT └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /3B-DIRECT/direct.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maudeve-it/ST7735S-STM32/HEAD/3B-DIRECT/direct.jpg -------------------------------------------------------------------------------- /3A-TOUCHGFX/TouchGFX.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maudeve-it/ST7735S-STM32/HEAD/3A-TOUCHGFX/TouchGFX.jpg -------------------------------------------------------------------------------- /1-HOWTO/z_displ_ST7735_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * z_displ_ST7735_test 3 | * rel. 5 4 | * 5 | * Created on: Mar 25, 2022 6 | * Author: mauro 7 | * 8 | * This is related to the functions testing features and showing performance 9 | * you don't need this file in the production project 10 | * 11 | */ 12 | 13 | #ifndef INC_Z_DISPL_ST7735_TEST_H_ 14 | #define INC_Z_DISPL_ST7735_TEST_H_ 15 | 16 | #include 17 | #include 18 | 19 | #define min(a, b) (((a) < (b)) ? (a) : (b)) 20 | 21 | 22 | #define BGCOLOR BLACK 23 | 24 | void Displ_PerfTest(); 25 | void Displ_ColorTest(); 26 | void Displ_TestAll (); 27 | 28 | #endif /* INC_Z_DISPL_ST7735_TEST_H_ */ 29 | -------------------------------------------------------------------------------- /1-HOWTO/fonts.h: -------------------------------------------------------------------------------- 1 | #ifndef __FONTS_H__ 2 | #define __FONTS_H__ 3 | 4 | #include 5 | 6 | 7 | /* 8 | 9 | typedef struct { 10 | const uint8_t width; 11 | uint8_t height; 12 | const uint16_t *data; 13 | } FontDef; 14 | 15 | 16 | extern FontDef Font_7x10; 17 | extern FontDef Font_11x18; 18 | extern FontDef Font_16x26; 19 | 20 | */ 21 | 22 | typedef struct _tFont 23 | { 24 | const uint8_t *table; 25 | uint16_t Width; 26 | uint16_t Height; 27 | uint8_t Size; 28 | } sFONT; 29 | 30 | 31 | 32 | extern sFONT Font24; 33 | extern sFONT Font20; 34 | extern sFONT Font16; 35 | extern sFONT Font12; 36 | extern sFONT Font8; 37 | 38 | 39 | 40 | 41 | #endif // __FONTS_H__ 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Mauro De Vecchi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Now library is TouchGFX compatible - Ora la libreria è compatibile con TouchGFX 2 |
3 |
4 | 5 | _**Piu' sotto, al termine della lingua inglese trovi il testo in italiano. **_ 6 | _**Below English text you'll find the Italian version**_ 7 | 8 |
9 |
10 | 11 | # ST7735S-STM32 12 | 13 | "ST7735S-STM32" repository contains the source code for a set of functions for an STM32 microcontroller handling a 1.8 inch color LCD display based on the ST7735S SPI driver.
14 | Library allows to handle the display using either TouchGFX or directly drawing on screen through library functions. 15 | 16 | Developed software is based on HAL over STM32CubeIDE.
17 | 18 | |Software has been tested over:|| 19 | |---|---| 20 | |STM32F411CE (Weact Studio board)|https://github.com/WeActTC/MiniSTM32F4x1| 21 | |STM32G432KB (Nucleo32 STM board)|https://www.st.com/en/evaluation-tools/nucleo-g431kb.html| 22 | |STM32G071RB (Nucleo64 STM board)|https://www.st.com/en/evaluation-tools/nucleo-g071rb.html| 23 | 24 | |Display used|| 25 | |---|---| 26 | |Display 1.8 inch TFT-LCD 128x160|[AliExpress](https://www.aliexpress.com/item/1005003738191499.html)| 27 | ||[Amazon](https://www.amazon.it/dp/B078J5TS2G)| 28 | 29 | --- 30 | 31 | ## Project Folders 32 | 33 | (I suggest you to follow this reading order) 34 | - ["How to" create CubeIDE project using this software (source folder)](./1-HOWTO) 35 | - ["How to" handle display backlight](./2-BACKLIGHT) 36 | - [(Direct handling) "How to" add this library to the created project](./3B-DIRECT) 37 | - [(TouchGFX) "How to" add this library to the created project](./3A-TOUCHGFX) 38 | 39 | Youtube video showing TouchGFX integration characteristics and performance: https://youtu.be/g1siKaPox88
40 | Youtube video showing library characteristics and performance: https://youtu.be/oWx1-WmTwag
41 | 42 | 43 | --- 44 | > Please Note: 45 | > The software, schemes and PCB designs in this set of repositories are provided just for 46 | > illustrative purposes, sharing the personal experience on this project. 47 | > The software and design artifacts are provided as-is without any mantainence and without 48 | > warranty of any kind. There is no guarantee of fitness for any particular application, 49 | > and no guarantee of completeness and correctness. 50 | > By downloading and using these materials the user accepts all risks associated with the 51 | > run of the software and construction and use of the circuits and devices described.
52 | > Fonts licence: fonts are provided by STMicroelectronics. Licencing inside the fonts ".c" files. 53 | --- 54 | 55 | ## NOTES 56 |
57 |
58 | 59 | --- 60 | 61 |
62 |
63 | 64 | # ST7735S-STM32 65 | 66 | La repository "ST7735S-STM32" contiene il codice relativi ad un set di funzioni per STM32 per la gestione di un display LCD a colori da 1,8 pollici controllato dal driver SPI ST7735S. 67 | La libreria di funzioni permette di gestire il display in un progetto basato si TouchGFX oppure scrivendo direttamente sul display tramite le funzioni disponibili. 68 | 69 | Il software sviluppato si basa su HAL attraverso STM32CubeIDE. 70 | 71 | |Il software è stato testato su|| 72 | |---|---| 73 | |STM32F411CE (scheda Weact Studio)|https://github.com/WeActTC/MiniSTM32F4x1| 74 | |STM32G432KB (scheda STM Nucleo32)|https://www.st.com/en/evaluation-tools/nucleo-g431kb.html| 75 | |STM32G071RB (scheda STM Nucleo64)|https://www.st.com/en/evaluation-tools/nucleo-g071rb.html| 76 | 77 | |Il display utilizzato è:|| 78 | |---|---| 79 | |Display 1.8 inch TFT-LCD 128x160|[AliExpress](https://www.aliexpress.com/item/1005003738191499.html)| 80 | ||[Amazon](https://www.amazon.it/dp/B078J5TS2G)| 81 | 82 | --- 83 | 84 | ## Cartelle del progetto 85 | 86 | - [Guida per creare un progetto CubeIDE per usare questa libreria (il codice è qui)](./1-HOWTO) 87 | - [Guida alla gestione della retroilluminazione](./2-BACKLIGHT) 88 | - [(gestione diretta) Guida per aggiungere la libreria al progetto creato](./3B-DIRECT) 89 | - [(TouchGFX) Guida per aggiungere la libreria al progetto creato](./3A-TOUCHGFX) 90 | 91 | Video Youtube con le carateristiche e le prestazioni dell'integrazione TouchGFX: https://youtu.be/g1siKaPox88
92 | Video Youtube con le carateristiche e le prestazioni dellla libreria: https://youtu.be/oWx1-WmTwag
93 | 94 | --- 95 | > Il software e gli schemi di progetto come i layout PCB in questa serie di repository 96 | > sono messe a disposizione con puro intento illustrativo e di condivisione dell'esperienza fatta 97 | > Il software and gli elementi del progetto sono messi a disposizione "allo stato in cui sono" 98 | > senza impegno di manutenzione e senza garanzie di alcun tipo. Piu' esplicitamente, non c'e' garanzia di 99 | > adeguatezza a soddisfare specifiche esigenze, ne di completezza o correttezza di alcuna parte. 100 | > Scaricando ed utilizzando questo materiale l'utilizzatore accetta il rischio associato alla 101 | > realizzazione ed all'utilizzo del circuito, del software e dei componenti descritti in questi file.
102 | La serie di font usata è fornita da STMicroelectronics. Licenza d'uso all'interno dei file ".c" dei font. 103 | 104 | --- 105 | 106 | ## NOTE 107 |
108 |
109 | --- 110 | 111 | 112 | -------------------------------------------------------------------------------- /1-HOWTO/README.md: -------------------------------------------------------------------------------- 1 | _**Piu' sotto, al termine della lingua inglese trovi il testo in italiano. **_ 2 | _**Below English text you'll find the Italian version**_ 3 | 4 |
5 |
6 | 7 | # HOW TO setup a project with this software 8 | 9 | 10 | ## CubeMX setup 11 | - create a new project on STM32CubeIDE 12 | - enable an SPI port. 13 | 14 | SPI configuration is: 15 | 16 | |Mode|Value| 17 | |---|---| 18 | |mode|Half-Duplex Master| 19 | |NSS|Hardware NSS Output Signal| 20 | |(as per ST7735 datasheet) Baud Rate|<= 15 MBit/s| 21 | 22 | |Parameter|Value| 23 | |---|---| 24 | |Frame format|Motorola| 25 | |Data size|8 bit| 26 | |First bit|MSB first| 27 | |CPOL|low| 28 | |CPHA|1 Edge| 29 | |CRC calculation|disabled| 30 | |NSS type|Output Hw| 31 | 32 | If you use SPI in "polling mode", do not enable Interrupt and DMA and not consider the below table: go over
33 | If you use SPI in "interrupt mode", do not enable DMA and consider only the NVIC information in the below table
34 | If you use SPI in "DMA mode", enable both Interrupt and DMA following the below table 35 | 36 | |SPI config label|Value| 37 | |---|---| 38 | |DMA settings|enable only TX DMA| 39 | |NVIC settings|enable SPI global interrupt| 40 | 41 |
42 | 43 | - assign these names to SPI pins: 44 | 45 | |SPI pin|Pinname to assign|Speed relevance| 46 | |---|---|---| 47 | |NSS|DISPL_CS|X| 48 | |MOSI|DISPL_MOSI|X| 49 | |SCK|DISPL_SCK|X| 50 | 51 | "Speed relevance" (here above and below):
52 | "X" means that pin speed affects the defined SPI boudrate handling: rise (step by step from LOW to VERY HIGH) pins speed if you see uC cannot handle the defined communication speed (more information on your uC datasheet).
53 | As per [GPIO software guidelines](https://www.st.com/resource/en/application_note/an4899-stm32-microcontroller-gpio-hardware-settings-and-lowpower-consumption-stmicroelectronics.pdf), STM suggests keeping the lower GPIO speed allowing your project handling, reducing power consumption and EMI.
54 | 55 | 56 | - Enable 3 more pins as GPIO_Output: 57 | 58 | |Pinname to assign|Output level|Speed relevance|Mode|Pull-up/down| 59 | |---|---|---|---|---| 60 | |DISPL_LED|low|-|see [here](../2-BACKLIGHT)|No pull-up/down| 61 | |DISPL_DC|-|X|Output push pull|No pull-up/down| 62 | |DISPL_RST|low|-|Output push pull|No pull-up/down| 63 | 64 | 65 | ## Source and header files 66 | 67 | - Copy the .c files into the /Core/Src folder in your STM32CubeIDE project 68 | - Copy the .h files into the /Core/Inc folder in your STM32CubeIDE project 69 | - into the /Core/Inc folder, open the main.h file and add an include directive for every .h file copied. In this order:
70 |
71 | 72 | ```sh 73 | (main.h) 74 | ... 75 | /* Private includes ----------------------------------------------------------*/ 76 | /* USER CODE BEGIN Includes */ 77 | #include "fonts.h" 78 | #include "z_displ_ST7735.h" 79 | #include "z_displ_ST7735_test.h" 80 | /* USER CODE END Includes */ 81 | ... 82 | ``` 83 |
84 | 85 | _**PLEASE NOTE**_: 86 | in a "TouchGFX" project, you need only "z_displ_ST7735.h" and "z_displ_ST7735.c"
87 | In a "Direct handling" project, you need "z_displ_ST7735_test" files (.c and .h) only if you want to use graphics test/demo functions. You don't need to add them in the production project.
88 |
89 |
90 | 91 | 92 | ## Next steps 93 | - ["How to" handle display backlight](../2-BACKLIGHT) 94 | - for Direct Handling projects: [(Direct handling) "How to" add this library to the created project](../3B-DIRECT) 95 | - for TouchGFX projects: [(TouchGFX) "How to" add this library to the created project](../3A-TOUCHGFX) 96 | 97 |
98 |
99 | 100 | --- 101 | # HOW TO: come configurare un progetto con questo software 102 |
103 | 104 | 105 | ## Configurazione CubeMX 106 | - crea un nuovo progetto su STM32CubeIDE 107 | - attiva una porta SPI con questa configurazione: 108 | 109 | |Parametro|Valore| 110 | |---|---| 111 | |mode|Half-Duplex Master| 112 | |NSS|Hardware NSS Output Signal| 113 | |(come da datasheet del driver ST7735) Baud Rate|<= 15 MBit/s| 114 | 115 | |Parametro|Valore| 116 | |---|---| 117 | |Frame format|Motorola| 118 | |Data size|8 bit| 119 | |First bit|MSB first| 120 | |CPOL|low| 121 | |CPHA|Edge| 122 | |CRC calculation|disabled| 123 | |NSS type|Output Hw| 124 | 125 | Se usi SPI in "polling mode" non attivare Interrupt e DMA sulla SPI e non considerare la tabella sotto: procedi oltre
126 | Se usi SPI in "interrupt mode" non attivare DMA e considera solo NVIC settings nella tabella sotto
127 | Se usi SPI in "DMA mode" abilita sia Interrupt sia DMA e segui la tabella sotto 128 | 129 | |Etichetta SPI|Valore| 130 | |---|---| 131 | |DMA settings|attiva solo TX DMA| 132 | |NVIC settings|attiva SPI global interrupt| 133 | 134 | - assegnare questi nomi ai pin SPI: 135 | 136 | |Pin SPI|Nome da assegnare|Rilevanza velocità| 137 | |---|---|---| 138 | |NSS|DISPL_CS|X| 139 | |MOSI|DISPL_MOSI|X| 140 | |SCK|DISPL_SCK|X| 141 | 142 | "Rilevanza velocità" (qui sopra e sotto): "X" significa che la velocità del pin ha effetti sulla velocità della porta SPI: aumenta (per gradi da LOW to VERY HIGH) la velocità dei pin se vedi che il uC non riesce a gestire la velocità di comunicazione assegnata (maggiori informazioni sul datasheet del tuo uC).
143 | Come indicato in ["GPIO software guidelines"](https://www.st.com/resource/en/application_note/an4899-stm32-microcontroller-gpio-hardware-settings-and-lowpower-consumption-stmicroelectronics.pdf), STM suggerisce di mantenere la minore velocità GPIO che permette la gestione del tuo progetto, ciò per ridurre consumi ed EMI. 144 | 145 | - attivare altri 3 pin come GPIO_Output: 146 | 147 | |Nome da assegnare|Output level|Rilevanza velocità|Mode|Pull-up/down| 148 | |---|---|---|---|---| 149 | |DISPL_LED|low|-|see [here](../2-BACKLIGHT)|No pull-up/down| 150 | |DISPL_DC|-|X|Output push pull|No pull-up/down| 151 | |DISPL_RST|low|-|Output push pull|No pull-up/down| 152 | 153 | 154 | ## File sorgente e di testata 155 | 156 | - Copia i file .c nella cartella /Core/Src del progetto STM32CubeIDE 157 | - Copia i file .h nella cartella /Core/Inc del progetto STM32CubeIDE 158 | - Nella cartella /Core/Inc, apri il file main.h e aggiungi la direttiva include (nella sezione "USER CODE BEGIN Includes") per ogni file .h copiato, seguendo questo ordine: 159 | 160 |
161 | 162 | ```sh 163 | (main.h) 164 | ... 165 | /* Private includes ----------------------------------------------------------*/ 166 | /* USER CODE BEGIN Includes */ 167 | #include "fonts.h" 168 | #include "z_displ_ST7735.h" 169 | #include "z_displ_ST7735_test.h" 170 | /* USER CODE END Includes */ 171 | ... 172 | ``` 173 |
174 | 175 | 176 | _**NOTA BENE:**_ 177 | In un progetto "TouchGFX" ti servono solo "z_displ_ST7735.h" and "z_displ_ST7735.c"
178 | In un progetto "a gestione diretta", i file "z_displ_ST7735_test" (.c e .h) devono essere copiati nel progetto solo se vuoi usare le funzioni di demo e test. Non occorrono questi file nella versione definitiva del progetto. 179 | 180 | 181 | 182 | ## Prossimi passi 183 | - [Guida alla gestione della retroilluminazione](../2-BACKLIGHT) 184 | - per progetti con Gestione Diretta: [(gestione diretta) Guida per aggiungere la libreria al progetto creato](../3B-DIRECT) 185 | - per progetti TouchGFX: [(TouchGFX) Guida per aggiungere la libreria al progetto creato](../3A-TOUCHGFX) 186 | -------------------------------------------------------------------------------- /3B-DIRECT/README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Direct Handling](./direct.jpg) 3 | 4 | 5 | 6 | _**Piu' sotto, al termine della lingua inglese trovi il testo in italiano. **_ 7 | _**Below English text you'll find the Italian version**_ 8 | 9 |
10 | 11 | 12 | ## So... 13 | 14 | Now that you have created a new CubeIDE project as per these instructions: 15 | 16 | - ["How to" create a CubeIDE project for this library](../1-HOWTO) 17 | 18 | Now that you have chosen the backlight handling mode and set it as per these instructions: 19 | 20 | - ["How to" handle display backlight](../2-BACKLIGHT) 21 | 22 | 23 | You finally can setup the last program parameters and run it!
24 | Follow the below instructions if you like directly handling the display through the graphics functions in the library. 25 | Otherwise, if you want to use the STM TouchGFX package, do not proceed here and go to [(TouchGFX) "How to" add this library to the created project](../3A-TOUCHGFX) 26 | 27 | 28 | ##### Parameters setup 29 | Your project is almost ready. You must "tune" the software parameters into "z_displ_ST7735.h": 30 | - section 0 - TouchGFX parameter: ok, if you are here reading, it means you have to add a comment to parameter in section 0, disabling TouchGFX handling 31 | - section 1 - Port Parameters: here you have to set two macro constant with the SPI port name connecting display 32 | - section 2 - SPI communication mode: uncomment the macro definition related to enabled communication mode (Polling mode, Interrupt mode or DMA mode). You must uncomment no less and no more than ONE definition here 33 | - section 3 - Backlight Mode: see [BACKLIGHT page](../2-BACKLIGHT) 34 | - section 4 - Buffer size: define the "Buffer Level" you like (assign a value between 10 and 16 included) see [youtube video](https://youtu.be/oWx1-WmTwag) for information and analysis. 35 | - section 5 - Display size: despite the ST7735 SPI driver can handle displays of any size and color modes, this library was tested only on a 128x160 display running in RBG565. 36 | 37 | 38 | ##### main.c setup 39 | 40 | in main.c you now need to initialize display before entering in the main loop, this way:
41 |
42 | (main.c) 43 | ```sh 44 | ... 45 | /* USER CODE BEGIN 2 */ // "USER CODE BEGIN 2" is after all system initializations and before entering the main loop. Good place to initialize display 46 | Displ_Init(Displ_Orientat_0); // initialize the display and set the initial display orientation (here is orientaton: 0°) - THIS FUNCTION MUST PRECEED ANY OTHER DISPLAY FUNCTION CALL. 47 | Displ_CLS(BLACK); // after initialization (above) and before turning on backlight (below), you can draw the initial display appearance. (here I'm just clearing display with a black background) 48 | Displ_BackLight('I'); // initialize backlight and turn it on at init level 49 | /* USER CODE END 2 */ 50 | ... 51 | ``` 52 | 53 | ##### running test functions 54 | 55 | There is a test function you can run copying the "_test" files into the project.
56 | You can use it to:
57 | - check the correct system installation and configuration
58 | - learn how to use the library functions
59 | Test function is: Displ_PerfTest()
60 | and you can use it this way:
61 | 62 | ```sh 63 | ... 64 | /* Infinite loop */ 65 | /* USER CODE BEGIN WHILE */ 66 | while (1) // into the main loop you can add the test functions 67 | { 68 | Displ_PerfTest(); // shows display graphics and performance 69 | ... 70 | ``` 71 | 72 | 73 | ##### using library functions in your projects 74 | 75 | passing the test, the display and the library is fully integrated in your system.
76 | Now you can use the library as per your needs:
77 | With a short look to the Displ_PerfTest() function you should find all the graphics functions you need.
78 | A short description available for every function in the source file should help usage while developing.
79 | There is not much more to say.
80 |
81 |
82 | 83 | --- 84 | 85 | ## Dunque... 86 | Ora che hai creato un nuovo progetto con CubeIDE project seguendo queste istruzioni: 87 | 88 | - [Guida per configurare un progetto con CubeIDE](./1-HOWTO) 89 | 90 | Ora che hai scelto la gestione della retroilluminazione, seguendo queste istruzioni: 91 | 92 | - [Guida alla gestione della retroilluminazione](./2-BACKLIGHT) 93 | 94 | Puoi finalmente configurare gli ultimi parametri ed eseguire il programma! 95 | Segui le istruzioni sotto se vuoi gestire direttamente il display attraverso le funzioni grafiche della libreria.
96 | Se invece vuoi usare il pacchetto STM TouchGFX, non procedere qui e passa a [(TouchGFX) Guida per aggiungere la libreria al progetto creato](./2A-TOUCHGFX) 97 | 98 | 99 | ##### Configurazione Parametri 100 | Il progetto è quasi pronto. Devi mettere a punti i parametri nel file "z_displ_ST7735.h": 101 | - sezione 0 - TouchGFX: se stai leggendo qui devi commentare la macro nella sezione 0, disabilitando la gestione TouchGFX 102 | - sezione 1 - Port Parameters: qui devi impostare due costanti macro con il nome della porta SPI a cui è connesso il display 103 | - section 2 - SPI communication mode: togli il commento alla definizione definition relativa al tipo di comunicazione attivato (Polling moode, Interrupt mode o DMA mode). Devi togliere il commento ad una riga (NON di più e NON di meno) 104 | - section 3 - Backlight Mode: vedi la [pagina BACKLIGHT](../2-BACKLIGHT) 105 | - section 4 - Dimensione del Buffer: imposta il "Buffer Level" che preferisci (assegna un valore tra 10 e 16 inclusi) vedi [il video youtube]([../BACKLIGHT](https://youtu.be/oWx1-WmTwag) per informazioni ed analisi. 106 | - section 5 - Dimensione Display: anche se il driver SPI ST7735 può gestire display di dimensioni diverse, questa libreria è stata testata solo su un display di 128x160 pixel in modalità RBG565. 107 | 108 | 109 | ##### impostazione di main.c 110 | 111 | in main.c ora devi inizializzare il display prima di entrare nel main loop, in questo modo: 112 | 113 | (main.c) 114 | ```sh 115 | ... 116 | /* USER CODE BEGIN 2 */ // "USER CODE BEGIN 2" viene dopo tutte le inizializzazioni del sistema e prima del main loop 117 | Displ_Init(Displ_Orientat_0); // inizializza il display ed imposta l'orientamento iniziale - QUESTA FUNZIONE DEVE PRECEDERE OGNI ALTRA FUNZIONE DELLA LIBRERIA 118 | Displ_CLS(BLACK); // dopo l'inizializzazione (sopra) e prima di accendere la retroilluminazione (sotto), puoi impostare la schermata iniziale. (qui semplicemente cancello lo schermo con uno sfondo nero) 119 | Displ_BackLight('I'); // inizializza la retroilluminazione e la accende al livello init 120 | /* USER CODE END 2 */ 121 | ... 122 | ``` 123 | 124 | ##### eseguire le funzioni di test 125 | 126 | C'e' una funzione di test disponibile installando i "_test" file.
127 | Puoi usarla per:
128 | - verificare la corretta installazione e configurazione del sistema
129 | - imparare come usare le funzioni della libreria
130 | La funzione é Displ_PerfTest() e puoi usarla in questo modo: 131 | ```sh 132 | ... 133 | /* Infinite loop */ 134 | /* USER CODE BEGIN WHILE */ 135 | while (1) // nel main loop puoi aggiungere le funzioni di test 136 | { 137 | // display testing 138 | Displ_PerfTest(); // mostra la grafica e le performance del display 139 | ... 140 | ``` 141 | 142 | ##### usare la libreria nei tuoi progetti 143 | 144 | Superando il test hai la prova che il display e la libreria sono pienamente integrati nel progetto.
145 | Ora puoi usare la libreria secondo le necessità: con una occhiata alla funzione Displ_PerfTest() dovresti individuare tutte le funzioni grafiche che ti occorrono.
146 | Una breve descrizione disponibile, per ogni funzione, nel file sorgente dovrebbe aiutare durante lo sviluppo.
147 | Non c'è molto altro da dire.
148 | -------------------------------------------------------------------------------- /2-BACKLIGHT/README.md: -------------------------------------------------------------------------------- 1 | _**Piu' sotto, al termine della lingua inglese trovi il testo in italiano. **_ 2 | _**Below English text you'll find the Italian version**_ 3 | 4 |
5 |
6 | 7 | # Handling backlight 8 | 9 | this library can handle display backlight in two different modes: 10 | - as a switched on-off light 11 | - as a dimming backlight 12 | 13 | Backlight mode is set by the macro #define "DISPLAY_DIMMER_MODE" in "z_displ_ST7735.h" file 14 | - If this #define is commented, backight is: switching on-off backlight 15 | - Uncommenting the macro #define, backlight is: dimming backlight 16 |
17 | 18 | ## ON-OFF mode Backlight 19 | ("#define DISPLAY_DIMMER_MODE" commented in "z_displ_ST7735.h" file) 20 | ### setup a handling pin on CubeMX. 21 | Define a GPIO pin with this configuration: 22 | |pinname to assign|output level|speed relevance|mode|pull-up/down| 23 | |---|---|---|---|---| 24 | |DISPL_LED|low|-|Output push pull|No pull-up/down| 25 | 26 | connect the LED pin of the display to DISPL_LED
27 |
28 | That's all. Function Displ_BackLight() provides these commands (function parameter): 29 | |parameter|description| 30 | |---|---| 31 | |'0'|display off| 32 | |'1'|display on| 33 | |'F'|display on(as same as comand '1')| 34 | |'Q'|no action| 35 | 36 | Displ_BackLight() function returns display status (0=off, 1 = on) so: command 'Q' is to query display status
37 | 38 | ## Dimming mode Backlight 39 | ("#define DISPLAY_DIMMER_MODE" uncommented in "z_displ_ST7735.h" file)
40 | Function Displ_BackLight() will handle backlight in PWM. 41 |
42 | 43 | ### setup a handling pin on CubeMX 44 | Define a PWM pin:
45 | - enable a PWM channel on a "general purpose" timer (e.g. CH1 on TIM3)
46 | - setup channel as "PWM mode 1" and "Counter mode UP"
47 | ARR register ("Auto Reload Register" or "Counter period" on CubeMX) defines the number of steps of display light. E.g.: set it to 10 to get 10 light steps available (from 1 to 10, and level 0="off")
48 | Higher is value imposed to PSC register (prescaler) and lower are power needed and EMI (see the [GPIO software guidelines](https://www.st.com/resource/en/application_note/an4899-stm32-microcontroller-gpio-hardware-settings-and-lowpower-consumption-stmicroelectronics.pdf) by STM), but PSC value must be not too high: the value ((uC clock / PSC)/ ARR) must be > 100 Hz, avoiding flickering
49 | 50 | |pinname to assign|output level|speed relevance|mode|pull-up/down| 51 | |---|---|---|---|---| 52 | |DISPL_LED|low|-|Alternate Function (Timer)|No pull-up/down| 53 | 54 | ### setup z_displ_ST7735.h 55 | align to CubeMX macro parameters:
56 | #define BKLIT_TIMER set used timer (e.g. TIM3)
57 | #define bklit_t set used timer (e.g. htim3)
58 | #define BKLIT_CHANNEL set used channel (e.g. TIM_CHANNEL_2)
59 | #define BKLIT_CCR indicate the preload register involved by PWM (e.g. CCR2)
60 |
61 | setup parameters:
62 | You could invoke function with "standby", setting backlight to this predefined value:
63 | #define BKLIT_STBY_LEVEL set standby level (between 0 and ARR)
64 | This is the backlight level set on initialization:
65 | #define BKLIT_INIT_LEVEL set startup level (between 0 and ARR)
66 |
67 | 68 | Function "Displ_BackLight" provides these commands (function parameter): 69 | |parameter|description| 70 | |---|---| 71 | |'0'|display off| 72 | |'1'|display to highest level (=ARR)| 73 | |'F'|display to highest level (as same as comand '1')| 74 | |'I'|initial display setup| 75 | |'S'|display to standby level| 76 | |'W'|display level before last standby (wakeup from standby)| 77 | |'+'|1 step level increase| 78 | |'-'|1 step level decrease| 79 | |'Q'|no action| 80 | 81 | Displ_BackLight() function returns display status (current level) so: command 'Q' is to query display status
82 | _**PLEASE NOTE:**_ 83 | if dimming, run Displ_BackLight('I') on startup! It will also start the timer clock.
84 | 85 | ## Next steps 86 | That should be enough, you should have already done this step: 87 | - ["How to" create a CubeIDE project for this library](../1-HOWTO) 88 | 89 | now you can move to these sections: 90 | - for Direct Handling projects: [(Direct handling) "How to" add this library to the created project](../3B-DIRECT) 91 | - for TouchGFX projects: [(TouchGFX) "How to" add this library to the created project](../3A-TOUCHGFX) 92 | 93 | 94 | 95 | --- 96 | 97 | 98 |
99 |
100 | 101 | # Gestire la retroilluminazione 102 | 103 | questa libreria permette di gestire la retroilluminazione del display in due modi:
104 | - con un interruttore acceso/spento
105 | - con regolazione di luminosità variabile
106 |
107 | Il modo di illuminazione è definito dalla macro define "DISPLAY_DIMMER_MODE" nel file "z_displ_ST7735.h".
108 | - Se la definizione è commentata la retroilluminazione è gestita in modalità acceso/spento
109 | - Togliendo il commento a inizio riga si abilita la gestione con illuminazione regolabile
110 |
111 | 112 | ## Modalità acceso/spento 113 | ("con la riga #define DISPLAY_DIMMER_MODE" commentata nel file "z_displ_ST7735.h") 114 | 115 | ### configura su CubeMX 116 | Definire un pin GPIO con questa configurazione: 117 | |Nome pin da assegnare|output level|rilevanza velocità|mode|pull-up/down| 118 | |---|---|---|---|---| 119 | |DISPL_LED|low|-|Output push pull|No pull-up/down| 120 | 121 | Connettere il pin LED del display a DISPL_LED
122 | Tutto qui. La funzione "Displ_BackLight" mette a disposizione i comandi (parametro passato alla funzione): 123 | |parametro|descrizione| 124 | |---|---| 125 | |'0'|spegne il display| 126 | |'1'|accende il display| 127 | |'F'|accende il display (come comando '1')| 128 | |'Q'|nessuna azione| 129 | 130 | La funzione "Displ_BackLight" restituisce sempre lo stato del display (0=spento, 1 = acceso), il comando 'Q' è usato quindi per leggere lo stato del display. 131 |
132 | 133 | ## Modalità "dimmer" 134 | ("se viene rimosso il commento a #define DISPLAY_DIMMER_MODE" nel file "z_displ_ST7735.h")
135 | la funzione "Displ_BackLight" gestisce la retroilluminazione controllata in PWM.
136 |
137 | ### configura su CubeMX 138 | un pin PWM:
139 | 140 | - attivare un canale PWM di timer "general purpose" (es. CH1 su TIM3)
141 | - il canale deve essere configurato in "PWM mode 1" e "Counter mode UP"
142 | il registro ARR ("Auto Reload Register", o "Counter period" su CubeMX) definisce il numero di livelli di luminosità del display. Es: impostare a 10 per avere 10 livelli di luminosità disponibili (da 1 a 10, piu' il livello 0="display spento")
143 | Maggiore è il valore del registro PSC (prescaler) e minori sono i consumi ed EMI (vedi le [GPIO software guidelines](https://www.st.com/resource/en/application_note/an4899-stm32-microcontroller-gpio-hardware-settings-and-lowpower-consumption-stmicroelectronics.pdf) di STM), ma il valore non deve essere troppo elevato in modo che sia ((clock uC / PSC)/ ARR) > 100 Hz per evitare problemi di flickering
144 | 145 | |Nome pin da assegnare|output level|rilevanza velocità|mode|pull-up/down| 146 | |---|---|---|---|---| 147 | |DISPL_LED|low|-|Alternate Function (Timer)|No pull-up/down| 148 | 149 | ### configura z_displ_ILI9XXX.h 150 | 151 | allineare i parametri:
152 | #define BKLIT_TIMER indicare il timer usato (es. TIM3)
153 | #define bklit_t indicare il timer usato (es. htim3)
154 | #define BKLIT_CHANNEL indicare il canale usato (es. TIM_CHANNEL_2)
155 | #define BKLIT_CCR definire il preload register coinvolto da PWM (es. CCR2)
156 |
157 | definire i parametri:
158 | #define BKLIT_STBY_LEVEL indicare il livello di standby (tra 0 ed ARR)
159 | #define BKLIT_INIT_LEVEL indicare il livello di assegnare alla accensione (tra 0 ed ARR)
160 |
161 | La funzione "Displ_BackLight" mette a disposizione i comandi (parametro passato alla funzione): 162 | |parametro|descrizione| 163 | |---|---| 164 | |'0'|spegne il display (livello 0)| 165 | |'1'|display al massimo (livello ARR)| 166 | |'F'|display al massimo (come comando '1')| 167 | |'I'|setup iniziale del display| 168 | |'S'|display al valore di standby| 169 | |'W'|display al valore precedente all'ultimo standby (risveglio da standby)| 170 | |'+'|aumenta la luminosità di 1 livello| 171 | |'-'|diminuisce la luminosità di 1 livello| 172 | |'Q'|nessuna azione| 173 | 174 | La funzione "Displ_BackLight" restituisce sempre lo stato del display (livello di luminosità), il comando 'Q' è usato quindi per interrogare sullo stato del display.
175 | 176 | _**NOTA BENE:**_ 177 | se in dimming mode, si deve eseguire Displ_Backlight('I') in fase di startup. Verrà avviato anche il clock del timer 178 |
179 | 180 | 181 | ## Prossimi passi 182 | 183 | Dovrebbe bastare, dovresti aver già fatto anche questo step: 184 | - [Guida per creare un progetto CubeIDE per questa libreria](../1-HOWTO) 185 | 186 | ora puoi andare alle sezioni: 187 | - per progetti con Gestione Diretta: [(gestione diretta) Guida per aggiungere la libreria al progetto creato](../3B-DIRECT) 188 | - per progetti TouchGFX: [(TouchGFX) Guida per aggiungere la libreria al progetto creato](../3A-TOUCHGFX) 189 | 190 | -------------------------------------------------------------------------------- /1-HOWTO/z_displ_ST7735.h: -------------------------------------------------------------------------------- 1 | /* 2 | * z_displ_ST7735.h 3 | * rel. TouchGFX compatible 1.1 4 | * 5 | * Created on: Oct 9, 2022 6 | * Author: mauro 7 | * 8 | * Licensing: https://github.com/maudeve-it/ST7735S-STM32/blob/main/LICENSE 9 | * 10 | * Install and use this library following instruction on: https://github.com/maudeve-it/ST7735S-STM32 11 | * 12 | * These are the init instruction to put in you main() USER CODE BEGIN 2 13 | * 14 | * (if Direct Handling) 15 | * Displ_Init(Displ_Orientat_0); // (mandatory) initialize display controller - set orientation parameter as per your needs 16 | * Displ_CLS(BLACK); // clear the screen - BLACK or any other color you prefer 17 | * Displ_BackLight('I'); // (mandatory) initialize backlight 18 | * 19 | * (if using TouchGFX) 20 | * Displ_Init(Displ_Orientat_0); // (mandatory) initialize display controller - set orientation parameter as per TouchGFX setup 21 | * touchgfxSignalVSync(); // ask display syncronization 22 | * Displ_BackLight('I'); // (mandatory) initialize backlight 23 | * 24 | */ 25 | 26 | #ifndef INC_Z_GFX_FUNCTIONS_H_ 27 | #define INC_Z_GFX_FUNCTIONS_H_ 28 | 29 | #include 30 | 31 | 32 | /****************** STEP 0 ****************** 33 | *** if mapping flash on the uC addresses space *** 34 | ********** uncomment the below #define *********** 35 | ******** end assign it the correct value ********* 36 | ***** If external flash handled by TOUCHGFX,****** 37 | ************* let #define commented ************** 38 | **************************************************/ 39 | //#define EXT_FLASH_BASEADDRESS 0X90000000 // mapped flash base address 40 | 41 | 42 | /***************** STEP 1 ***************** 43 | ************ Enable TouchGFX interface ************ 44 | * uncommenting the below #define to enable 45 | * functions interfacing TouchGFX 46 | ***************************************************/ 47 | //#define DISPLAY_USING_TOUCHGFX 48 | 49 | 50 | /*||||||||||| USER/PROJECT PARAMETERS |||||||||||*/ 51 | 52 | /****************** STEP 2 ****************** 53 | **************** PORT PARAMETERS ***************** 54 | ** properly set the below the 2 defines to address 55 | ******** the SPI port defined on CubeMX *********/ 56 | 57 | #define DISPLAY_SPI_PORT hspi1 58 | #define DISPLAY_SPI SPI1 59 | 60 | 61 | /***************** STEP 3 **************** 62 | ************* SPI COMMUNICATION MODE ************* 63 | ** enable SPI mode wanted uncommenting ONE row *** 64 | ******* Same as configuration set on CubeMX ******/ 65 | 66 | //#define DISPLAY_SPI_POLLING_MODE 67 | //#define DISPLAY_SPI_INTERRUPT_MODE 68 | #define DISPLAY_SPI_DMA_MODE 69 | 70 | 71 | /***************** STEP 4 ***************** 72 | ***************** Backlight timer ***************** 73 | * if you want dimming backlight UNCOMMENT the 74 | * DISPLAY_DIMMING_MODE below define and properly 75 | * set other defines. 76 | * 77 | * Using backlight as a switch (only on/off) leave 78 | * DISPLAY_DIMMING_MODE commented 79 | * 80 | * if DIMMING: 81 | * On CubeMX set DISPL_LED pin as a timer PWM pin. 82 | * Timer COUNTER PERIOD (ARR) defines dimming light steps: 83 | * keep it low value - e.g. 10 - if dimming with buttons, 84 | * use higher value - e.g. 100 - if dimming with encoder, ... 85 | * Avoiding display flickering timer PRESCALER should 86 | * let timer clock to be higher than COUNTER PERIOD * 100 Hz. 87 | * Set all other defines below */ 88 | 89 | 90 | //#define DISPLAY_DIMMING_MODE // uncomment this define to enable dimming function otherwise there is an on/off switching function 91 | #ifdef DISPLAY_DIMMING_MODE 92 | #define BKLIT_TIMER TIM3 //timer used (PWMming DISPL_LED pin) 93 | #define BKLIT_T htim3 //timer used 94 | #define BKLIT_CHANNEL TIM_CHANNEL_2 //channel used 95 | #define BKLIT_CCR CCR2 //preload register 96 | #define BKLIT_STBY_LEVEL 1 //Display backlight level when in stand-by (levels are CNT values) 97 | #define BKLIT_INIT_LEVEL 50 //Display backlight level on startup 98 | #endif 99 | 100 | 101 | /***************** STEP 5 ***************** 102 | ************* frame buffer DEFINITION ************* 103 | * BUFLEVEL defines buffer size: 104 | * buffer size is 2^BUFLEVEL, 2 means 4 bytes buffer, 105 | * 9 means 512 bytes. 106 | * IT MUST BE BETWEEN 10 AND 16: 107 | * - 10 needed for 1 char in Font24 size 108 | * - 16 is a full screen 128x160 RGB565 109 | ***************************************************/ 110 | #define BUFLEVEL 11 111 | 112 | #ifdef DISPLAY_USING_TOUCHGFX 113 | #undef BUFLEVEL 114 | #define BUFLEVEL 1 115 | #endif 116 | 117 | 118 | /******** STEP6 ******** 119 | ****** ST7735 display size ****** 120 | * (warning: I used only 160X128, 121 | * other sizes/types not tested) 122 | * 123 | * set here pixel size of the 124 | * display driven by ST7735 125 | * never tested (and probably uncomplete) 126 | * on sizes else than 160x128 127 | *********************************/ 128 | //#define ST7735_IS_160X80 1 129 | //#define ST7735_IS_128X128 1 130 | #define ST7735_IS_160X128 1 131 | #define ST7735_WIDTH 128 132 | #define ST7735_HEIGHT 160 133 | 134 | 135 | /*|||||||| END OF USER/PROJECT PARAMETERS ||||||||*/ 136 | 137 | 138 | 139 | /*|||||||||||||| DEVICE PARAMETERS |||||||||||||||||*/ 140 | /* you shouldn't need to change anything here after */ 141 | 142 | 143 | // set the buffers size as per BUFLEVEL and DISPLAY_USING_TOUCHGFX 144 | // (if using TouchGFX, don't buffers from this library) 145 | #define SIZEBUF 1<> 3)) 193 | 194 | #define _swap_int16_t(a, b) \ 195 | { \ 196 | int16_t t = a; \ 197 | a = b; \ 198 | b = t; \ 199 | } 200 | 201 | 202 | void Displ_Init(Displ_Orientat_e orientation); 203 | void Displ_Orientation(Displ_Orientat_e orientation); 204 | 205 | void Displ_FillArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color); 206 | void Displ_CLS(uint16_t bgcolor); 207 | void Displ_Pixel(uint16_t x, uint16_t y, uint16_t color); 208 | void Displ_Line(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color); 209 | void Displ_Border(int16_t x, int16_t y, int16_t w, int16_t h, int16_t t, uint16_t color); 210 | 211 | void Displ_WChar(uint16_t x, uint16_t y, char ch, sFONT font, uint8_t size, uint16_t color, uint16_t bgcolor); 212 | void Displ_WString(uint16_t x, uint16_t y, const char* str, sFONT font, uint8_t size, uint16_t color, uint16_t bgcolor); 213 | void Displ_CString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, const char* str, sFONT font, uint8_t size, uint16_t color, uint16_t bgcolor); 214 | 215 | void Displ_DrawImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, const uint16_t* data); 216 | 217 | void Displ_fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color); 218 | void Displ_drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color); 219 | void Displ_fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color); 220 | void Displ_drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color); 221 | void Displ_drawRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color); 222 | void Displ_fillRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color); 223 | void Displ_DrawImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t *data); 224 | 225 | uint32_t Displ_BackLight(uint8_t cmd); 226 | 227 | 228 | #ifdef DISPLAY_USING_TOUCHGFX 229 | int touchgfxDisplayDriverTransmitActive(); 230 | void touchgfxDisplayDriverTransmitBlock(const uint8_t* pixels, uint16_t x, uint16_t y, uint16_t w, uint16_t h); 231 | extern void DisplayDriver_TransferCompleteCallback(); // da richiamare nel transmit complete callback con partial frame buffer 232 | extern void touchgfxSignalVSync(void); //per avviare il rendering 233 | #endif /* DISPLAY_USING_TOUCHGFX */ 234 | 235 | 236 | #endif /* INC_Z_GFX_FUNCTIONS_H_ */ 237 | -------------------------------------------------------------------------------- /3A-TOUCHGFX/README.md: -------------------------------------------------------------------------------- 1 | ![TouchGFX](./TouchGFX.jpg) 2 | 3 | 4 | 5 | _**Piu' sotto, al termine della lingua inglese trovi il testo in italiano. **_ 6 | _**Below English text you'll find the Italian version**_ 7 | 8 |
9 | 10 | 11 | # So... 12 | 13 | Now that you have created a new CubeIDE project as per these instructions: 14 | 15 | - ["How to" create a CubeIDE project for this library](../1-HOWTO) 16 | 17 | Now that you have chosen the backlight handling mode and set it as per these instructions: 18 | 19 | - ["How to" handle display backlight](../2-BACKLIGHT) 20 | 21 | 22 | You are ready to go integrating TouchGFX!
23 | Follow the below instructions if you like handling the display through this GUI systems.
24 | Otherwise, if you want to directly draw on the display through the library functions, do not proceed here and go to [(Direct handling) "How to" add this library to the created project](./3B-DIRECT) 25 |
26 | 27 | ## Parameters setup 28 | Your project is almost ready. You must "tune" the software parameters into "z_displ_ST7735.h": 29 | - section 0 - TouchGFX parameter: ok, if you are here reading, it means you have to remove the comment sign to parameter in section 0, enabling TouchGFX handling 30 | - section 1 - Port Parameters: here you have to set two macro constant with the SPI port name connecting display 31 | - section 2 - SPI communication mode: uncomment the macro definition related to enabled communication mode (Polling mode, Interrupt mode or DMA mode). You must uncomment no less and no more than ONE definition here 32 | - section 3 - Backlight Mode: see [BACKLIGHT page](../2-BACKLIGHT) 33 | - section 4 - Buffer size: the TouchGFX enabling will disable library buffer, so parameter set here is not used 34 | - section 5 - Display size: despite the ST7735 SPI driver can handle displays of any size and color modes, this library was tested only on a 128x160 display running in RBG565. 35 | 36 | 37 | ## TouchGFX package setup 38 | 39 | - enter in uC configuration (CubeMX) doubleclicking the ".ioc" file
40 | - goto "Software Packs", then to "Select components" and install "TouchGFX" if not yet done in your CubeIDE
41 | - after installation click on TouchGFX details and select it
42 | - close the Software packs component selector
43 | - goto Computing->CRC and activate it
44 | - goto Software Packs->TouchGFX and activate it
45 | 46 | now in TouchGFX generator, set these parameters: 47 | |Parameter|Value| 48 | |---|---| 49 | |Framebuffer PixelFormat|RGB565| 50 | |Width|160/128| 51 | |Height|128/160| 52 | |Framebuffer Strategy|Partial Buffer| 53 | all other parameters as per default
54 | 55 | Save and generate (or update) software.
56 | 57 | 58 | 59 | 60 | ## main.c setup 61 | 62 | in main.c you now need to initialize display before entering in the main loop, this way:
63 |
64 | (main.c) 65 | ```sh 66 | ... 67 | /* USER CODE BEGIN 2 */ // "USER CODE BEGIN 2" is after all system initializations and before entering the main loop. Good place to initialize display 68 | Displ_Init(Displ_Orientat_0); // initialize the display and set the initial display orientation (here is orientaton: 0°) - THIS FUNCTION MUST PRECEED ANY OTHER DISPLAY FUNCTION CALL. 69 | touchgfxSignalVSync(); // asks TouchGFX to start initial display drawing 70 | Displ_BackLight('I'); // initialize backlight and turn it on at init level 71 | /* USER CODE END 2 */ 72 | ... 73 | ``` 74 | 75 |
76 | then, in the main loop, add the cycling activation of TouchGFX.
77 | You may ask a continuous TouchGFX refresh as here below:
78 | (an easier handling but a higher uC overload)
79 | 80 | ```sh 81 | ... 82 | /* Infinite loop */ 83 | /* USER CODE BEGIN WHILE */ 84 | while (1) 85 | { 86 | touchgfxSignalVSync(); // asks TouchGFX to get events and redraw screen 87 | 88 | /* USER CODE END WHILE */ 89 | 90 | MX_TouchGFX_Process(); 91 | /* USER CODE BEGIN 3 */ 92 | } 93 | /* USER CODE END 3 */ 94 | ... 95 | ``` 96 |
97 | otherwise you can submit TouchGFX activation only to the events that need to be considered, see below:
98 | (having to take care of every event involving TouchGFX, but uC overload will be lower a lot)
99 | 100 | ```sh 101 | ... 102 | /* Infinite loop */ 103 | /* USER CODE BEGIN WHILE */ 104 | while (1) 105 | { 106 | if ("event occourred needing a display update") 107 | touchgfxSignalVSync(); // asks TouchGFX to get events and redraw screen 108 | 109 | /* USER CODE END WHILE */ 110 | 111 | MX_TouchGFX_Process(); 112 | /* USER CODE BEGIN 3 */ 113 | } 114 | /* USER CODE END 3 */ 115 | ... 116 | ``` 117 | 118 | 119 | ## using TouchGFX in your projects 120 | 121 | That's all, start using TouchGFX designer to setup your GUI! 122 | 123 | 124 | 125 | ## compiler warnings 126 | 127 | When you first compile your project, it may stop on these two errors:
128 | 129 | ```sh 130 | ... 131 | #error "A user must call touchgfx::startNewTransfer(); once touchgfxDisplayDriverTransmitBlock() has succesfully sent a block." 132 | #error "A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy." 133 | ... 134 | ``` 135 | 136 | It is just a reminder for you to develop the interface routines to TouchGFX.
137 | They are already available in the library.
138 | So, just delete the two "#error" lines, the two warnings, in source file and re-compile the project.
139 | They will not appear anymore. 140 | 141 |
142 |
143 | 144 | --- 145 | 146 | # Dunque... 147 | Ora che hai creato un nuovo progetto con CubeIDE project seguendo queste istruzioni: 148 | 149 | - [Guida per configurare un progetto con CubeIDE](./1-HOWTO) 150 | 151 | Ora che hai scelto la gestione della retroilluminazione, seguendo queste istruzioni: 152 | 153 | - [Guida alla gestione della retroilluminazione](./2-BACKLIGHT) 154 | 155 | Puoi finalmente configurare gli ultimi parametri ed eseguire il programma!
156 | Segui le istruzioni sotto se vuoi gestire direttamente il display attraverso le funzioni grafiche della libreria.
157 | Se invece vuoi usare il pacchetto STM TouchGFX, non procedere qui e passa a [(gestione diretta) Guida per aggiungere la libreria al progetto creato](./2B-DIRECT) 158 |
159 | 160 | ## Configurazione Parametri 161 | Il progetto è quasi pronto. Devi mettere a punti i parametri nel file "z_displ_ST7735.h": 162 | - sezione 0 - TouchGFX: se stai leggendo qui devi togliere il commento alla la macro nella sezione 0, abilitando la gestione TouchGFX 163 | - sezione 1 - Port Parameters: qui devi impostare due costanti macro con il nome della porta SPI a cui è connesso il display 164 | - section 2 - SPI communication mode: togli il commento alla definizione definition relativa al tipo di comunicazione attivato (Polling moode, Interrupt mode o DMA mode). Devi togliere il commento ad una riga (NON di più e NON di meno) 165 | - section 3 - Backlight Mode: vedi la [pagina BACKLIGHT](../2-BACKLIGHT) 166 | - section 4 - Dimensione del Buffer: TouchGFX non utilizza i buffer della libreria, che vengono disabilitati. Il parametro impostato qui non è utilizzato. 167 | - section 5 - Dimensione Display: anche se il driver SPI ST7735 può gestire display di dimensioni diverse, questa libreria è stata testata solo su un display di 128x160 pixel in modalità RBG565. 168 | 169 | 170 | 171 | ## Configurazione TouchGFX package 172 | 173 | - entra nella configurazione del uC (CubeMX) con un doppio click sul file ".ioc"
174 | - vai in "Software Packs", poi in "Select components" e installa "TouchGFX" se non lo hai ancora fatto sul tuo CubeIDE
175 | - dopo l'installazione clicca sulla tendina TouchGFX e selezionalo
176 | - chiudi il Software packs component selector
177 | - vai in Computing->CRC e attivalo
178 | - vai in Software Packs->TouchGFX e attivalo
179 | 180 | ora, in TouchGFX generator, imposta questi parametri: 181 | |Parametro|Valore| 182 | |---|---| 183 | |Framebuffer PixelFormat|RGB565| 184 | |Width|160/128| 185 | |Height|128/160| 186 | |Framebuffer Strategy|Partial Buffer| 187 | tutti gli altri parametri come default
188 | 189 | Salva e genera (o aggiorna) il software.
190 | 191 | 192 | 193 | ## impostazione di main.c 194 | 195 | in main.c ora devi inizializzare il display prima di entrare nel main loop, in questo modo: 196 | 197 | (main.c) 198 | ```sh 199 | ... 200 | /* USER CODE BEGIN 2 */ // "USER CODE BEGIN 2" is after all system initializations and before entering the main loop. Good place to initialize display 201 | Displ_Init(Displ_Orientat_0); // initialize the display and set the initial display orientation (here is orientaton: 0°) - THIS FUNCTION MUST PRECEED ANY OTHER DISPLAY FUNCTION CALL. 202 | touchgfxSignalVSync(); // asks TouchGFX to start initial display drawing 203 | Displ_BackLight('I'); // initialize backlight and turn it on at init level 204 | /* USER CODE END 2 */ 205 | ... 206 | ``` 207 | 208 |
poi, nel loop principale, aggiungi l'attivazione ciclica di TouchGFX.
209 | Puoi chiedere un aggiornamento continuo di TouchGFX come qui sotto:
210 | (gestione semplice ma con un maggiore sovraccarico del uC)
211 | 212 | ```sh 213 | ... 214 | /* Infinite loop */ 215 | /* USER CODE BEGIN WHILE */ 216 | while (1) // into the main loop you can add the test functions 217 | { 218 | touchgfxSignalVSync(); // asks TouchGFX to get events and redraw screen 219 | 220 | /* USER CODE END WHILE */ 221 | 222 | MX_TouchGFX_Process(); 223 | /* USER CODE BEGIN 3 */ 224 | } 225 | /* USER CODE END 3 */ 226 | ... 227 | ``` 228 | 229 |
oppure puoi sottoporre l'attivazione di TouchGFX solo agli eventi che richiedono di essere considerati, vedi qui:
230 | (dovrai fare attenzione ad attivare TouchGFX in ogni specifico evento, ma il uC il sovraccarico al uC è molto minore )
231 | 232 | ```sh 233 | ... 234 | /* Infinite loop */ 235 | /* USER CODE BEGIN WHILE */ 236 | while (1) // into the main loop you can add the test functions 237 | { 238 | if ("e' accaduto un evento che richiede l'aggiornamento del display") 239 | touchgfxSignalVSync(); // asks TouchGFX to get events and redraw screen 240 | 241 | /* USER CODE END WHILE */ 242 | 243 | MX_TouchGFX_Process(); 244 | /* USER CODE BEGIN 3 */ 245 | } 246 | /* USER CODE END 3 */ 247 | ... 248 | ``` 249 | 250 | 251 | 252 | ## usare TouchGFX nel tup progetto 253 | 254 | E' tutto. Inizia ad usare TouchGFX designer per impostare la tua GUI! 255 | 256 | 257 | 258 | ## compiler warnings 259 | 260 | Quando compili il progetto per la prima volta, potrebbe fermarsi su questi due errori:
261 | 262 | ```sh 263 | ... 264 | #error "A user must call touchgfx::startNewTransfer(); once touchgfxDisplayDriverTransmitBlock() has succesfully sent a block." 265 | #error "A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy." 266 | ... 267 | ``` 268 | 269 | Si tratta semplicemente di un avviso per ricordarti di sviluppare le routine di interfaccia a TouchGFX.
270 | Queste sono già disponibili nella libreria.
271 | Quindi, semplicemente cancella le due righe "#error", i due avvisi, nel file sorgente e ricompila il progetto.
272 | Non appariranno più.
273 | 274 | -------------------------------------------------------------------------------- /1-HOWTO/z_displ_ST7735_test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * z_displ_ST7735_test.c 3 | * rel. 5 4 | * 5 | * Created on: Mar 25, 2022 6 | * Author: mauro 7 | * 8 | * This is related to the functions testing features and showing performance 9 | * you don't need this file in the production project 10 | * 11 | */ 12 | 13 | 14 | 15 | #include "main.h" 16 | 17 | extern int16_t _width; ///< (oriented) display width 18 | extern int16_t _height; ///< (oriented) display height 19 | 20 | 21 | 22 | 23 | 24 | void testLines(uint16_t color) 25 | { 26 | int x1, y1, x2, y2, 27 | w = _width, 28 | h = _height; 29 | 30 | Displ_CLS(BLACK); 31 | 32 | x1 = y1 = 0; 33 | y2 = h - 1; 34 | // for (x2 = 0; x2 < w; x2 += 6) drawLine(x1, y1, x2, y2, color); 35 | for (x2 = 0; x2 < w; x2 += 6) Displ_Line(x1, y1, x2, y2, color); 36 | x2 = w - 1; 37 | for (y2 = 0; y2 < h; y2 += 6) Displ_Line(x1, y1, x2, y2, color); 38 | 39 | Displ_CLS(BLACK); 40 | 41 | x1 = w - 1; 42 | y1 = 0; 43 | y2 = h - 1; 44 | for (x2 = 0; x2 < w; x2 += 6) Displ_Line(x1, y1, x2, y2, color); 45 | x2 = 0; 46 | for (y2 = 0; y2 < h; y2 += 6) Displ_Line(x1, y1, x2, y2, color); 47 | 48 | Displ_CLS(BLACK); 49 | 50 | x1 = 0; 51 | y1 = h - 1; 52 | y2 = 0; 53 | for (x2 = 0; x2 < w; x2 += 6) Displ_Line(x1, y1, x2, y2, color); 54 | x2 = w - 1; 55 | for (y2 = 0; y2 < h; y2 += 6) Displ_Line(x1, y1, x2, y2, color); 56 | 57 | Displ_CLS(BLACK); 58 | 59 | x1 = w - 1; 60 | y1 = h - 1; 61 | y2 = 0; 62 | for (x2 = 0; x2 < w; x2 += 6) Displ_Line(x1, y1, x2, y2, color); 63 | x2 = 0; 64 | for (y2 = 0; y2 < h; y2 += 6) Displ_Line(x1, y1, x2, y2, color); 65 | 66 | } 67 | 68 | 69 | 70 | 71 | void testFastLines(uint16_t color1, uint16_t color2) 72 | { 73 | int x, y, w = _width, h = _height; 74 | 75 | Displ_CLS(BLACK); 76 | // for (y = 0; y < h; y += 5) drawFastHLine(0, y, w, color1); 77 | for (y = 0; y < h; y += 5) Displ_Line(0, y, w-1, y, color1); 78 | 79 | // for (x = 0; x < w; x += 5) drawFastVLine(x, 0, h, color2); 80 | for (x = 0; x < w; x += 5) Displ_Line(x, 0, x, h-1, color2); 81 | } 82 | 83 | 84 | 85 | 86 | 87 | void testRects(uint16_t color) 88 | { 89 | int n, i, i2, 90 | cx = _width / 2, 91 | cy = _height / 2; 92 | 93 | Displ_CLS(BLACK); 94 | n = min(_width, _height); 95 | for (i = 2; i < n; i += 6) { 96 | i2 = i / 2; 97 | // drawRect(cx - i2, cy - i2, i, i, color); 98 | Displ_Border(cx - i2, cy - i2, i, i, 1, color); 99 | } 100 | } 101 | 102 | 103 | 104 | 105 | void testFilledRects(uint16_t color1, uint16_t color2) 106 | { 107 | int n, i, i2, 108 | cx = _width / 2 - 1, 109 | cy = _height / 2 - 1; 110 | 111 | Displ_CLS(BLACK); 112 | n = min(_width, _height); 113 | for (i = n; i > 0; i -= 6) { 114 | i2 = i / 2; 115 | 116 | // fillRect(cx - i2, cy - i2, i, i, color1); 117 | Displ_FillArea(cx - i2, cy - i2, i, i, color1); 118 | 119 | // drawRect(cx - i2, cy - i2, i, i, color2); 120 | Displ_Border(cx - i2, cy - i2, i, i, 1, color2); 121 | } 122 | } 123 | 124 | 125 | 126 | 127 | void testFilledCircles(uint8_t radius, uint16_t color) 128 | { 129 | int x, y, w = _width, h = _height, r2 = radius * 2; 130 | 131 | Displ_CLS(BLACK); 132 | for (x = radius; x < w; x += r2) { 133 | for (y = radius; y < h; y += r2) { 134 | Displ_fillCircle(x, y, radius, color); 135 | } 136 | } 137 | } 138 | 139 | 140 | 141 | 142 | 143 | 144 | void testCircles(uint8_t radius, uint16_t color) 145 | { 146 | int x, y, r2 = radius * 2, 147 | w = _width + radius, 148 | h = _height + radius; 149 | 150 | // Screen is not cleared for this one -- this is 151 | // intentional and does not affect the reported time. 152 | for (x = 0; x < w; x += r2) { 153 | for (y = 0; y < h; y += r2) { 154 | Displ_drawCircle(x, y, radius, color); 155 | } 156 | } 157 | } 158 | 159 | 160 | 161 | 162 | 163 | 164 | void testTriangles() 165 | { 166 | int n, i, cx = _width / 2 - 1, 167 | cy = _height / 2 - 1; 168 | 169 | Displ_CLS(BLACK); 170 | n = min(cx, cy); 171 | for (i = 0; i < n; i += 5) { 172 | Displ_drawTriangle( 173 | cx , cy - i, // peak 174 | cx - i, cy + i, // bottom left 175 | cx + i, cy + i, // bottom right 176 | color565(0, 0, i)); 177 | } 178 | } 179 | 180 | 181 | 182 | 183 | 184 | void testFilledTriangles() { 185 | int i, cx = _width / 2 - 1, 186 | cy = _height / 2 - 1; 187 | 188 | Displ_CLS(BLACK); 189 | for (i = min(cx, cy); i > 10; i -= 5) { 190 | Displ_fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i, 191 | color565(0, i, i)); 192 | Displ_drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i, 193 | color565(i, i, 0)); 194 | } 195 | } 196 | 197 | 198 | 199 | 200 | 201 | 202 | void testRoundRects() { 203 | int w, i, i2, red, step, 204 | cx = _width / 2 - 1, 205 | cy = _height / 2 - 1; 206 | 207 | Displ_CLS(BLACK); 208 | w = min(_width, _height); 209 | red = 0; 210 | step = (256 * 6) / w; 211 | for (i = 0; i < w; i += 6) { 212 | i2 = i / 2; 213 | red += step; 214 | Displ_drawRoundRect(cx - i2, cy - i2, i, i, i / 8, color565(red, 0, 0)); 215 | } 216 | } 217 | 218 | 219 | 220 | 221 | 222 | void testFilledRoundRects() { 223 | int i, i2, green, step, 224 | cx = _width / 2 - 1, 225 | cy = _height / 2 - 1; 226 | 227 | Displ_CLS(BLACK); 228 | green = 256; 229 | step = (256 * 6) / min(_width, _height); 230 | for (i = min(_width, _height); i > 20; i -= 6) { 231 | i2 = i / 2; 232 | green -= step; 233 | Displ_fillRoundRect(cx - i2, cy - i2, i, i, i / 8, color565(0, green, 0)); 234 | } 235 | } 236 | 237 | 238 | 239 | 240 | 241 | void TestChar(){ 242 | 243 | uint16_t x,y,k,a,b; 244 | uint8_t c; 245 | 246 | for (k=0;k<2500;k++) { 247 | a=rand(); 248 | b=rand(); 249 | x=a % (_width-11) ; 250 | y=b % (_height-18) ; 251 | c=a % 26+'A'; 252 | Displ_WChar(x, y, c, Font16, 1, YELLOW, RED); 253 | x=b % (_width-11) ; 254 | y=a % (_height-18) ; 255 | c=b % 26+'A'; 256 | Displ_WChar(x, y, c, Font16, 1, RED, YELLOW); 257 | } 258 | }; 259 | 260 | 261 | 262 | void wait(uint16_t delay){ 263 | uint16_t time; 264 | volatile uint32_t dummy1,dummy2; 265 | //volatile uint32_t *mem = 0x20000000; 266 | 267 | time=HAL_GetTick(); 268 | dummy1=0; 269 | while ((HAL_GetTick()-time)
© COPYRIGHT(c) 2014 STMicroelectronics
12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Includes ------------------------------------------------------------------*/ 39 | #include "fonts.h" 40 | 41 | /** @addtogroup Utilities 42 | * @{ 43 | */ 44 | 45 | /** @addtogroup STM32_EVAL 46 | * @{ 47 | */ 48 | 49 | /** @addtogroup Common 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup FONTS 54 | * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. 55 | * @{ 56 | */ 57 | 58 | /** @defgroup FONTS_Private_Types 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | 66 | /** @defgroup FONTS_Private_Defines 67 | * @{ 68 | */ 69 | /** 70 | * @} 71 | */ 72 | 73 | 74 | /** @defgroup FONTS_Private_Macros 75 | * @{ 76 | */ 77 | /** 78 | * @} 79 | */ 80 | 81 | 82 | /** @defgroup FONTS_Private_Variables 83 | * @{ 84 | */ 85 | // 86 | // Font data for Courier New 12pt 87 | // 88 | 89 | const uint8_t Font8_Table[] = 90 | { 91 | // @0 ' ' (5 pixels wide) 92 | 0x00, // 93 | 0x00, // 94 | 0x00, // 95 | 0x00, // 96 | 0x00, // 97 | 0x00, // 98 | 0x00, // 99 | 0x00, // 100 | 101 | // @8 '!' (5 pixels wide) 102 | 0x20, // # 103 | 0x20, // # 104 | 0x20, // # 105 | 0x20, // # 106 | 0x00, // 107 | 0x20, // # 108 | 0x00, // 109 | 0x00, // 110 | 111 | // @16 '"' (5 pixels wide) 112 | 0x50, // # # 113 | 0x50, // # # 114 | 0x00, // 115 | 0x00, // 116 | 0x00, // 117 | 0x00, // 118 | 0x00, // 119 | 0x00, // 120 | 121 | // @24 '#' (5 pixels wide) 122 | 0x28, // # # 123 | 0x50, // # # 124 | 0xF8, // ##### 125 | 0x50, // # # 126 | 0xF8, // ##### 127 | 0x50, // # # 128 | 0xA0, // # # 129 | 0x00, // 130 | 131 | // @32 '$' (5 pixels wide) 132 | 0x20, // # 133 | 0x30, // ## 134 | 0x60, // ## 135 | 0x30, // ## 136 | 0x10, // # 137 | 0x60, // ## 138 | 0x20, // # 139 | 0x00, // 140 | 141 | // @40 '%' (5 pixels wide) 142 | 0x20, // # 143 | 0x20, // # 144 | 0x18, // ## 145 | 0x60, // ## 146 | 0x10, // # 147 | 0x10, // # 148 | 0x00, // 149 | 0x00, // 150 | 151 | // @48 '&' (5 pixels wide) 152 | 0x00, // 153 | 0x38, // ### 154 | 0x20, // # 155 | 0x60, // ## 156 | 0x50, // # # 157 | 0x78, // #### 158 | 0x00, // 159 | 0x00, // 160 | 161 | // @56 ''' (5 pixels wide) 162 | 0x20, // # 163 | 0x20, // # 164 | 0x20, // # 165 | 0x00, // 166 | 0x00, // 167 | 0x00, // 168 | 0x00, // 169 | 0x00, // 170 | 171 | // @64 '(' (5 pixels wide) 172 | 0x10, // # 173 | 0x20, // # 174 | 0x20, // # 175 | 0x20, // # 176 | 0x20, // # 177 | 0x20, // # 178 | 0x10, // # 179 | 0x00, // 180 | 181 | // @72 ')' (5 pixels wide) 182 | 0x40, // # 183 | 0x20, // # 184 | 0x20, // # 185 | 0x20, // # 186 | 0x20, // # 187 | 0x20, // # 188 | 0x40, // # 189 | 0x00, // 190 | 191 | // @80 '*' (5 pixels wide) 192 | 0x20, // # 193 | 0x70, // ### 194 | 0x20, // # 195 | 0x50, // # # 196 | 0x00, // 197 | 0x00, // 198 | 0x00, // 199 | 0x00, // 200 | 201 | // @88 '+' (5 pixels wide) 202 | 0x00, // 203 | 0x20, // # 204 | 0x20, // # 205 | 0xF8, // ##### 206 | 0x20, // # 207 | 0x20, // # 208 | 0x00, // 209 | 0x00, // 210 | 211 | // @96 ',' (5 pixels wide) 212 | 0x00, // 213 | 0x00, // 214 | 0x00, // 215 | 0x00, // 216 | 0x10, // # 217 | 0x20, // # 218 | 0x20, // # 219 | 0x00, // 220 | 221 | // @104 '-' (5 pixels wide) 222 | 0x00, // 223 | 0x00, // 224 | 0x00, // 225 | 0x70, // ### 226 | 0x00, // 227 | 0x00, // 228 | 0x00, // 229 | 0x00, // 230 | 231 | // @112 '.' (5 pixels wide) 232 | 0x00, // 233 | 0x00, // 234 | 0x00, // 235 | 0x00, // 236 | 0x00, // 237 | 0x20, // # 238 | 0x00, // 239 | 0x00, // 240 | 241 | // @120 '/' (5 pixels wide) 242 | 0x10, // # 243 | 0x20, // # 244 | 0x20, // # 245 | 0x20, // # 246 | 0x40, // # 247 | 0x40, // # 248 | 0x80, // # 249 | 0x00, // 250 | 251 | // @128 '0' (5 pixels wide) 252 | 0x20, // # 253 | 0x50, // # # 254 | 0x50, // # # 255 | 0x50, // # # 256 | 0x50, // # # 257 | 0x20, // # 258 | 0x00, // 259 | 0x00, // 260 | 261 | // @136 '1' (5 pixels wide) 262 | 0x60, // ## 263 | 0x20, // # 264 | 0x20, // # 265 | 0x20, // # 266 | 0x20, // # 267 | 0xF8, // ##### 268 | 0x00, // 269 | 0x00, // 270 | 271 | // @144 '2' (5 pixels wide) 272 | 0x20, // # 273 | 0x50, // # # 274 | 0x20, // # 275 | 0x20, // # 276 | 0x40, // # 277 | 0x70, // ### 278 | 0x00, // 279 | 0x00, // 280 | 281 | // @152 '3' (5 pixels wide) 282 | 0x20, // # 283 | 0x50, // # # 284 | 0x10, // # 285 | 0x20, // # 286 | 0x10, // # 287 | 0x60, // ## 288 | 0x00, // 289 | 0x00, // 290 | 291 | // @160 '4' (5 pixels wide) 292 | 0x10, // # 293 | 0x30, // ## 294 | 0x50, // # # 295 | 0x78, // #### 296 | 0x10, // # 297 | 0x38, // ### 298 | 0x00, // 299 | 0x00, // 300 | 301 | // @168 '5' (5 pixels wide) 302 | 0x70, // ### 303 | 0x40, // # 304 | 0x60, // ## 305 | 0x10, // # 306 | 0x50, // # # 307 | 0x20, // # 308 | 0x00, // 309 | 0x00, // 310 | 311 | // @176 '6' (5 pixels wide) 312 | 0x30, // ## 313 | 0x40, // # 314 | 0x60, // ## 315 | 0x50, // # # 316 | 0x50, // # # 317 | 0x60, // ## 318 | 0x00, // 319 | 0x00, // 320 | 321 | // @184 '7' (5 pixels wide) 322 | 0x70, // ### 323 | 0x50, // # # 324 | 0x10, // # 325 | 0x20, // # 326 | 0x20, // # 327 | 0x20, // # 328 | 0x00, // 329 | 0x00, // 330 | 331 | // @192 '8' (5 pixels wide) 332 | 0x20, // # 333 | 0x50, // # # 334 | 0x20, // # 335 | 0x50, // # # 336 | 0x50, // # # 337 | 0x20, // # 338 | 0x00, // 339 | 0x00, // 340 | 341 | // @200 '9' (5 pixels wide) 342 | 0x30, // ## 343 | 0x50, // # # 344 | 0x50, // # # 345 | 0x30, // ## 346 | 0x10, // # 347 | 0x60, // ## 348 | 0x00, // 349 | 0x00, // 350 | 351 | // @208 ':' (5 pixels wide) 352 | 0x00, // 353 | 0x00, // 354 | 0x20, // # 355 | 0x00, // 356 | 0x00, // 357 | 0x20, // # 358 | 0x00, // 359 | 0x00, // 360 | 361 | // @216 ';' (5 pixels wide) 362 | 0x00, // 363 | 0x00, // 364 | 0x10, // # 365 | 0x00, // 366 | 0x10, // # 367 | 0x20, // # 368 | 0x00, // 369 | 0x00, // 370 | 371 | // @224 '<' (5 pixels wide) 372 | 0x00, // 373 | 0x10, // # 374 | 0x20, // # 375 | 0xC0, // ## 376 | 0x20, // # 377 | 0x10, // # 378 | 0x00, // 379 | 0x00, // 380 | 381 | // @232 '=' (5 pixels wide) 382 | 0x00, // 383 | 0x70, // ### 384 | 0x00, // 385 | 0x70, // ### 386 | 0x00, // 387 | 0x00, // 388 | 0x00, // 389 | 0x00, // 390 | 391 | // @240 '>' (5 pixels wide) 392 | 0x00, // 393 | 0x40, // # 394 | 0x20, // # 395 | 0x18, // ## 396 | 0x20, // # 397 | 0x40, // # 398 | 0x00, // 399 | 0x00, // 400 | 401 | // @248 '?' (5 pixels wide) 402 | 0x20, // # 403 | 0x50, // # # 404 | 0x10, // # 405 | 0x20, // # 406 | 0x00, // 407 | 0x20, // # 408 | 0x00, // 409 | 0x00, // 410 | 411 | // @256 '@' (5 pixels wide) 412 | 0x30, // ## 413 | 0x48, // # # 414 | 0x48, // # # 415 | 0x58, // # ## 416 | 0x48, // # # 417 | 0x40, // # 418 | 0x38, // ### 419 | 0x00, // 420 | 421 | // @264 'A' (5 pixels wide) 422 | 0x60, // ## 423 | 0x20, // # 424 | 0x50, // # # 425 | 0x70, // ### 426 | 0x88, // # # 427 | 0xD8, // ## ## 428 | 0x00, // 429 | 0x00, // 430 | 431 | // @272 'B' (5 pixels wide) 432 | 0xF0, // #### 433 | 0x48, // # # 434 | 0x70, // ### 435 | 0x48, // # # 436 | 0x48, // # # 437 | 0xF0, // #### 438 | 0x00, // 439 | 0x00, // 440 | 441 | // @280 'C' (5 pixels wide) 442 | 0x70, // ### 443 | 0x50, // # # 444 | 0x40, // # 445 | 0x40, // # 446 | 0x40, // # 447 | 0x30, // ## 448 | 0x00, // 449 | 0x00, // 450 | 451 | // @288 'D' (5 pixels wide) 452 | 0xF0, // #### 453 | 0x48, // # # 454 | 0x48, // # # 455 | 0x48, // # # 456 | 0x48, // # # 457 | 0xF0, // #### 458 | 0x00, // 459 | 0x00, // 460 | 461 | // @296 'E' (5 pixels wide) 462 | 0xF8, // ##### 463 | 0x48, // # # 464 | 0x60, // ## 465 | 0x40, // # 466 | 0x48, // # # 467 | 0xF8, // ##### 468 | 0x00, // 469 | 0x00, // 470 | 471 | // @304 'F' (5 pixels wide) 472 | 0xF8, // ##### 473 | 0x48, // # # 474 | 0x60, // ## 475 | 0x40, // # 476 | 0x40, // # 477 | 0xE0, // ### 478 | 0x00, // 479 | 0x00, // 480 | 481 | // @312 'G' (5 pixels wide) 482 | 0x70, // ### 483 | 0x40, // # 484 | 0x40, // # 485 | 0x58, // # ## 486 | 0x50, // # # 487 | 0x30, // ## 488 | 0x00, // 489 | 0x00, // 490 | 491 | // @320 'H' (5 pixels wide) 492 | 0xE8, // ### # 493 | 0x48, // # # 494 | 0x78, // #### 495 | 0x48, // # # 496 | 0x48, // # # 497 | 0xE8, // ### # 498 | 0x00, // 499 | 0x00, // 500 | 501 | // @328 'I' (5 pixels wide) 502 | 0x70, // ### 503 | 0x20, // # 504 | 0x20, // # 505 | 0x20, // # 506 | 0x20, // # 507 | 0x70, // ### 508 | 0x00, // 509 | 0x00, // 510 | 511 | // @336 'J' (5 pixels wide) 512 | 0x38, // ### 513 | 0x10, // # 514 | 0x10, // # 515 | 0x50, // # # 516 | 0x50, // # # 517 | 0x20, // # 518 | 0x00, // 519 | 0x00, // 520 | 521 | // @344 'K' (5 pixels wide) 522 | 0xD8, // ## ## 523 | 0x50, // # # 524 | 0x60, // ## 525 | 0x70, // ### 526 | 0x50, // # # 527 | 0xD8, // ## ## 528 | 0x00, // 529 | 0x00, // 530 | 531 | // @352 'L' (5 pixels wide) 532 | 0xE0, // ### 533 | 0x40, // # 534 | 0x40, // # 535 | 0x40, // # 536 | 0x48, // # # 537 | 0xF8, // ##### 538 | 0x00, // 539 | 0x00, // 540 | 541 | // @360 'M' (5 pixels wide) 542 | 0xD8, // ## ## 543 | 0xD8, // ## ## 544 | 0xD8, // ## ## 545 | 0xA8, // # # # 546 | 0x88, // # # 547 | 0xD8, // ## ## 548 | 0x00, // 549 | 0x00, // 550 | 551 | // @368 'N' (5 pixels wide) 552 | 0xD8, // ## ## 553 | 0x68, // ## # 554 | 0x68, // ## # 555 | 0x58, // # ## 556 | 0x58, // # ## 557 | 0xE8, // ### # 558 | 0x00, // 559 | 0x00, // 560 | 561 | // @376 'O' (5 pixels wide) 562 | 0x30, // ## 563 | 0x48, // # # 564 | 0x48, // # # 565 | 0x48, // # # 566 | 0x48, // # # 567 | 0x30, // ## 568 | 0x00, // 569 | 0x00, // 570 | 571 | // @384 'P' (5 pixels wide) 572 | 0xF0, // #### 573 | 0x48, // # # 574 | 0x48, // # # 575 | 0x70, // ### 576 | 0x40, // # 577 | 0xE0, // ### 578 | 0x00, // 579 | 0x00, // 580 | 581 | // @392 'Q' (5 pixels wide) 582 | 0x30, // ## 583 | 0x48, // # # 584 | 0x48, // # # 585 | 0x48, // # # 586 | 0x48, // # # 587 | 0x30, // ## 588 | 0x18, // ## 589 | 0x00, // 590 | 591 | // @400 'R' (5 pixels wide) 592 | 0xF0, // #### 593 | 0x48, // # # 594 | 0x48, // # # 595 | 0x70, // ### 596 | 0x48, // # # 597 | 0xE8, // ### # 598 | 0x00, // 599 | 0x00, // 600 | 601 | // @408 'S' (5 pixels wide) 602 | 0x70, // ### 603 | 0x50, // # # 604 | 0x20, // # 605 | 0x10, // # 606 | 0x50, // # # 607 | 0x70, // ### 608 | 0x00, // 609 | 0x00, // 610 | 611 | // @416 'T' (5 pixels wide) 612 | 0xF8, // ##### 613 | 0xA8, // # # # 614 | 0x20, // # 615 | 0x20, // # 616 | 0x20, // # 617 | 0x70, // ### 618 | 0x00, // 619 | 0x00, // 620 | 621 | // @424 'U' (5 pixels wide) 622 | 0xD8, // ## ## 623 | 0x48, // # # 624 | 0x48, // # # 625 | 0x48, // # # 626 | 0x48, // # # 627 | 0x30, // ## 628 | 0x00, // 629 | 0x00, // 630 | 631 | // @432 'V' (5 pixels wide) 632 | 0xD8, // ## ## 633 | 0x88, // # # 634 | 0x48, // # # 635 | 0x50, // # # 636 | 0x50, // # # 637 | 0x30, // ## 638 | 0x00, // 639 | 0x00, // 640 | 641 | // @440 'W' (5 pixels wide) 642 | 0xD8, // ## ## 643 | 0x88, // # # 644 | 0xA8, // # # # 645 | 0xA8, // # # # 646 | 0xA8, // # # # 647 | 0x50, // # # 648 | 0x00, // 649 | 0x00, // 650 | 651 | // @448 'X' (5 pixels wide) 652 | 0xD8, // ## ## 653 | 0x50, // # # 654 | 0x20, // # 655 | 0x20, // # 656 | 0x50, // # # 657 | 0xD8, // ## ## 658 | 0x00, // 659 | 0x00, // 660 | 661 | // @456 'Y' (5 pixels wide) 662 | 0xD8, // ## ## 663 | 0x88, // # # 664 | 0x50, // # # 665 | 0x20, // # 666 | 0x20, // # 667 | 0x70, // ### 668 | 0x00, // 669 | 0x00, // 670 | 671 | // @464 'Z' (5 pixels wide) 672 | 0x78, // #### 673 | 0x48, // # # 674 | 0x10, // # 675 | 0x20, // # 676 | 0x48, // # # 677 | 0x78, // #### 678 | 0x00, // 679 | 0x00, // 680 | 681 | // @472 '[' (5 pixels wide) 682 | 0x30, // ## 683 | 0x20, // # 684 | 0x20, // # 685 | 0x20, // # 686 | 0x20, // # 687 | 0x20, // # 688 | 0x30, // ## 689 | 0x00, // 690 | 691 | // @480 '\' (5 pixels wide) 692 | 0x80, // # 693 | 0x40, // # 694 | 0x40, // # 695 | 0x20, // # 696 | 0x20, // # 697 | 0x20, // # 698 | 0x10, // # 699 | 0x00, // 700 | 701 | // @488 ']' (5 pixels wide) 702 | 0x60, // ## 703 | 0x20, // # 704 | 0x20, // # 705 | 0x20, // # 706 | 0x20, // # 707 | 0x20, // # 708 | 0x60, // ## 709 | 0x00, // 710 | 711 | // @496 '^' (5 pixels wide) 712 | 0x20, // # 713 | 0x20, // # 714 | 0x50, // # # 715 | 0x00, // 716 | 0x00, // 717 | 0x00, // 718 | 0x00, // 719 | 0x00, // 720 | 721 | // @504 '_' (5 pixels wide) 722 | 0x00, // 723 | 0x00, // 724 | 0x00, // 725 | 0x00, // 726 | 0x00, // 727 | 0x00, // 728 | 0x00, // 729 | 0xF8, // ##### 730 | 731 | // @512 '`' (5 pixels wide) 732 | 0x20, // # 733 | 0x10, // # 734 | 0x00, // 735 | 0x00, // 736 | 0x00, // 737 | 0x00, // 738 | 0x00, // 739 | 0x00, // 740 | 741 | // @520 'a' (5 pixels wide) 742 | 0x00, // 743 | 0x00, // 744 | 0x30, // ## 745 | 0x10, // # 746 | 0x70, // ### 747 | 0x78, // #### 748 | 0x00, // 749 | 0x00, // 750 | 751 | // @528 'b' (5 pixels wide) 752 | 0xC0, // ## 753 | 0x40, // # 754 | 0x70, // ### 755 | 0x48, // # # 756 | 0x48, // # # 757 | 0xF0, // #### 758 | 0x00, // 759 | 0x00, // 760 | 761 | // @536 'c' (5 pixels wide) 762 | 0x00, // 763 | 0x00, // 764 | 0x70, // ### 765 | 0x40, // # 766 | 0x40, // # 767 | 0x70, // ### 768 | 0x00, // 769 | 0x00, // 770 | 771 | // @544 'd' (5 pixels wide) 772 | 0x18, // ## 773 | 0x08, // # 774 | 0x38, // ### 775 | 0x48, // # # 776 | 0x48, // # # 777 | 0x38, // ### 778 | 0x00, // 779 | 0x00, // 780 | 781 | // @552 'e' (5 pixels wide) 782 | 0x00, // 783 | 0x00, // 784 | 0x70, // ### 785 | 0x70, // ### 786 | 0x40, // # 787 | 0x30, // ## 788 | 0x00, // 789 | 0x00, // 790 | 791 | // @560 'f' (5 pixels wide) 792 | 0x10, // # 793 | 0x20, // # 794 | 0x70, // ### 795 | 0x20, // # 796 | 0x20, // # 797 | 0x70, // ### 798 | 0x00, // 799 | 0x00, // 800 | 801 | // @568 'g' (5 pixels wide) 802 | 0x00, // 803 | 0x00, // 804 | 0x38, // ### 805 | 0x48, // # # 806 | 0x48, // # # 807 | 0x38, // ### 808 | 0x08, // # 809 | 0x30, // ## 810 | 811 | // @576 'h' (5 pixels wide) 812 | 0xC0, // ## 813 | 0x40, // # 814 | 0x70, // ### 815 | 0x48, // # # 816 | 0x48, // # # 817 | 0xE8, // ### # 818 | 0x00, // 819 | 0x00, // 820 | 821 | // @584 'i' (5 pixels wide) 822 | 0x20, // # 823 | 0x00, // 824 | 0x60, // ## 825 | 0x20, // # 826 | 0x20, // # 827 | 0x70, // ### 828 | 0x00, // 829 | 0x00, // 830 | 831 | // @592 'j' (5 pixels wide) 832 | 0x20, // # 833 | 0x00, // 834 | 0x70, // ### 835 | 0x10, // # 836 | 0x10, // # 837 | 0x10, // # 838 | 0x10, // # 839 | 0x70, // ### 840 | 841 | // @600 'k' (5 pixels wide) 842 | 0xC0, // ## 843 | 0x40, // # 844 | 0x58, // # ## 845 | 0x70, // ### 846 | 0x50, // # # 847 | 0xD8, // ## ## 848 | 0x00, // 849 | 0x00, // 850 | 851 | // @608 'l' (5 pixels wide) 852 | 0x60, // ## 853 | 0x20, // # 854 | 0x20, // # 855 | 0x20, // # 856 | 0x20, // # 857 | 0x70, // ### 858 | 0x00, // 859 | 0x00, // 860 | 861 | // @616 'm' (5 pixels wide) 862 | 0x00, // 863 | 0x00, // 864 | 0xD0, // ## # 865 | 0xA8, // # # # 866 | 0xA8, // # # # 867 | 0xA8, // # # # 868 | 0x00, // 869 | 0x00, // 870 | 871 | // @624 'n' (5 pixels wide) 872 | 0x00, // 873 | 0x00, // 874 | 0xF0, // #### 875 | 0x48, // # # 876 | 0x48, // # # 877 | 0xC8, // ## # 878 | 0x00, // 879 | 0x00, // 880 | 881 | // @632 'o' (5 pixels wide) 882 | 0x00, // 883 | 0x00, // 884 | 0x30, // ## 885 | 0x48, // # # 886 | 0x48, // # # 887 | 0x30, // ## 888 | 0x00, // 889 | 0x00, // 890 | 891 | // @640 'p' (5 pixels wide) 892 | 0x00, // 893 | 0x00, // 894 | 0xF0, // #### 895 | 0x48, // # # 896 | 0x48, // # # 897 | 0x70, // ### 898 | 0x40, // # 899 | 0xE0, // ### 900 | 901 | // @648 'q' (5 pixels wide) 902 | 0x00, // 903 | 0x00, // 904 | 0x38, // ### 905 | 0x48, // # # 906 | 0x48, // # # 907 | 0x38, // ### 908 | 0x08, // # 909 | 0x18, // ## 910 | 911 | // @656 'r' (5 pixels wide) 912 | 0x00, // 913 | 0x00, // 914 | 0x78, // #### 915 | 0x20, // # 916 | 0x20, // # 917 | 0x70, // ### 918 | 0x00, // 919 | 0x00, // 920 | 921 | // @664 's' (5 pixels wide) 922 | 0x00, // 923 | 0x00, // 924 | 0x30, // ## 925 | 0x20, // # 926 | 0x10, // # 927 | 0x60, // ## 928 | 0x00, // 929 | 0x00, // 930 | 931 | // @672 't' (5 pixels wide) 932 | 0x00, // 933 | 0x40, // # 934 | 0xF0, // #### 935 | 0x40, // # 936 | 0x48, // # # 937 | 0x30, // ## 938 | 0x00, // 939 | 0x00, // 940 | 941 | // @680 'u' (5 pixels wide) 942 | 0x00, // 943 | 0x00, // 944 | 0xD8, // ## ## 945 | 0x48, // # # 946 | 0x48, // # # 947 | 0x38, // ### 948 | 0x00, // 949 | 0x00, // 950 | 951 | // @688 'v' (5 pixels wide) 952 | 0x00, // 953 | 0x00, // 954 | 0xC8, // ## # 955 | 0x48, // # # 956 | 0x30, // ## 957 | 0x30, // ## 958 | 0x00, // 959 | 0x00, // 960 | 961 | // @696 'w' (5 pixels wide) 962 | 0x00, // 963 | 0x00, // 964 | 0xD8, // ## ## 965 | 0xA8, // # # # 966 | 0xA8, // # # # 967 | 0x50, // # # 968 | 0x00, // 969 | 0x00, // 970 | 971 | // @704 'x' (5 pixels wide) 972 | 0x00, // 973 | 0x00, // 974 | 0x48, // # # 975 | 0x30, // ## 976 | 0x30, // ## 977 | 0x48, // # # 978 | 0x00, // 979 | 0x00, // 980 | 981 | // @712 'y' (5 pixels wide) 982 | 0x00, // 983 | 0x00, // 984 | 0xD8, // ## ## 985 | 0x50, // # # 986 | 0x50, // # # 987 | 0x20, // # 988 | 0x20, // # 989 | 0x60, // ## 990 | 991 | // @720 'z' (5 pixels wide) 992 | 0x00, // 993 | 0x00, // 994 | 0x78, // #### 995 | 0x50, // # # 996 | 0x28, // # # 997 | 0x78, // #### 998 | 0x00, // 999 | 0x00, // 1000 | 1001 | // @728 '{' (5 pixels wide) 1002 | 0x10, // # 1003 | 0x20, // # 1004 | 0x20, // # 1005 | 0x60, // ## 1006 | 0x20, // # 1007 | 0x20, // # 1008 | 0x10, // # 1009 | 0x00, // 1010 | 1011 | // @736 '|' (5 pixels wide) 1012 | 0x20, // # 1013 | 0x20, // # 1014 | 0x20, // # 1015 | 0x20, // # 1016 | 0x20, // # 1017 | 0x20, // # 1018 | 0x20, // # 1019 | 0x00, // 1020 | 1021 | // @744 '}' (5 pixels wide) 1022 | 0x40, // # 1023 | 0x20, // # 1024 | 0x20, // # 1025 | 0x30, // ## 1026 | 0x20, // # 1027 | 0x20, // # 1028 | 0x40, // # 1029 | 0x00, // 1030 | 1031 | // @752 '~' (5 pixels wide) 1032 | 0x00, // 1033 | 0x00, // 1034 | 0x00, // 1035 | 0x28, // # # 1036 | 0x50, // # # 1037 | 0x00, // 1038 | 0x00, // 1039 | 0x00, // 1040 | }; 1041 | 1042 | sFONT Font8 = { 1043 | /* 1044 | * pixel_wXpixel_h = char_wXchar_h 1045 | * 160x128 = 32x16 1046 | * 128x160 = 25x20 1047 | */ 1048 | 1049 | Font8_Table, 1050 | 5, /* Width */ 1051 | 8, /* Height */ 1052 | 1, /* Size = bytes per pixel row */ 1053 | }; 1054 | 1055 | /** 1056 | * @} 1057 | */ 1058 | 1059 | 1060 | /** @defgroup FONTS_Private_Function_Prototypes 1061 | * @{ 1062 | */ 1063 | /** 1064 | * @} 1065 | */ 1066 | 1067 | 1068 | /** @defgroup FONTS_Private_Functions 1069 | * @{ 1070 | */ 1071 | 1072 | /** 1073 | * @} 1074 | */ 1075 | 1076 | /** 1077 | * @} 1078 | */ 1079 | 1080 | /** 1081 | * @} 1082 | */ 1083 | 1084 | /** 1085 | * @} 1086 | */ 1087 | 1088 | /** 1089 | * @} 1090 | */ 1091 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 1092 | -------------------------------------------------------------------------------- /1-HOWTO/font12.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file Font12.c 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 18-February-2014 7 | * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2014 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Includes ------------------------------------------------------------------*/ 39 | #include "fonts.h" 40 | 41 | /** @addtogroup Utilities 42 | * @{ 43 | */ 44 | 45 | /** @addtogroup STM32_EVAL 46 | * @{ 47 | */ 48 | 49 | /** @addtogroup Common 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup FONTS 54 | * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. 55 | * @{ 56 | */ 57 | 58 | /** @defgroup FONTS_Private_Types 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | 66 | /** @defgroup FONTS_Private_Defines 67 | * @{ 68 | */ 69 | /** 70 | * @} 71 | */ 72 | 73 | 74 | /** @defgroup FONTS_Private_Macros 75 | * @{ 76 | */ 77 | /** 78 | * @} 79 | */ 80 | 81 | 82 | /** @defgroup FONTS_Private_Variables 83 | * @{ 84 | */ 85 | // 86 | // Font data for Courier New 12pt 87 | // 88 | 89 | const uint8_t Font12_Table[] = 90 | { 91 | // @0 ' ' (7 pixels wide) 92 | 0x00, // 93 | 0x00, // 94 | 0x00, // 95 | 0x00, // 96 | 0x00, // 97 | 0x00, // 98 | 0x00, // 99 | 0x00, // 100 | 0x00, // 101 | 0x00, // 102 | 0x00, // 103 | 0x00, // 104 | 105 | // @12 '!' (7 pixels wide) 106 | 0x00, // 107 | 0x10, // # 108 | 0x10, // # 109 | 0x10, // # 110 | 0x10, // # 111 | 0x10, // # 112 | 0x00, // 113 | 0x00, // 114 | 0x10, // # 115 | 0x00, // 116 | 0x00, // 117 | 0x00, // 118 | 119 | // @24 '"' (7 pixels wide) 120 | 0x00, // 121 | 0x6C, // ## ## 122 | 0x48, // # # 123 | 0x48, // # # 124 | 0x00, // 125 | 0x00, // 126 | 0x00, // 127 | 0x00, // 128 | 0x00, // 129 | 0x00, // 130 | 0x00, // 131 | 0x00, // 132 | 133 | // @36 '#' (7 pixels wide) 134 | 0x00, // 135 | 0x14, // # # 136 | 0x14, // # # 137 | 0x28, // # # 138 | 0x7C, // ##### 139 | 0x28, // # # 140 | 0x7C, // ##### 141 | 0x28, // # # 142 | 0x50, // # # 143 | 0x50, // # # 144 | 0x00, // 145 | 0x00, // 146 | 147 | // @48 '$' (7 pixels wide) 148 | 0x00, // 149 | 0x10, // # 150 | 0x38, // ### 151 | 0x40, // # 152 | 0x40, // # 153 | 0x38, // ### 154 | 0x48, // # # 155 | 0x70, // ### 156 | 0x10, // # 157 | 0x10, // # 158 | 0x00, // 159 | 0x00, // 160 | 161 | // @60 '%' (7 pixels wide) 162 | 0x00, // 163 | 0x20, // # 164 | 0x50, // # # 165 | 0x20, // # 166 | 0x0C, // ## 167 | 0x70, // ### 168 | 0x08, // # 169 | 0x14, // # # 170 | 0x08, // # 171 | 0x00, // 172 | 0x00, // 173 | 0x00, // 174 | 175 | // @72 '&' (7 pixels wide) 176 | 0x00, // 177 | 0x00, // 178 | 0x00, // 179 | 0x18, // ## 180 | 0x20, // # 181 | 0x20, // # 182 | 0x54, // # # # 183 | 0x48, // # # 184 | 0x34, // ## # 185 | 0x00, // 186 | 0x00, // 187 | 0x00, // 188 | 189 | // @84 ''' (7 pixels wide) 190 | 0x00, // 191 | 0x10, // # 192 | 0x10, // # 193 | 0x10, // # 194 | 0x10, // # 195 | 0x00, // 196 | 0x00, // 197 | 0x00, // 198 | 0x00, // 199 | 0x00, // 200 | 0x00, // 201 | 0x00, // 202 | 203 | // @96 '(' (7 pixels wide) 204 | 0x00, // 205 | 0x08, // # 206 | 0x08, // # 207 | 0x10, // # 208 | 0x10, // # 209 | 0x10, // # 210 | 0x10, // # 211 | 0x10, // # 212 | 0x10, // # 213 | 0x08, // # 214 | 0x08, // # 215 | 0x00, // 216 | 217 | // @108 ')' (7 pixels wide) 218 | 0x00, // 219 | 0x20, // # 220 | 0x20, // # 221 | 0x10, // # 222 | 0x10, // # 223 | 0x10, // # 224 | 0x10, // # 225 | 0x10, // # 226 | 0x10, // # 227 | 0x20, // # 228 | 0x20, // # 229 | 0x00, // 230 | 231 | // @120 '*' (7 pixels wide) 232 | 0x00, // 233 | 0x10, // # 234 | 0x7C, // ##### 235 | 0x10, // # 236 | 0x28, // # # 237 | 0x28, // # # 238 | 0x00, // 239 | 0x00, // 240 | 0x00, // 241 | 0x00, // 242 | 0x00, // 243 | 0x00, // 244 | 245 | // @132 '+' (7 pixels wide) 246 | 0x00, // 247 | 0x00, // 248 | 0x10, // # 249 | 0x10, // # 250 | 0x10, // # 251 | 0xFE, // ####### 252 | 0x10, // # 253 | 0x10, // # 254 | 0x10, // # 255 | 0x00, // 256 | 0x00, // 257 | 0x00, // 258 | 259 | // @144 ',' (7 pixels wide) 260 | 0x00, // 261 | 0x00, // 262 | 0x00, // 263 | 0x00, // 264 | 0x00, // 265 | 0x00, // 266 | 0x00, // 267 | 0x18, // ## 268 | 0x10, // # 269 | 0x30, // ## 270 | 0x20, // # 271 | 0x00, // 272 | 273 | // @156 '-' (7 pixels wide) 274 | 0x00, // 275 | 0x00, // 276 | 0x00, // 277 | 0x00, // 278 | 0x00, // 279 | 0x7C, // ##### 280 | 0x00, // 281 | 0x00, // 282 | 0x00, // 283 | 0x00, // 284 | 0x00, // 285 | 0x00, // 286 | 287 | // @168 '.' (7 pixels wide) 288 | 0x00, // 289 | 0x00, // 290 | 0x00, // 291 | 0x00, // 292 | 0x00, // 293 | 0x00, // 294 | 0x00, // 295 | 0x30, // ## 296 | 0x30, // ## 297 | 0x00, // 298 | 0x00, // 299 | 0x00, // 300 | 301 | // @180 '/' (7 pixels wide) 302 | 0x00, // 303 | 0x04, // # 304 | 0x04, // # 305 | 0x08, // # 306 | 0x08, // # 307 | 0x10, // # 308 | 0x10, // # 309 | 0x20, // # 310 | 0x20, // # 311 | 0x40, // # 312 | 0x00, // 313 | 0x00, // 314 | 315 | // @192 '0' (7 pixels wide) 316 | 0x00, // 317 | 0x38, // ### 318 | 0x44, // # # 319 | 0x44, // # # 320 | 0x44, // # # 321 | 0x44, // # # 322 | 0x44, // # # 323 | 0x44, // # # 324 | 0x38, // ### 325 | 0x00, // 326 | 0x00, // 327 | 0x00, // 328 | 329 | // @204 '1' (7 pixels wide) 330 | 0x00, // 331 | 0x30, // ## 332 | 0x10, // # 333 | 0x10, // # 334 | 0x10, // # 335 | 0x10, // # 336 | 0x10, // # 337 | 0x10, // # 338 | 0x7C, // ##### 339 | 0x00, // 340 | 0x00, // 341 | 0x00, // 342 | 343 | // @216 '2' (7 pixels wide) 344 | 0x00, // 345 | 0x38, // ### 346 | 0x44, // # # 347 | 0x04, // # 348 | 0x08, // # 349 | 0x10, // # 350 | 0x20, // # 351 | 0x44, // # # 352 | 0x7C, // ##### 353 | 0x00, // 354 | 0x00, // 355 | 0x00, // 356 | 357 | // @228 '3' (7 pixels wide) 358 | 0x00, // 359 | 0x38, // ### 360 | 0x44, // # # 361 | 0x04, // # 362 | 0x18, // ## 363 | 0x04, // # 364 | 0x04, // # 365 | 0x44, // # # 366 | 0x38, // ### 367 | 0x00, // 368 | 0x00, // 369 | 0x00, // 370 | 371 | // @240 '4' (7 pixels wide) 372 | 0x00, // 373 | 0x0C, // ## 374 | 0x14, // # # 375 | 0x14, // # # 376 | 0x24, // # # 377 | 0x44, // # # 378 | 0x7E, // ###### 379 | 0x04, // # 380 | 0x0E, // ### 381 | 0x00, // 382 | 0x00, // 383 | 0x00, // 384 | 385 | // @252 '5' (7 pixels wide) 386 | 0x00, // 387 | 0x3C, // #### 388 | 0x20, // # 389 | 0x20, // # 390 | 0x38, // ### 391 | 0x04, // # 392 | 0x04, // # 393 | 0x44, // # # 394 | 0x38, // ### 395 | 0x00, // 396 | 0x00, // 397 | 0x00, // 398 | 399 | // @264 '6' (7 pixels wide) 400 | 0x00, // 401 | 0x1C, // ### 402 | 0x20, // # 403 | 0x40, // # 404 | 0x78, // #### 405 | 0x44, // # # 406 | 0x44, // # # 407 | 0x44, // # # 408 | 0x38, // ### 409 | 0x00, // 410 | 0x00, // 411 | 0x00, // 412 | 413 | // @276 '7' (7 pixels wide) 414 | 0x00, // 415 | 0x7C, // ##### 416 | 0x44, // # # 417 | 0x04, // # 418 | 0x08, // # 419 | 0x08, // # 420 | 0x08, // # 421 | 0x10, // # 422 | 0x10, // # 423 | 0x00, // 424 | 0x00, // 425 | 0x00, // 426 | 427 | // @288 '8' (7 pixels wide) 428 | 0x00, // 429 | 0x38, // ### 430 | 0x44, // # # 431 | 0x44, // # # 432 | 0x38, // ### 433 | 0x44, // # # 434 | 0x44, // # # 435 | 0x44, // # # 436 | 0x38, // ### 437 | 0x00, // 438 | 0x00, // 439 | 0x00, // 440 | 441 | // @300 '9' (7 pixels wide) 442 | 0x00, // 443 | 0x38, // ### 444 | 0x44, // # # 445 | 0x44, // # # 446 | 0x44, // # # 447 | 0x3C, // #### 448 | 0x04, // # 449 | 0x08, // # 450 | 0x70, // ### 451 | 0x00, // 452 | 0x00, // 453 | 0x00, // 454 | 455 | // @312 ':' (7 pixels wide) 456 | 0x00, // 457 | 0x00, // 458 | 0x00, // 459 | 0x30, // ## 460 | 0x30, // ## 461 | 0x00, // 462 | 0x00, // 463 | 0x30, // ## 464 | 0x30, // ## 465 | 0x00, // 466 | 0x00, // 467 | 0x00, // 468 | 469 | // @324 ';' (7 pixels wide) 470 | 0x00, // 471 | 0x00, // 472 | 0x00, // 473 | 0x18, // ## 474 | 0x18, // ## 475 | 0x00, // 476 | 0x00, // 477 | 0x18, // ## 478 | 0x30, // ## 479 | 0x20, // # 480 | 0x00, // 481 | 0x00, // 482 | 483 | // @336 '<' (7 pixels wide) 484 | 0x00, // 485 | 0x00, // 486 | 0x0C, // ## 487 | 0x10, // # 488 | 0x60, // ## 489 | 0x80, // # 490 | 0x60, // ## 491 | 0x10, // # 492 | 0x0C, // ## 493 | 0x00, // 494 | 0x00, // 495 | 0x00, // 496 | 497 | // @348 '=' (7 pixels wide) 498 | 0x00, // 499 | 0x00, // 500 | 0x00, // 501 | 0x00, // 502 | 0x7C, // ##### 503 | 0x00, // 504 | 0x7C, // ##### 505 | 0x00, // 506 | 0x00, // 507 | 0x00, // 508 | 0x00, // 509 | 0x00, // 510 | 511 | // @360 '>' (7 pixels wide) 512 | 0x00, // 513 | 0x00, // 514 | 0xC0, // ## 515 | 0x20, // # 516 | 0x18, // ## 517 | 0x04, // # 518 | 0x18, // ## 519 | 0x20, // # 520 | 0xC0, // ## 521 | 0x00, // 522 | 0x00, // 523 | 0x00, // 524 | 525 | // @372 '?' (7 pixels wide) 526 | 0x00, // 527 | 0x00, // 528 | 0x18, // ## 529 | 0x24, // # # 530 | 0x04, // # 531 | 0x08, // # 532 | 0x10, // # 533 | 0x00, // 534 | 0x30, // ## 535 | 0x00, // 536 | 0x00, // 537 | 0x00, // 538 | 539 | // @384 '@' (7 pixels wide) 540 | 0x38, // ### 541 | 0x44, // # # 542 | 0x44, // # # 543 | 0x4C, // # ## 544 | 0x54, // # # # 545 | 0x54, // # # # 546 | 0x4C, // # ## 547 | 0x40, // # 548 | 0x44, // # # 549 | 0x38, // ### 550 | 0x00, // 551 | 0x00, // 552 | 553 | // @396 'A' (7 pixels wide) 554 | 0x00, // 555 | 0x30, // ## 556 | 0x10, // # 557 | 0x28, // # # 558 | 0x28, // # # 559 | 0x28, // # # 560 | 0x7C, // ##### 561 | 0x44, // # # 562 | 0xEE, // ### ### 563 | 0x00, // 564 | 0x00, // 565 | 0x00, // 566 | 567 | // @408 'B' (7 pixels wide) 568 | 0x00, // 569 | 0xF8, // ##### 570 | 0x44, // # # 571 | 0x44, // # # 572 | 0x78, // #### 573 | 0x44, // # # 574 | 0x44, // # # 575 | 0x44, // # # 576 | 0xF8, // ##### 577 | 0x00, // 578 | 0x00, // 579 | 0x00, // 580 | 581 | // @420 'C' (7 pixels wide) 582 | 0x00, // 583 | 0x3C, // #### 584 | 0x44, // # # 585 | 0x40, // # 586 | 0x40, // # 587 | 0x40, // # 588 | 0x40, // # 589 | 0x44, // # # 590 | 0x38, // ### 591 | 0x00, // 592 | 0x00, // 593 | 0x00, // 594 | 595 | // @432 'D' (7 pixels wide) 596 | 0x00, // 597 | 0xF0, // #### 598 | 0x48, // # # 599 | 0x44, // # # 600 | 0x44, // # # 601 | 0x44, // # # 602 | 0x44, // # # 603 | 0x48, // # # 604 | 0xF0, // #### 605 | 0x00, // 606 | 0x00, // 607 | 0x00, // 608 | 609 | // @444 'E' (7 pixels wide) 610 | 0x00, // 611 | 0xFC, // ###### 612 | 0x44, // # # 613 | 0x50, // # # 614 | 0x70, // ### 615 | 0x50, // # # 616 | 0x40, // # 617 | 0x44, // # # 618 | 0xFC, // ###### 619 | 0x00, // 620 | 0x00, // 621 | 0x00, // 622 | 623 | // @456 'F' (7 pixels wide) 624 | 0x00, // 625 | 0x7E, // ###### 626 | 0x22, // # # 627 | 0x28, // # # 628 | 0x38, // ### 629 | 0x28, // # # 630 | 0x20, // # 631 | 0x20, // # 632 | 0x70, // ### 633 | 0x00, // 634 | 0x00, // 635 | 0x00, // 636 | 637 | // @468 'G' (7 pixels wide) 638 | 0x00, // 639 | 0x3C, // #### 640 | 0x44, // # # 641 | 0x40, // # 642 | 0x40, // # 643 | 0x4E, // # ### 644 | 0x44, // # # 645 | 0x44, // # # 646 | 0x38, // ### 647 | 0x00, // 648 | 0x00, // 649 | 0x00, // 650 | 651 | // @480 'H' (7 pixels wide) 652 | 0x00, // 653 | 0xEE, // ### ### 654 | 0x44, // # # 655 | 0x44, // # # 656 | 0x7C, // ##### 657 | 0x44, // # # 658 | 0x44, // # # 659 | 0x44, // # # 660 | 0xEE, // ### ### 661 | 0x00, // 662 | 0x00, // 663 | 0x00, // 664 | 665 | // @492 'I' (7 pixels wide) 666 | 0x00, // 667 | 0x7C, // ##### 668 | 0x10, // # 669 | 0x10, // # 670 | 0x10, // # 671 | 0x10, // # 672 | 0x10, // # 673 | 0x10, // # 674 | 0x7C, // ##### 675 | 0x00, // 676 | 0x00, // 677 | 0x00, // 678 | 679 | // @504 'J' (7 pixels wide) 680 | 0x00, // 681 | 0x3C, // #### 682 | 0x08, // # 683 | 0x08, // # 684 | 0x08, // # 685 | 0x48, // # # 686 | 0x48, // # # 687 | 0x48, // # # 688 | 0x30, // ## 689 | 0x00, // 690 | 0x00, // 691 | 0x00, // 692 | 693 | // @516 'K' (7 pixels wide) 694 | 0x00, // 695 | 0xEE, // ### ### 696 | 0x44, // # # 697 | 0x48, // # # 698 | 0x50, // # # 699 | 0x70, // ### 700 | 0x48, // # # 701 | 0x44, // # # 702 | 0xE6, // ### ## 703 | 0x00, // 704 | 0x00, // 705 | 0x00, // 706 | 707 | // @528 'L' (7 pixels wide) 708 | 0x00, // 709 | 0x70, // ### 710 | 0x20, // # 711 | 0x20, // # 712 | 0x20, // # 713 | 0x20, // # 714 | 0x24, // # # 715 | 0x24, // # # 716 | 0x7C, // ##### 717 | 0x00, // 718 | 0x00, // 719 | 0x00, // 720 | 721 | // @540 'M' (7 pixels wide) 722 | 0x00, // 723 | 0xEE, // ### ### 724 | 0x6C, // ## ## 725 | 0x6C, // ## ## 726 | 0x54, // # # # 727 | 0x54, // # # # 728 | 0x44, // # # 729 | 0x44, // # # 730 | 0xEE, // ### ### 731 | 0x00, // 732 | 0x00, // 733 | 0x00, // 734 | 735 | // @552 'N' (7 pixels wide) 736 | 0x00, // 737 | 0xEE, // ### ### 738 | 0x64, // ## # 739 | 0x64, // ## # 740 | 0x54, // # # # 741 | 0x54, // # # # 742 | 0x54, // # # # 743 | 0x4C, // # ## 744 | 0xEC, // ### ## 745 | 0x00, // 746 | 0x00, // 747 | 0x00, // 748 | 749 | // @564 'O' (7 pixels wide) 750 | 0x00, // 751 | 0x38, // ### 752 | 0x44, // # # 753 | 0x44, // # # 754 | 0x44, // # # 755 | 0x44, // # # 756 | 0x44, // # # 757 | 0x44, // # # 758 | 0x38, // ### 759 | 0x00, // 760 | 0x00, // 761 | 0x00, // 762 | 763 | // @576 'P' (7 pixels wide) 764 | 0x00, // 765 | 0x78, // #### 766 | 0x24, // # # 767 | 0x24, // # # 768 | 0x24, // # # 769 | 0x38, // ### 770 | 0x20, // # 771 | 0x20, // # 772 | 0x70, // ### 773 | 0x00, // 774 | 0x00, // 775 | 0x00, // 776 | 777 | // @588 'Q' (7 pixels wide) 778 | 0x00, // 779 | 0x38, // ### 780 | 0x44, // # # 781 | 0x44, // # # 782 | 0x44, // # # 783 | 0x44, // # # 784 | 0x44, // # # 785 | 0x44, // # # 786 | 0x38, // ### 787 | 0x1C, // ### 788 | 0x00, // 789 | 0x00, // 790 | 791 | // @600 'R' (7 pixels wide) 792 | 0x00, // 793 | 0xF8, // ##### 794 | 0x44, // # # 795 | 0x44, // # # 796 | 0x44, // # # 797 | 0x78, // #### 798 | 0x48, // # # 799 | 0x44, // # # 800 | 0xE2, // ### # 801 | 0x00, // 802 | 0x00, // 803 | 0x00, // 804 | 805 | // @612 'S' (7 pixels wide) 806 | 0x00, // 807 | 0x34, // ## # 808 | 0x4C, // # ## 809 | 0x40, // # 810 | 0x38, // ### 811 | 0x04, // # 812 | 0x04, // # 813 | 0x64, // ## # 814 | 0x58, // # ## 815 | 0x00, // 816 | 0x00, // 817 | 0x00, // 818 | 819 | // @624 'T' (7 pixels wide) 820 | 0x00, // 821 | 0xFE, // ####### 822 | 0x92, // # # # 823 | 0x10, // # 824 | 0x10, // # 825 | 0x10, // # 826 | 0x10, // # 827 | 0x10, // # 828 | 0x38, // ### 829 | 0x00, // 830 | 0x00, // 831 | 0x00, // 832 | 833 | // @636 'U' (7 pixels wide) 834 | 0x00, // 835 | 0xEE, // ### ### 836 | 0x44, // # # 837 | 0x44, // # # 838 | 0x44, // # # 839 | 0x44, // # # 840 | 0x44, // # # 841 | 0x44, // # # 842 | 0x38, // ### 843 | 0x00, // 844 | 0x00, // 845 | 0x00, // 846 | 847 | // @648 'V' (7 pixels wide) 848 | 0x00, // 849 | 0xEE, // ### ### 850 | 0x44, // # # 851 | 0x44, // # # 852 | 0x28, // # # 853 | 0x28, // # # 854 | 0x28, // # # 855 | 0x10, // # 856 | 0x10, // # 857 | 0x00, // 858 | 0x00, // 859 | 0x00, // 860 | 861 | // @660 'W' (7 pixels wide) 862 | 0x00, // 863 | 0xEE, // ### ### 864 | 0x44, // # # 865 | 0x44, // # # 866 | 0x54, // # # # 867 | 0x54, // # # # 868 | 0x54, // # # # 869 | 0x54, // # # # 870 | 0x28, // # # 871 | 0x00, // 872 | 0x00, // 873 | 0x00, // 874 | 875 | // @672 'X' (7 pixels wide) 876 | 0x00, // 877 | 0xC6, // ## ## 878 | 0x44, // # # 879 | 0x28, // # # 880 | 0x10, // # 881 | 0x10, // # 882 | 0x28, // # # 883 | 0x44, // # # 884 | 0xC6, // ## ## 885 | 0x00, // 886 | 0x00, // 887 | 0x00, // 888 | 889 | // @684 'Y' (7 pixels wide) 890 | 0x00, // 891 | 0xEE, // ### ### 892 | 0x44, // # # 893 | 0x28, // # # 894 | 0x28, // # # 895 | 0x10, // # 896 | 0x10, // # 897 | 0x10, // # 898 | 0x38, // ### 899 | 0x00, // 900 | 0x00, // 901 | 0x00, // 902 | 903 | // @696 'Z' (7 pixels wide) 904 | 0x00, // 905 | 0x7C, // ##### 906 | 0x44, // # # 907 | 0x08, // # 908 | 0x10, // # 909 | 0x10, // # 910 | 0x20, // # 911 | 0x44, // # # 912 | 0x7C, // ##### 913 | 0x00, // 914 | 0x00, // 915 | 0x00, // 916 | 917 | // @708 '[' (7 pixels wide) 918 | 0x00, // 919 | 0x38, // ### 920 | 0x20, // # 921 | 0x20, // # 922 | 0x20, // # 923 | 0x20, // # 924 | 0x20, // # 925 | 0x20, // # 926 | 0x20, // # 927 | 0x20, // # 928 | 0x38, // ### 929 | 0x00, // 930 | 931 | // @720 '\' (7 pixels wide) 932 | 0x00, // 933 | 0x40, // # 934 | 0x20, // # 935 | 0x20, // # 936 | 0x20, // # 937 | 0x10, // # 938 | 0x10, // # 939 | 0x08, // # 940 | 0x08, // # 941 | 0x08, // # 942 | 0x00, // 943 | 0x00, // 944 | 945 | // @732 ']' (7 pixels wide) 946 | 0x00, // 947 | 0x38, // ### 948 | 0x08, // # 949 | 0x08, // # 950 | 0x08, // # 951 | 0x08, // # 952 | 0x08, // # 953 | 0x08, // # 954 | 0x08, // # 955 | 0x08, // # 956 | 0x38, // ### 957 | 0x00, // 958 | 959 | // @744 '^' (7 pixels wide) 960 | 0x00, // 961 | 0x10, // # 962 | 0x10, // # 963 | 0x28, // # # 964 | 0x44, // # # 965 | 0x00, // 966 | 0x00, // 967 | 0x00, // 968 | 0x00, // 969 | 0x00, // 970 | 0x00, // 971 | 0x00, // 972 | 973 | // @756 '_' (7 pixels wide) 974 | 0x00, // 975 | 0x00, // 976 | 0x00, // 977 | 0x00, // 978 | 0x00, // 979 | 0x00, // 980 | 0x00, // 981 | 0x00, // 982 | 0x00, // 983 | 0x00, // 984 | 0x00, // 985 | 0xFE, // ####### 986 | 987 | // @768 '`' (7 pixels wide) 988 | 0x00, // 989 | 0x10, // # 990 | 0x08, // # 991 | 0x00, // 992 | 0x00, // 993 | 0x00, // 994 | 0x00, // 995 | 0x00, // 996 | 0x00, // 997 | 0x00, // 998 | 0x00, // 999 | 0x00, // 1000 | 1001 | // @780 'a' (7 pixels wide) 1002 | 0x00, // 1003 | 0x00, // 1004 | 0x00, // 1005 | 0x38, // ### 1006 | 0x44, // # # 1007 | 0x3C, // #### 1008 | 0x44, // # # 1009 | 0x44, // # # 1010 | 0x3E, // ##### 1011 | 0x00, // 1012 | 0x00, // 1013 | 0x00, // 1014 | 1015 | // @792 'b' (7 pixels wide) 1016 | 0x00, // 1017 | 0xC0, // ## 1018 | 0x40, // # 1019 | 0x58, // # ## 1020 | 0x64, // ## # 1021 | 0x44, // # # 1022 | 0x44, // # # 1023 | 0x44, // # # 1024 | 0xF8, // ##### 1025 | 0x00, // 1026 | 0x00, // 1027 | 0x00, // 1028 | 1029 | // @804 'c' (7 pixels wide) 1030 | 0x00, // 1031 | 0x00, // 1032 | 0x00, // 1033 | 0x3C, // #### 1034 | 0x44, // # # 1035 | 0x40, // # 1036 | 0x40, // # 1037 | 0x44, // # # 1038 | 0x38, // ### 1039 | 0x00, // 1040 | 0x00, // 1041 | 0x00, // 1042 | 1043 | // @816 'd' (7 pixels wide) 1044 | 0x00, // 1045 | 0x0C, // ## 1046 | 0x04, // # 1047 | 0x34, // ## # 1048 | 0x4C, // # ## 1049 | 0x44, // # # 1050 | 0x44, // # # 1051 | 0x44, // # # 1052 | 0x3E, // ##### 1053 | 0x00, // 1054 | 0x00, // 1055 | 0x00, // 1056 | 1057 | // @828 'e' (7 pixels wide) 1058 | 0x00, // 1059 | 0x00, // 1060 | 0x00, // 1061 | 0x38, // ### 1062 | 0x44, // # # 1063 | 0x7C, // ##### 1064 | 0x40, // # 1065 | 0x40, // # 1066 | 0x3C, // #### 1067 | 0x00, // 1068 | 0x00, // 1069 | 0x00, // 1070 | 1071 | // @840 'f' (7 pixels wide) 1072 | 0x00, // 1073 | 0x1C, // ### 1074 | 0x20, // # 1075 | 0x7C, // ##### 1076 | 0x20, // # 1077 | 0x20, // # 1078 | 0x20, // # 1079 | 0x20, // # 1080 | 0x7C, // ##### 1081 | 0x00, // 1082 | 0x00, // 1083 | 0x00, // 1084 | 1085 | // @852 'g' (7 pixels wide) 1086 | 0x00, // 1087 | 0x00, // 1088 | 0x00, // 1089 | 0x36, // ## ## 1090 | 0x4C, // # ## 1091 | 0x44, // # # 1092 | 0x44, // # # 1093 | 0x44, // # # 1094 | 0x3C, // #### 1095 | 0x04, // # 1096 | 0x38, // ### 1097 | 0x00, // 1098 | 1099 | // @864 'h' (7 pixels wide) 1100 | 0x00, // 1101 | 0xC0, // ## 1102 | 0x40, // # 1103 | 0x58, // # ## 1104 | 0x64, // ## # 1105 | 0x44, // # # 1106 | 0x44, // # # 1107 | 0x44, // # # 1108 | 0xEE, // ### ### 1109 | 0x00, // 1110 | 0x00, // 1111 | 0x00, // 1112 | 1113 | // @876 'i' (7 pixels wide) 1114 | 0x00, // 1115 | 0x10, // # 1116 | 0x00, // 1117 | 0x70, // ### 1118 | 0x10, // # 1119 | 0x10, // # 1120 | 0x10, // # 1121 | 0x10, // # 1122 | 0x7C, // ##### 1123 | 0x00, // 1124 | 0x00, // 1125 | 0x00, // 1126 | 1127 | // @888 'j' (7 pixels wide) 1128 | 0x00, // 1129 | 0x10, // # 1130 | 0x00, // 1131 | 0x78, // #### 1132 | 0x08, // # 1133 | 0x08, // # 1134 | 0x08, // # 1135 | 0x08, // # 1136 | 0x08, // # 1137 | 0x08, // # 1138 | 0x70, // ### 1139 | 0x00, // 1140 | 1141 | // @900 'k' (7 pixels wide) 1142 | 0x00, // 1143 | 0xC0, // ## 1144 | 0x40, // # 1145 | 0x5C, // # ### 1146 | 0x48, // # # 1147 | 0x70, // ### 1148 | 0x50, // # # 1149 | 0x48, // # # 1150 | 0xDC, // ## ### 1151 | 0x00, // 1152 | 0x00, // 1153 | 0x00, // 1154 | 1155 | // @912 'l' (7 pixels wide) 1156 | 0x00, // 1157 | 0x30, // ## 1158 | 0x10, // # 1159 | 0x10, // # 1160 | 0x10, // # 1161 | 0x10, // # 1162 | 0x10, // # 1163 | 0x10, // # 1164 | 0x7C, // ##### 1165 | 0x00, // 1166 | 0x00, // 1167 | 0x00, // 1168 | 1169 | // @924 'm' (7 pixels wide) 1170 | 0x00, // 1171 | 0x00, // 1172 | 0x00, // 1173 | 0xE8, // ### # 1174 | 0x54, // # # # 1175 | 0x54, // # # # 1176 | 0x54, // # # # 1177 | 0x54, // # # # 1178 | 0xFE, // ####### 1179 | 0x00, // 1180 | 0x00, // 1181 | 0x00, // 1182 | 1183 | // @936 'n' (7 pixels wide) 1184 | 0x00, // 1185 | 0x00, // 1186 | 0x00, // 1187 | 0xD8, // ## ## 1188 | 0x64, // ## # 1189 | 0x44, // # # 1190 | 0x44, // # # 1191 | 0x44, // # # 1192 | 0xEE, // ### ### 1193 | 0x00, // 1194 | 0x00, // 1195 | 0x00, // 1196 | 1197 | // @948 'o' (7 pixels wide) 1198 | 0x00, // 1199 | 0x00, // 1200 | 0x00, // 1201 | 0x38, // ### 1202 | 0x44, // # # 1203 | 0x44, // # # 1204 | 0x44, // # # 1205 | 0x44, // # # 1206 | 0x38, // ### 1207 | 0x00, // 1208 | 0x00, // 1209 | 0x00, // 1210 | 1211 | // @960 'p' (7 pixels wide) 1212 | 0x00, // 1213 | 0x00, // 1214 | 0x00, // 1215 | 0xD8, // ## ## 1216 | 0x64, // ## # 1217 | 0x44, // # # 1218 | 0x44, // # # 1219 | 0x44, // # # 1220 | 0x78, // #### 1221 | 0x40, // # 1222 | 0xE0, // ### 1223 | 0x00, // 1224 | 1225 | // @972 'q' (7 pixels wide) 1226 | 0x00, // 1227 | 0x00, // 1228 | 0x00, // 1229 | 0x36, // ## ## 1230 | 0x4C, // # ## 1231 | 0x44, // # # 1232 | 0x44, // # # 1233 | 0x44, // # # 1234 | 0x3C, // #### 1235 | 0x04, // # 1236 | 0x0E, // ### 1237 | 0x00, // 1238 | 1239 | // @984 'r' (7 pixels wide) 1240 | 0x00, // 1241 | 0x00, // 1242 | 0x00, // 1243 | 0x6C, // ## ## 1244 | 0x30, // ## 1245 | 0x20, // # 1246 | 0x20, // # 1247 | 0x20, // # 1248 | 0x7C, // ##### 1249 | 0x00, // 1250 | 0x00, // 1251 | 0x00, // 1252 | 1253 | // @996 's' (7 pixels wide) 1254 | 0x00, // 1255 | 0x00, // 1256 | 0x00, // 1257 | 0x3C, // #### 1258 | 0x44, // # # 1259 | 0x38, // ### 1260 | 0x04, // # 1261 | 0x44, // # # 1262 | 0x78, // #### 1263 | 0x00, // 1264 | 0x00, // 1265 | 0x00, // 1266 | 1267 | // @1008 't' (7 pixels wide) 1268 | 0x00, // 1269 | 0x00, // 1270 | 0x20, // # 1271 | 0x7C, // ##### 1272 | 0x20, // # 1273 | 0x20, // # 1274 | 0x20, // # 1275 | 0x22, // # # 1276 | 0x1C, // ### 1277 | 0x00, // 1278 | 0x00, // 1279 | 0x00, // 1280 | 1281 | // @1020 'u' (7 pixels wide) 1282 | 0x00, // 1283 | 0x00, // 1284 | 0x00, // 1285 | 0xCC, // ## ## 1286 | 0x44, // # # 1287 | 0x44, // # # 1288 | 0x44, // # # 1289 | 0x4C, // # ## 1290 | 0x36, // ## ## 1291 | 0x00, // 1292 | 0x00, // 1293 | 0x00, // 1294 | 1295 | // @1032 'v' (7 pixels wide) 1296 | 0x00, // 1297 | 0x00, // 1298 | 0x00, // 1299 | 0xEE, // ### ### 1300 | 0x44, // # # 1301 | 0x44, // # # 1302 | 0x28, // # # 1303 | 0x28, // # # 1304 | 0x10, // # 1305 | 0x00, // 1306 | 0x00, // 1307 | 0x00, // 1308 | 1309 | // @1044 'w' (7 pixels wide) 1310 | 0x00, // 1311 | 0x00, // 1312 | 0x00, // 1313 | 0xEE, // ### ### 1314 | 0x44, // # # 1315 | 0x54, // # # # 1316 | 0x54, // # # # 1317 | 0x54, // # # # 1318 | 0x28, // # # 1319 | 0x00, // 1320 | 0x00, // 1321 | 0x00, // 1322 | 1323 | // @1056 'x' (7 pixels wide) 1324 | 0x00, // 1325 | 0x00, // 1326 | 0x00, // 1327 | 0xCC, // ## ## 1328 | 0x48, // # # 1329 | 0x30, // ## 1330 | 0x30, // ## 1331 | 0x48, // # # 1332 | 0xCC, // ## ## 1333 | 0x00, // 1334 | 0x00, // 1335 | 0x00, // 1336 | 1337 | // @1068 'y' (7 pixels wide) 1338 | 0x00, // 1339 | 0x00, // 1340 | 0x00, // 1341 | 0xEE, // ### ### 1342 | 0x44, // # # 1343 | 0x24, // # # 1344 | 0x28, // # # 1345 | 0x18, // ## 1346 | 0x10, // # 1347 | 0x10, // # 1348 | 0x78, // #### 1349 | 0x00, // 1350 | 1351 | // @1080 'z' (7 pixels wide) 1352 | 0x00, // 1353 | 0x00, // 1354 | 0x00, // 1355 | 0x7C, // ##### 1356 | 0x48, // # # 1357 | 0x10, // # 1358 | 0x20, // # 1359 | 0x44, // # # 1360 | 0x7C, // ##### 1361 | 0x00, // 1362 | 0x00, // 1363 | 0x00, // 1364 | 1365 | // @1092 '{' (7 pixels wide) 1366 | 0x00, // 1367 | 0x08, // # 1368 | 0x10, // # 1369 | 0x10, // # 1370 | 0x10, // # 1371 | 0x10, // # 1372 | 0x20, // # 1373 | 0x10, // # 1374 | 0x10, // # 1375 | 0x10, // # 1376 | 0x08, // # 1377 | 0x00, // 1378 | 1379 | // @1104 '|' (7 pixels wide) 1380 | 0x00, // 1381 | 0x10, // # 1382 | 0x10, // # 1383 | 0x10, // # 1384 | 0x10, // # 1385 | 0x10, // # 1386 | 0x10, // # 1387 | 0x10, // # 1388 | 0x10, // # 1389 | 0x10, // # 1390 | 0x00, // 1391 | 0x00, // 1392 | 1393 | // @1116 '}' (7 pixels wide) 1394 | 0x00, // 1395 | 0x20, // # 1396 | 0x10, // # 1397 | 0x10, // # 1398 | 0x10, // # 1399 | 0x10, // # 1400 | 0x08, // # 1401 | 0x10, // # 1402 | 0x10, // # 1403 | 0x10, // # 1404 | 0x20, // # 1405 | 0x00, // 1406 | 1407 | // @1128 '~' (7 pixels wide) 1408 | 0x00, // 1409 | 0x00, // 1410 | 0x00, // 1411 | 0x00, // 1412 | 0x00, // 1413 | 0x24, // # # 1414 | 0x58, // # ## 1415 | 0x00, // 1416 | 0x00, // 1417 | 0x00, // 1418 | 0x00, // 1419 | 0x00, // 1420 | }; 1421 | 1422 | sFONT Font12 = { 1423 | Font12_Table, 1424 | 7, /* Width */ 1425 | 12, /* Height */ 1426 | 1, /* Size = bytes per pixel row */ 1427 | }; 1428 | 1429 | /** 1430 | * @} 1431 | */ 1432 | 1433 | 1434 | /** @defgroup FONTS_Private_Function_Prototypes 1435 | * @{ 1436 | */ 1437 | /** 1438 | * @} 1439 | */ 1440 | 1441 | 1442 | /** @defgroup FONTS_Private_Functions 1443 | * @{ 1444 | */ 1445 | 1446 | /** 1447 | * @} 1448 | */ 1449 | 1450 | /** 1451 | * @} 1452 | */ 1453 | 1454 | /** 1455 | * @} 1456 | */ 1457 | 1458 | /** 1459 | * @} 1460 | */ 1461 | 1462 | /** 1463 | * @} 1464 | */ 1465 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 1466 | -------------------------------------------------------------------------------- /1-HOWTO/z_displ_ST7735.c: -------------------------------------------------------------------------------- 1 | /* 2 | * z_displ_ST7735.h 3 | * rel. TouchGFX compatible 1.1 4 | * 5 | * Created on: Oct 9, 2022 6 | * Author: mauro 7 | * 8 | * Licensing: https://github.com/maudeve-it/ST7735S-STM32/blob/main/LICENSE 9 | * 10 | * Install and use this library following instruction on: https://github.com/maudeve-it/ILI9XXX-XPT2046-STM32 11 | * 12 | */ 13 | 14 | 15 | #include "main.h" 16 | 17 | extern SPI_HandleTypeDef DISPLAY_SPI_PORT; 18 | 19 | #ifdef DISPLAY_DIMMING_MODE 20 | extern TIM_HandleTypeDef BKLIT_T; 21 | #endif 22 | 23 | static volatile uint32_t dispSpiAvailable=1; // 0 if SPI is busy or 1 if it is free (transm cplt) 24 | 25 | int16_t _width; ///< (oriented) display width 26 | int16_t _height; ///< (oriented) display height 27 | uint8_t _colstart; ///< Some displays need this changed to offset 28 | uint8_t _rowstart; ///< Some displays need this changed to offset 29 | uint8_t _xstart; 30 | uint8_t _ystart; 31 | 32 | static uint8_t dispBuffer1[SIZEBUF]; 33 | static uint8_t dispBuffer2[SIZEBUF]; 34 | static uint8_t *dispBuffer=dispBuffer1; 35 | 36 | 37 | 38 | /****** ST7735 driver's DEFINITIONS ******/ 39 | #define DELAY 0x80 40 | #define ST7735_RESET_DELAY 5 41 | #define ST7735_FLAG_LONG_DELAY 255 42 | #define ST7735_LONG_DELAY 500 43 | 44 | #define ST7735_MADCTL_MY 0x80 45 | #define ST7735_MADCTL_MX 0x40 46 | #define ST7735_MADCTL_MV 0x20 47 | #define ST7735_MADCTL_ML 0x10 48 | #define ST7735_MADCTL_RGB 0x00 49 | #define ST7735_MADCTL_BGR 0x08 50 | #define ST7735_MADCTL_MH 0x04 51 | 52 | #define ST7735_NOP 0x00 53 | #define ST7735_SWRESET 0x01 54 | #define ST7735_RDDID 0x04 55 | #define ST7735_RDDST 0x09 56 | 57 | #define ST7735_SLPIN 0x10 58 | #define ST7735_SLPOUT 0x11 59 | #define ST7735_PTLON 0x12 60 | #define ST7735_NORON 0x13 61 | 62 | #define ST7735_INVOFF 0x20 63 | #define ST7735_INVON 0x21 64 | #define ST7735_DISPOFF 0x28 65 | #define ST7735_DISPON 0x29 66 | #define ST7735_CASET 0x2A 67 | #define ST7735_RASET 0x2B 68 | #define ST7735_RAMWR 0x2C 69 | #define ST7735_RAMRD 0x2E 70 | 71 | #define ST7735_PTLAR 0x30 72 | #define ST7735_COLMOD 0x3A 73 | #define ST7735_MADCTL 0x36 74 | 75 | #define ST7735_FRMCTR1 0xB1 76 | #define ST7735_FRMCTR2 0xB2 77 | #define ST7735_FRMCTR3 0xB3 78 | #define ST7735_INVCTR 0xB4 79 | #define ST7735_DISSET5 0xB6 80 | 81 | #define ST7735_PWCTR1 0xC0 82 | #define ST7735_PWCTR2 0xC1 83 | #define ST7735_PWCTR3 0xC2 84 | #define ST7735_PWCTR4 0xC3 85 | #define ST7735_PWCTR5 0xC4 86 | #define ST7735_VMCTR1 0xC5 87 | 88 | #define ST7735_RDID1 0xDA 89 | #define ST7735_RDID2 0xDB 90 | #define ST7735_RDID3 0xDC 91 | #define ST7735_RDID4 0xDD 92 | 93 | #define ST7735_PWCTR6 0xFC 94 | 95 | #define ST7735_GMCTRP1 0xE0 96 | #define ST7735_GMCTRN1 0xE1 97 | /****** ST7735 driver's DEFINITIONS ******/ 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | const uint8_t 106 | init_cmds1[] = { // Init for 7735R, part 1 (red or green tab) 107 | 15, // 15 commands in list: 108 | ST7735_SWRESET, DELAY, // 1: Software reset, 0 args, w/delay 109 | 150, // 150 ms delay 110 | ST7735_SLPOUT , DELAY, // 2: Out of sleep mode, 0 args, w/delay 111 | ST7735_FLAG_LONG_DELAY, // 500 ms delay 112 | ST7735_FRMCTR1, 3 , // 3: Frame rate ctrl - normal mode, 3 args: 113 | 0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D) 114 | ST7735_FRMCTR2, 3 , // 4: Frame rate control - idle mode, 3 args: 115 | 0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D) 116 | ST7735_FRMCTR3, 6 , // 5: Frame rate ctrl - partial mode, 6 args: 117 | 0x01, 0x2C, 0x2D, // Dot inversion mode 118 | 0x01, 0x2C, 0x2D, // Line inversion mode 119 | ST7735_INVCTR , 1 , // 6: Display inversion ctrl, 1 arg, no delay: 120 | 0x07, // No inversion 121 | ST7735_PWCTR1 , 3 , // 7: Power control, 3 args, no delay: 122 | 0xA2, 123 | 0x02, // -4.6V 124 | 0x84, // AUTO mode 125 | ST7735_PWCTR2 , 1 , // 8: Power control, 1 arg, no delay: 126 | 0xC5, // VGH25 = 2.4C VGSEL = -10 VGH = 3 * AVDD 127 | ST7735_PWCTR3 , 2 , // 9: Power control, 2 args, no delay: 128 | 0x0A, // Opamp current small 129 | 0x00, // Boost frequency 130 | ST7735_PWCTR4 , 2 , // 10: Power control, 2 args, no delay: 131 | 0x8A, // BCLK/2, Opamp current small & Medium low 132 | 0x2A, 133 | ST7735_PWCTR5 , 2 , // 11: Power control, 2 args, no delay: 134 | 0x8A, 0xEE, 135 | ST7735_VMCTR1 , 1 , // 12: Power control, 1 arg, no delay: 136 | 0x0E, 137 | ST7735_INVOFF , 0 , // 13: Don't invert display, no args, no delay 138 | ST7735_COLMOD , 1 , // 15: set color mode, 1 arg, no delay: 139 | 0x05 }, // 16-bit color 140 | 141 | #if (defined(ST7735_IS_128X128) || defined(ST7735_IS_160X128)) 142 | init_cmds2[] = { // Init for 7735R, part 2 (1.44" display) 143 | 0, // no commands in list: 144 | }, // 145 | #endif // ST7735_IS_128X128 146 | 147 | #ifdef ST7735_IS_160X80 148 | init_cmds2[] = { // Init for 7735S, part 2 (160x80 display) 149 | 1, // 1 commands in list: 150 | ST7735_INVON, 0 }, // 1: Invert colors 151 | #endif 152 | 153 | init_cmds3[] = { // Init for 7735R, part 3 (red or green tab) 154 | 2, // 4 commands in list: 155 | ST7735_NORON , DELAY, // 3: Normal display on, no args, w/delay 156 | 10, // 10 ms delay 157 | ST7735_DISPON , DELAY, // 4: Main screen turn on, no args w/delay 158 | 100 }; // 100 ms delay 159 | 160 | 161 | 162 | void ST7735_Reset() 163 | { 164 | HAL_GPIO_WritePin(DISPL_RST_GPIO_Port, DISPL_RST_Pin, GPIO_PIN_RESET); 165 | HAL_Delay(ST7735_RESET_DELAY); 166 | HAL_GPIO_WritePin(DISPL_RST_GPIO_Port, DISPL_RST_Pin, GPIO_PIN_SET); 167 | HAL_Delay(ST7735_RESET_DELAY); 168 | } 169 | 170 | 171 | 172 | 173 | 174 | /************************** 175 | * @BRIEF engages SPI port communicating with displayDC_Status 176 | * depending on the macro definition makes transmission in Polling/Interrupt/DMA mode 177 | * @PARAM DC_Status indicates if sending command or data 178 | * data buffer data to send 179 | * dataSize number of bytes in "data" to be sent 180 | * isTouchGFXBuffer 1 only when called by touchgfxDisplayDriverTransmitBlock (for byte endian conversion). All other cases 0 181 | ***************************/ 182 | void Displ_Transmit(GPIO_PinState DC_Status, uint8_t* data, uint16_t dataSize, uint8_t isTouchGFXBuffer ){ 183 | //void Displ_Transmit(GPIO_PinState DC_Status, uint8_t* data, uint16_t dataSize ){ 184 | 185 | while (!dispSpiAvailable) {}; // waiting for a free SPI port. Flag is set to 1 by transmission-complete interrupt callback 186 | 187 | HAL_GPIO_WritePin(DISPL_DC_GPIO_Port, DISPL_DC_Pin, DC_Status); 188 | 189 | if (isTouchGFXBuffer){ 190 | uint32_t *limit=(uint32_t*)(data+dataSize); 191 | for (uint32_t *data32=(uint32_t*)data; data32= _width) || (y >= _height)) return; 399 | if((x + w - 1) >= _width) return; 400 | if((y + h - 1) >= _height) return; 401 | 402 | ST7735_SetAddressWindow(x, y, x+w-1, y+h-1); 403 | Displ_WriteData((uint8_t*)data, sizeof(uint16_t)*w*h,0); 404 | } 405 | 406 | 407 | 408 | 409 | 410 | void Displ_DrawImage(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t *data){ 411 | #ifdef Z_RGB565 412 | uint32_t size=((uint32_t)w*(uint32_t)h)<<1; 413 | #endif 414 | #ifdef Z_RGB666 415 | uint32_t size=((uint32_t)w*(uint32_t)h)*3; 416 | #endif 417 | 418 | ST7735_SetAddressWindow(x, y, w+x-1, h+y-1); 419 | 420 | #ifdef EXT_FLASH_BASEADDRESS 421 | if (((uint32_t)data>=EXT_FLASH_BASEADDRESS) && ((uint32_t)dataSIZEBUF){ 424 | Flash_Read((uint32_t)data, dispBuffer , SIZEBUF); 425 | Displ_WriteData(dispBuffer,SIZEBUF,0); 426 | data+=SIZEBUF; 427 | size-=SIZEBUF; 428 | dispBuffer = (dispBuffer==dispBuffer1 ? dispBuffer2 : dispBuffer1); // swapping buffer 429 | } 430 | Flash_Read((uint32_t)data, dispBuffer , size); 431 | data=dispBuffer; 432 | } 433 | #endif 434 | Displ_WriteData(data,size,0); 435 | dispBuffer = (dispBuffer==dispBuffer1 ? dispBuffer2 : dispBuffer1); // swapping buffer 436 | } 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | void ST7735_InvertColors(uint8_t invert) { 457 | Displ_WriteCommand(invert ? ST7735_INVON : ST7735_INVOFF); 458 | } 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | /***************************** 470 | * @brief fill a rectangle with a color 471 | * @param x, y top left corner of the rectangle 472 | * w, h width and height of the rectangle 473 | ******************************/ 474 | void Displ_FillArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color) { 475 | uint16_t k,x1,y1,area,times; 476 | 477 | uint32_t data32; 478 | 479 | if((x >= _width) || (y >= _height) || (w == 0) || (h == 0)) return;// 480 | 481 | x1=x + w - 1; 482 | if (x1 > _width) { 483 | x1=_width; 484 | } 485 | 486 | y1=y + h - 1; 487 | if (y1 > _height) { 488 | y1=_height; 489 | } 490 | 491 | 492 | data32=(color>>8) | (color<<8) | (color<<24); // supposing color is 0xABCD, data32 becomes 0xCDABCDAB - set a 32 bit variable with swapped endians 493 | area=((y1-y+1)*(x1-x+1)); // area to fill in 16bit pixels 494 | uint32_t *buf32Pos=(uint32_t *)dispBuffer; //dispBuffer defined in bytes, buf32Pos access it as 32 bit words 495 | if (area<(SIZEBUF>>1)) // if area is smaller than dispBuffer 496 | times=(area>>1)+1; // number of times data32 has to be loaded into buffer 497 | else 498 | times=(SIZEBUF>>2); // dispBuffer size as 32bit-words 499 | for (k = 0; k < times; k++) 500 | *(buf32Pos++)=data32; // loads buffer moving 32bit-words 501 | times=(area>>(BUFLEVEL-1)); //how many times buffer must be sent via SPI. It is (BUFFLEVEL-1) because area is 16-bit while dispBuffer is 8-bit 502 | 503 | ST7735_SetAddressWindow(x, y, x1, y1); 504 | 505 | for (k=0;k= _width) || (y >= _height)) 524 | return; 525 | Displ_FillArea(x, y, 1, 1, color); 526 | 527 | } 528 | 529 | 530 | /*********************** 531 | * @brief print an empty rectangle of a given thickness 532 | * @params x, y top left corner 533 | * w, h width and height 534 | * t border thickness 535 | * color border color, inner part unchanged 536 | ***********************/ 537 | void Displ_Border(int16_t x, int16_t y, int16_t w, int16_t h, int16_t t, uint16_t color){ 538 | Displ_FillArea(x, y, w, t, color); 539 | Displ_FillArea(x, y+h-t, w, t, color); 540 | Displ_FillArea(x, y, t, h, color); 541 | Displ_FillArea(x+w-t, y, t, h, color); 542 | } 543 | 544 | 545 | 546 | /************************ 547 | * @brief draws a line from "x0","y0" to "x1","y1" of the given "color" 548 | ************************/ 549 | void Displ_Line(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) 550 | { 551 | int16_t l,x,steep,ystep,err,dx, dy; 552 | 553 | if (x0==x1){ // fast solve vertical lines 554 | if (y1>y0){ 555 | Displ_FillArea(x0, y0, 1, y1-y0+1, color); 556 | } 557 | else { 558 | Displ_FillArea(x0, y1, 1, y0-y1+1, color); 559 | } 560 | return; 561 | } 562 | if (y0==y1){ // fast solve horizontal lines 563 | if (x1>x0) 564 | Displ_FillArea(x0, y0, x1-x0+1, 1, color); 565 | else 566 | Displ_FillArea(x1, y1, x0-x1+1, 1, color); 567 | return; 568 | } 569 | 570 | steep = (y1>y0 ? y1-y0 : y0-y1) > (x1>x0 ? x1-x0 : x0-x1); 571 | 572 | if (steep) { 573 | _swap_int16_t(x0, y0); 574 | _swap_int16_t(x1, y1); 575 | } 576 | 577 | if (x0 > x1) { 578 | _swap_int16_t(x0, x1); 579 | _swap_int16_t(y0, y1); 580 | } 581 | 582 | dx = x1 - x0; 583 | err = dx >> 1; 584 | if (y0 < y1) { 585 | dy = y1-y0; 586 | ystep = 1 ; 587 | } else { 588 | dy = y0-y1; 589 | ystep = -1 ; 590 | } 591 | 592 | l=00; 593 | for (x=x0; x<=x1; x++) { 594 | l++; 595 | err -= dy; 596 | if (err < 0) { 597 | if (steep) { 598 | Displ_FillArea(y0, x0, 1, l, color); 599 | } else { 600 | Displ_FillArea(x0, y0, l, 1, color); 601 | } 602 | y0 += ystep; 603 | l=0; 604 | x0=x+1; 605 | err += dx; 606 | } 607 | } 608 | if (l!=0){ 609 | if (steep) { 610 | Displ_FillArea(y0, x0, 1, l-1, color); 611 | } else { 612 | Displ_FillArea(x0, y0, l-1,1, color); 613 | } 614 | } 615 | } 616 | 617 | 618 | 619 | 620 | 621 | /*********************** 622 | * @brief display one character on the display 623 | * @param x,y: top left corner of the character to be printed 624 | * ch, font, color, bgcolor: as per parameter name 625 | * size: (1 or 2) single or double wided printing 626 | **********************/ 627 | void Displ_WChar(uint16_t x, uint16_t y, char ch, sFONT font, uint8_t size, uint16_t color, uint16_t bgcolor) { 628 | uint32_t i, b, bytes, j, bufSize, mask; 629 | uint16_t *dispBuffer16=(uint16_t *)dispBuffer; 630 | 631 | const uint8_t *pos; 632 | uint8_t wsize=font.Width; //printing char width 633 | uint16_t color1, bgcolor1; 634 | 635 | if (size==2) 636 | wsize<<= 1; 637 | bufSize=0; 638 | bytes=font.Height * font.Size ; 639 | pos=font.table+(ch - 32) * bytes ;//that's char position in table 640 | switch (font.Size) { 641 | case 3: 642 | mask=0x800000; 643 | break; 644 | case 2: 645 | mask=0x8000; 646 | break; 647 | default: 648 | mask=0x80; 649 | } 650 | 651 | color1 = ((color & 0xFF)<<8 | (color >> 8)); //swapping byte endian: STM32 is little endian, ST7735 is big endian 652 | bgcolor1 = ((bgcolor & 0xFF)<<8 | (bgcolor >> 8)); //swapping byte endian: STM32 is little endian, ST7735 is big endian 653 | 654 | for(i = 0; i < (bytes); i+=font.Size){ 655 | b=0; 656 | switch (font.Size) { 657 | case 3: 658 | b=pos[i]<<16 | pos[i+1]<<8 | pos[i+2]; 659 | break; 660 | case 2: 661 | b=pos[i]<<8 | pos[i+1]; 662 | break; 663 | default: 664 | b=pos[i]; 665 | } 666 | 667 | for(j = 0; j < font.Width; j++) { 668 | if((b << j) & mask) { 669 | dispBuffer16[bufSize++] = color1; 670 | if (size==2){ 671 | dispBuffer16[bufSize++] = color1; 672 | } 673 | } else { 674 | dispBuffer16[bufSize++] = bgcolor1; 675 | if (size==2) { 676 | dispBuffer16[bufSize++] = bgcolor1; 677 | } 678 | } 679 | } 680 | } 681 | ST7735_SetAddressWindow(x, y, x+wsize-1, y+font.Height-1); 682 | Displ_WriteData(dispBuffer,bufSize<<1,0); 683 | dispBuffer = (dispBuffer==dispBuffer1 ? dispBuffer2 : dispBuffer1); // swapping buffer 684 | 685 | 686 | } 687 | 688 | 689 | 690 | 691 | 692 | /************************ 693 | * @brief print a string on display starting from a defined position 694 | * @params x, y top left area-to-print corner 695 | * str string to print 696 | * font to bu used 697 | * size 1 (normal), 2 (double width) 698 | * color font color 699 | * bgcolor background color 700 | ************************/ 701 | void Displ_WString(uint16_t x, uint16_t y, const char* str, sFONT font, uint8_t size, uint16_t color, uint16_t bgcolor) { 702 | uint16_t delta=font.Width; 703 | if (size>1) 704 | delta<<=1; 705 | 706 | while(*str) { 707 | /* 708 | * these rows split string in more screen lines 709 | if(x + font.Width >= _width) { 710 | x = 0; 711 | y += font.Height; 712 | if(y + font.Height >= _height) { 713 | break; 714 | } 715 | if(*str == ' ') { 716 | // skip spaces in the beginning of the new line 717 | str++; 718 | continue; 719 | } 720 | } 721 | */ 722 | 723 | Displ_WChar(x, y, *str, font, size, color, bgcolor); 724 | x += delta; 725 | str++; 726 | } 727 | } 728 | 729 | 730 | 731 | 732 | 733 | /************************ 734 | * @brief print a string on display centering into a defined area 735 | * @params x0, y0 top left area corner 736 | * x1, y1 bottom right corner 737 | * str string to print 738 | * font to bu used 739 | * size 1 (normal), 2 (double width) 740 | * color font color 741 | * bgcolor background color 742 | ************************/ 743 | void Displ_CString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, const char* str, sFONT font, uint8_t size, uint16_t color, uint16_t bgcolor) { 744 | uint16_t x,y; 745 | uint16_t wsize=font.Width; 746 | static uint8_t cambia=0; 747 | if (size>1) 748 | wsize<<=1; 749 | if ((strlen(str)*wsize)>(x1-x0+1)) 750 | x=x0; 751 | else 752 | x=(x1+x0+1-strlen(str)*wsize) >> 1; 753 | if (font.Height>(y1-y0+1)) 754 | y=y0; 755 | else 756 | y=(y1+y0+1-font.Height) >> 1; 757 | 758 | if (x>x0){ 759 | Displ_FillArea(x0,y0,x-x0,y1-y0+1,bgcolor); 760 | } else 761 | x=x0; // fixing here mistake could be due to roundings: x lower than x0. 762 | if (x1>(strlen(str)*wsize+x0)) 763 | Displ_FillArea(x1-x+x0-1,y0,x-x0+1,y1-y0+1,bgcolor); 764 | 765 | if (y>y0){ 766 | Displ_FillArea(x0,y0,x1-x0+1,y-y0,bgcolor); 767 | } else 768 | y=y0; //same comment as above 769 | if (y1>=(font.Height+y0)) 770 | Displ_FillArea(x0,y1-y+y0,x1-x0+1,y-y0+1,bgcolor); 771 | 772 | cambia = !cambia; 773 | 774 | Displ_WString(x, y, str, font, size, color, bgcolor); 775 | 776 | } 777 | 778 | 779 | 780 | 781 | 782 | /***************** 783 | * @brief first display initialization. 784 | * @param orientation: display orientation 785 | *****************/ 786 | void Displ_Init(Displ_Orientat_e orientation){ 787 | ST7735_Init(orientation); 788 | } 789 | 790 | 791 | /***************** 792 | * @brief set display orientation. 793 | * @param orientation: display orientation 794 | *****************/ 795 | void Displ_Orientation(Displ_Orientat_e orientation){ 796 | ST7735_SetRotation(orientation); 797 | } 798 | 799 | 800 | /***************** 801 | * @brief clear display with a color. 802 | * @param bgcolor 803 | *****************/ 804 | void Displ_CLS(uint16_t bgcolor){ 805 | Displ_FillArea(0, 0, _width, _height, bgcolor); 806 | } 807 | 808 | 809 | 810 | void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi) 811 | { 812 | __NOP(); 813 | if (hspi->Instance==DISPLAY_SPI) { 814 | dispSpiAvailable=1; 815 | } 816 | } 817 | 818 | 819 | 820 | 821 | void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi) { 822 | if (hspi->Instance==DISPLAY_SPI) { 823 | dispSpiAvailable=1; 824 | #ifdef DISPLAY_USING_TOUCHGFX 825 | DisplayDriver_TransferCompleteCallback(); 826 | #endif 827 | } 828 | } 829 | 830 | 831 | 832 | 833 | 834 | /**************************************************************************** 835 | ************** demo functions from previous library ************************* 836 | ************** not checked, nor optimized 837 | ****************************************************************************/ 838 | 839 | 840 | 841 | void drawCircleHelper( int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color) 842 | { 843 | int16_t f = 1 - r; 844 | int16_t ddF_x = 1; 845 | int16_t ddF_y = -2 * r; 846 | int16_t x = 0; 847 | int16_t y = r; 848 | 849 | while (x= 0) { 851 | y--; 852 | ddF_y += 2; 853 | f += ddF_y; 854 | } 855 | x++; 856 | ddF_x += 2; 857 | f += ddF_x; 858 | if (cornername & 0x4) { 859 | Displ_Pixel(x0 + x, y0 + y, color); 860 | Displ_Pixel(x0 + y, y0 + x, color); 861 | } 862 | if (cornername & 0x2) { 863 | Displ_Pixel(x0 + x, y0 - y, color); 864 | Displ_Pixel(x0 + y, y0 - x, color); 865 | } 866 | if (cornername & 0x8) { 867 | Displ_Pixel(x0 - y, y0 + x, color); 868 | Displ_Pixel(x0 - x, y0 + y, color); 869 | } 870 | if (cornername & 0x1) { 871 | Displ_Pixel(x0 - y, y0 - x, color); 872 | Displ_Pixel(x0 - x, y0 - y, color); 873 | } 874 | } 875 | } 876 | 877 | 878 | 879 | 880 | 881 | void fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t corners, int16_t delta, uint16_t color){ 882 | int16_t f = 1 - r; 883 | int16_t ddF_x = 1; 884 | int16_t ddF_y = -2 * r; 885 | int16_t x = 0; 886 | int16_t y = r; 887 | int16_t px = x; 888 | int16_t py = y; 889 | 890 | delta++; // Avoid some +1's in the loop 891 | 892 | while(x < y) { 893 | if (f >= 0) { 894 | y--; 895 | ddF_y += 2; 896 | f += ddF_y; 897 | } 898 | x++; 899 | ddF_x += 2; 900 | f += ddF_x; 901 | // These checks avoid double-drawing certain lines, important 902 | // for the SSD1306 library which has an INVERT drawing mode. 903 | if(x < (y + 1)) { 904 | // if(corners & 1) drawFastVLine(x0+x, y0-y, 2*y+delta, color); 905 | if(corners & 1) Displ_Line(x0+x, y0-y, x0+x, y0-1+y+delta, color); 906 | // if(corners & 2) drawFastVLine(x0-x, y0-y, 2*y+delta, color); 907 | if(corners & 2) Displ_Line(x0-x, y0-y, x0-x, y0-1+y+delta, color); 908 | } 909 | if(y != py) { 910 | // if(corners & 1) drawFastVLine(x0+py, y0-px, 2*px+delta, color); 911 | if(corners & 1) Displ_Line(x0+py, y0-px, x0+py, y0-1+px+delta, color); 912 | // if(corners & 2) drawFastVLine(x0-py, y0-px, 2*px+delta, color); 913 | if(corners & 1) Displ_Line(x0-py, y0-px, x0-py, y0-1+px+delta, color); 914 | py = y; 915 | } 916 | px = x; 917 | } 918 | } 919 | 920 | 921 | 922 | 923 | 924 | 925 | void Displ_drawRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color) 926 | { 927 | int16_t max_radius = ((w < h) ? w : h) / 2; // 1/2 minor axis 928 | if(r > max_radius) r = max_radius; 929 | // smarter version 930 | // drawFastHLine(x+r , y , w-2*r, color); // Top 931 | Displ_Line(x+r, y, x+w-r-1, y, color); 932 | // drawFastHLine(x+r, y+h-1, w-2*r, color); // Bottom 933 | Displ_Line(x+r, y+h-1, x-1+w-r, y+h-1, color); 934 | // drawFastVLine(x, y+r, h-2*r, color); // Left 935 | Displ_Line(x, y+r, x, y-1+h-r, color); // Left 936 | // drawFastVLine(x+w-1, y+r , h-2*r, color); // Right 937 | Displ_Line(x+w-1, y+r, x+w-1, y-1+h-r, color); // Right 938 | // draw four corners 939 | drawCircleHelper(x+r , y+r , r, 1, color); 940 | drawCircleHelper(x+w-r-1, y+r , r, 2, color); 941 | drawCircleHelper(x+w-r-1, y+h-r-1, r, 4, color); 942 | drawCircleHelper(x+r , y+h-r-1, r, 8, color); 943 | } 944 | 945 | 946 | 947 | 948 | 949 | void Displ_fillRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color) 950 | { 951 | int16_t max_radius = ((w < h) ? w : h) / 2; // 1/2 minor axis 952 | if(r > max_radius) r = max_radius; 953 | // smarter version 954 | Displ_FillArea(x+r, y, w-2*r, h, color); 955 | // draw four corners 956 | fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); 957 | fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); 958 | } 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | void Displ_fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) 967 | { 968 | 969 | int16_t a, b, y, last; 970 | 971 | // Sort coordinates by Y order (y2 >= y1 >= y0) 972 | if (y0 > y1) { 973 | _swap_int16_t(y0, y1); _swap_int16_t(x0, x1); 974 | } 975 | if (y1 > y2) { 976 | _swap_int16_t(y2, y1); _swap_int16_t(x2, x1); 977 | } 978 | if (y0 > y1) { 979 | _swap_int16_t(y0, y1); _swap_int16_t(x0, x1); 980 | } 981 | 982 | if(y0 == y2) { // Handle awkward all-on-same-line case as its own thing 983 | a = b = x0; 984 | if(x1 < a) a = x1; 985 | else if(x1 > b) b = x1; 986 | if(x2 < a) a = x2; 987 | else if(x2 > b) b = x2; 988 | // drawFastHLine(a, y0, b-a+1, color); 989 | Displ_Line(a, y0, b, y0, color); 990 | return; 991 | } 992 | 993 | int16_t 994 | dx01 = x1 - x0, 995 | dy01 = y1 - y0, 996 | dx02 = x2 - x0, 997 | dy02 = y2 - y0, 998 | dx12 = x2 - x1, 999 | dy12 = y2 - y1; 1000 | int32_t 1001 | sa = 0, 1002 | sb = 0; 1003 | 1004 | // For upper part of triangle, find scanline crossings for segments 1005 | // 0-1 and 0-2. If y1=y2 (flat-bottomed triangle), the scanline y1 1006 | // is included here (and second loop will be skipped, avoiding a /0 1007 | // error there), otherwise scanline y1 is skipped here and handled 1008 | // in the second loop...which also avoids a /0 error here if y0=y1 1009 | // (flat-topped triangle). 1010 | if(y1 == y2) last = y1; // Include y1 scanline 1011 | else last = y1-1; // Skip it 1012 | 1013 | for(y=y0; y<=last; y++) { 1014 | a = x0 + sa / dy01; 1015 | b = x0 + sb / dy02; 1016 | sa += dx01; 1017 | sb += dx02; 1018 | /* longhand: 1019 | a = x0 + (x1 - x0) * (y - y0) / (y1 - y0); 1020 | b = x0 + (x2 - x0) * (y - y0) / (y2 - y0); 1021 | */ 1022 | if(a > b) _swap_int16_t(a,b); 1023 | // drawFastHLine(a, y, b-a+1, color); 1024 | Displ_Line(a, y, b, y, color); 1025 | } 1026 | 1027 | // For lower part of triangle, find scanline crossings for segments 1028 | // 0-2 and 1-2. This loop is skipped if y1=y2. 1029 | sa = (int32_t)dx12 * (y - y1); 1030 | sb = (int32_t)dx02 * (y - y0); 1031 | for(; y<=y2; y++) { 1032 | a = x1 + sa / dy12; 1033 | b = x0 + sb / dy02; 1034 | sa += dx12; 1035 | sb += dx02; 1036 | /* longhand: 1037 | a = x1 + (x2 - x1) * (y - y1) / (y2 - y1); 1038 | b = x0 + (x2 - x0) * (y - y0) / (y2 - y0); 1039 | */ 1040 | if(a > b) _swap_int16_t(a,b); 1041 | // drawFastHLine(a, y, b-a+1, color); 1042 | Displ_Line(a, y, b, y, color); 1043 | } 1044 | } 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | void Displ_drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) 1051 | { 1052 | Displ_Line(x0, y0, x1, y1, color); 1053 | Displ_Line(x1, y1, x2, y2, color); 1054 | Displ_Line(x2, y2, x0, y0, color); 1055 | } 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | void Displ_fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color){ 1062 | Displ_Line(x0, y0-r, x0, y0+r, color); 1063 | fillCircleHelper(x0, y0, r, 3, 0, color); 1064 | } 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | void Displ_drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) 1071 | { 1072 | int16_t f = 1 - r; 1073 | int16_t ddF_x = 1; 1074 | int16_t ddF_y = -2 * r; 1075 | int16_t x = 0; 1076 | int16_t y = r; 1077 | 1078 | // writePixel(x0 , y0+r, color); 1079 | Displ_Pixel(x0 , y0+r, color); 1080 | Displ_Pixel(x0 , y0-r, color); 1081 | Displ_Pixel(x0+r, y0 , color); 1082 | Displ_Pixel(x0-r, y0 , color); 1083 | 1084 | while (x= 0) { 1086 | y--; 1087 | ddF_y += 2; 1088 | f += ddF_y; 1089 | } 1090 | x++; 1091 | ddF_x += 2; 1092 | f += ddF_x; 1093 | 1094 | Displ_Pixel(x0 + x, y0 + y, color); 1095 | Displ_Pixel(x0 - x, y0 + y, color); 1096 | Displ_Pixel(x0 + x, y0 - y, color); 1097 | Displ_Pixel(x0 - x, y0 - y, color); 1098 | Displ_Pixel(x0 + y, y0 + x, color); 1099 | Displ_Pixel(x0 - y, y0 + x, color); 1100 | Displ_Pixel(x0 + y, y0 - x, color); 1101 | Displ_Pixel(x0 - y, y0 - x, color); 1102 | } 1103 | } 1104 | 1105 | 1106 | /******************************************** 1107 | ******************************************** 1108 | ********************************************/ 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | /************************************** 1117 | * @brief set backlight level 1118 | * PLEASE NOTE: if not in "DIMMING MODE" only 'F', '1', '0' and 'Q' available 1119 | * @param cmd 'S' put display in stby (light level=BKLIT_STBY_LEVEL) 1120 | * 'W' wake-up from stdby restoring previous level 1121 | * '+' add 1 step to the current light level 1122 | * '-' reduce 1 step to the current light level 1123 | * 'F','1' set the display level to max 1124 | * '0' set the display level to 0 (off) 1125 | * 'I' 'Initialize'. If dimming mode, IT MUST BE run on startup 1126 | * 'Q' do nothing, just return current level 1127 | * @return current backlight level 1128 | **************************************/ 1129 | uint32_t Displ_BackLight(uint8_t cmd) { 1130 | 1131 | #ifdef DISPLAY_DIMMING_MODE 1132 | static uint16_t memCCR1=0; //it stores CCR1 value while in stand-by 1133 | #endif 1134 | 1135 | switch (cmd) { 1136 | #ifndef DISPLAY_DIMMING_MODE 1137 | case 'F': 1138 | case '1': 1139 | HAL_GPIO_WritePin(DISPL_LED_GPIO_Port, DISPL_LED_Pin, GPIO_PIN_SET); 1140 | break; 1141 | case '0': 1142 | HAL_GPIO_WritePin(DISPL_LED_GPIO_Port, DISPL_LED_Pin, GPIO_PIN_RESET); 1143 | break; 1144 | #else 1145 | case 'F': 1146 | case '1': 1147 | BKLIT_TIMER->BKLIT_CCR=BKLIT_TIMER->ARR; 1148 | break; 1149 | case '0': 1150 | BKLIT_TIMER->BKLIT_CCR=0; 1151 | break; 1152 | case 'W': 1153 | BKLIT_TIMER->BKLIT_CCR=memCCR1; //restore previous level 1154 | break; 1155 | case 'S': 1156 | memCCR1=BKLIT_TIMER->BKLIT_CCR; 1157 | if (BKLIT_TIMER->BKLIT_CCR>=(BKLIT_STBY_LEVEL)) //set stby level only if current level is higher 1158 | BKLIT_TIMER->BKLIT_CCR=(BKLIT_STBY_LEVEL); 1159 | break; 1160 | case '+': 1161 | if (BKLIT_TIMER->ARR>BKLIT_TIMER->BKLIT_CCR) // if CCR1 has not yet the highest value (ARR) 1162 | ++BKLIT_TIMER->BKLIT_CCR; 1163 | else 1164 | BKLIT_TIMER->BKLIT_CCR=BKLIT_TIMER->ARR; 1165 | break; 1166 | case '-': 1167 | if (BKLIT_TIMER->BKLIT_CCR>0) // if CCR1 has not yet the lowest value (0) 1168 | --BKLIT_TIMER->BKLIT_CCR; 1169 | else 1170 | BKLIT_TIMER->BKLIT_CCR=0; 1171 | break; 1172 | case 'I': 1173 | HAL_TIM_PWM_Start(&BKLIT_T, BKLIT_CHANNEL); 1174 | Displ_BackLight(BKLIT_INIT_LEVEL); 1175 | break; 1176 | #endif 1177 | case 'Q': 1178 | break; 1179 | default: 1180 | break; 1181 | } 1182 | #ifndef DISPLAY_DIMMING_MODE 1183 | return HAL_GPIO_ReadPin(DISPL_LED_GPIO_Port, DISPL_LED_Pin); 1184 | #else 1185 | return (BKLIT_TIMER->BKLIT_CCR); 1186 | #endif 1187 | } 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | /************************ 1195 | * @brief TouchGFX integration: returns status of communication to the display 1196 | * @return 1 = there is a transmission running 1197 | * 0 = no transmission 1198 | ************************/ 1199 | int touchgfxDisplayDriverTransmitActive(){ 1200 | // using the flag indicating SPI port availability 1201 | // already used to drive communication via DMA 1202 | return (!dispSpiAvailable); 1203 | } 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | /************************ 1210 | * @brief TouchGFX integration: write to display the block indicated by parameters 1211 | * 1212 | ************************/ 1213 | void touchgfxDisplayDriverTransmitBlock(const uint8_t* pixels, uint16_t x, uint16_t y, uint16_t w, uint16_t h){ 1214 | ST7735_SetAddressWindow(x, y, x+w-1, y+h-1); 1215 | Displ_WriteData((uint8_t* )pixels,((w*h)<<1),1); 1216 | } 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | -------------------------------------------------------------------------------- /1-HOWTO/font16.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file font16.c 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 18-February-2014 7 | * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2014 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | /* Includes ------------------------------------------------------------------*/ 39 | #include "fonts.h" 40 | 41 | /** @addtogroup Utilities 42 | * @{ 43 | */ 44 | 45 | /** @addtogroup STM32_EVAL 46 | * @{ 47 | */ 48 | 49 | /** @addtogroup Common 50 | * @{ 51 | */ 52 | 53 | /** @addtogroup FONTS 54 | * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. 55 | * @{ 56 | */ 57 | 58 | /** @defgroup FONTS_Private_Types 59 | * @{ 60 | */ 61 | /** 62 | * @} 63 | */ 64 | 65 | 66 | /** @defgroup FONTS_Private_Defines 67 | * @{ 68 | */ 69 | /** 70 | * @} 71 | */ 72 | 73 | 74 | /** @defgroup FONTS_Private_Macros 75 | * @{ 76 | */ 77 | /** 78 | * @} 79 | */ 80 | 81 | 82 | /** @defgroup FONTS_Private_Variables 83 | * @{ 84 | */ 85 | // 86 | // Font data for Courier New 12pt 87 | // 88 | 89 | const uint8_t Font16_Table[] = 90 | { 91 | // @0 ' ' (11 pixels wide) 92 | 0x00, 0x00, // 93 | 0x00, 0x00, // 94 | 0x00, 0x00, // 95 | 0x00, 0x00, // 96 | 0x00, 0x00, // 97 | 0x00, 0x00, // 98 | 0x00, 0x00, // 99 | 0x00, 0x00, // 100 | 0x00, 0x00, // 101 | 0x00, 0x00, // 102 | 0x00, 0x00, // 103 | 0x00, 0x00, // 104 | 0x00, 0x00, // 105 | 0x00, 0x00, // 106 | 0x00, 0x00, // 107 | 0x00, 0x00, // 108 | 109 | // @32 '!' (11 pixels wide) 110 | 0x00, 0x00, // 111 | 0x0C, 0x00, // ## 112 | 0x0C, 0x00, // ## 113 | 0x0C, 0x00, // ## 114 | 0x0C, 0x00, // ## 115 | 0x0C, 0x00, // ## 116 | 0x0C, 0x00, // ## 117 | 0x0C, 0x00, // ## 118 | 0x0C, 0x00, // ## 119 | 0x00, 0x00, // 120 | 0x0C, 0x00, // ## 121 | 0x00, 0x00, // 122 | 0x00, 0x00, // 123 | 0x00, 0x00, // 124 | 0x00, 0x00, // 125 | 0x00, 0x00, // 126 | 127 | // @64 '"' (11 pixels wide) 128 | 0x00, 0x00, // 129 | 0x00, 0x00, // 130 | 0x1D, 0xC0, // ### ### 131 | 0x1D, 0xC0, // ### ### 132 | 0x08, 0x80, // # # 133 | 0x08, 0x80, // # # 134 | 0x08, 0x80, // # # 135 | 0x00, 0x00, // 136 | 0x00, 0x00, // 137 | 0x00, 0x00, // 138 | 0x00, 0x00, // 139 | 0x00, 0x00, // 140 | 0x00, 0x00, // 141 | 0x00, 0x00, // 142 | 0x00, 0x00, // 143 | 0x00, 0x00, // 144 | 145 | // @96 '#' (11 pixels wide) 146 | 0x00, 0x00, // 147 | 0x0D, 0x80, // ## ## 148 | 0x0D, 0x80, // ## ## 149 | 0x0D, 0x80, // ## ## 150 | 0x0D, 0x80, // ## ## 151 | 0x3F, 0xC0, // ######## 152 | 0x1B, 0x00, // ## ## 153 | 0x3F, 0xC0, // ######## 154 | 0x1B, 0x00, // ## ## 155 | 0x1B, 0x00, // ## ## 156 | 0x1B, 0x00, // ## ## 157 | 0x1B, 0x00, // ## ## 158 | 0x00, 0x00, // 159 | 0x00, 0x00, // 160 | 0x00, 0x00, // 161 | 0x00, 0x00, // 162 | 163 | // @128 '$' (11 pixels wide) 164 | 0x04, 0x00, // # 165 | 0x1F, 0x80, // ###### 166 | 0x31, 0x80, // ## ## 167 | 0x31, 0x80, // ## ## 168 | 0x38, 0x00, // ### 169 | 0x1E, 0x00, // #### 170 | 0x0F, 0x00, // #### 171 | 0x03, 0x80, // ### 172 | 0x31, 0x80, // ## ## 173 | 0x31, 0x80, // ## ## 174 | 0x3F, 0x00, // ###### 175 | 0x04, 0x00, // # 176 | 0x04, 0x00, // # 177 | 0x00, 0x00, // 178 | 0x00, 0x00, // 179 | 0x00, 0x00, // 180 | 181 | // @160 '%' (11 pixels wide) 182 | 0x00, 0x00, // 183 | 0x18, 0x00, // ## 184 | 0x24, 0x00, // # # 185 | 0x24, 0x00, // # # 186 | 0x18, 0xC0, // ## ## 187 | 0x07, 0x80, // #### 188 | 0x1E, 0x00, // #### 189 | 0x31, 0x80, // ## ## 190 | 0x02, 0x40, // # # 191 | 0x02, 0x40, // # # 192 | 0x01, 0x80, // ## 193 | 0x00, 0x00, // 194 | 0x00, 0x00, // 195 | 0x00, 0x00, // 196 | 0x00, 0x00, // 197 | 0x00, 0x00, // 198 | 199 | // @192 '&' (11 pixels wide) 200 | 0x00, 0x00, // 201 | 0x00, 0x00, // 202 | 0x0F, 0x00, // #### 203 | 0x18, 0x00, // ## 204 | 0x18, 0x00, // ## 205 | 0x18, 0x00, // ## 206 | 0x0C, 0x00, // ## 207 | 0x1D, 0x80, // ### ## 208 | 0x37, 0x00, // ## ### 209 | 0x33, 0x00, // ## ## 210 | 0x1D, 0x80, // ### ## 211 | 0x00, 0x00, // 212 | 0x00, 0x00, // 213 | 0x00, 0x00, // 214 | 0x00, 0x00, // 215 | 0x00, 0x00, // 216 | 217 | // @224 ''' (11 pixels wide) 218 | 0x00, 0x00, // 219 | 0x00, 0x00, // 220 | 0x07, 0x00, // ### 221 | 0x07, 0x00, // ### 222 | 0x02, 0x00, // # 223 | 0x02, 0x00, // # 224 | 0x02, 0x00, // # 225 | 0x00, 0x00, // 226 | 0x00, 0x00, // 227 | 0x00, 0x00, // 228 | 0x00, 0x00, // 229 | 0x00, 0x00, // 230 | 0x00, 0x00, // 231 | 0x00, 0x00, // 232 | 0x00, 0x00, // 233 | 0x00, 0x00, // 234 | 235 | // @256 '(' (11 pixels wide) 236 | 0x00, 0x00, // 237 | 0x03, 0x00, // ## 238 | 0x03, 0x00, // ## 239 | 0x06, 0x00, // ## 240 | 0x0E, 0x00, // ### 241 | 0x0C, 0x00, // ## 242 | 0x0C, 0x00, // ## 243 | 0x0C, 0x00, // ## 244 | 0x0C, 0x00, // ## 245 | 0x0E, 0x00, // ### 246 | 0x06, 0x00, // ## 247 | 0x03, 0x00, // ## 248 | 0x03, 0x00, // ## 249 | 0x00, 0x00, // 250 | 0x00, 0x00, // 251 | 0x00, 0x00, // 252 | 253 | // @288 ')' (11 pixels wide) 254 | 0x00, 0x00, // 255 | 0x18, 0x00, // ## 256 | 0x18, 0x00, // ## 257 | 0x0C, 0x00, // ## 258 | 0x06, 0x00, // ## 259 | 0x06, 0x00, // ## 260 | 0x06, 0x00, // ## 261 | 0x06, 0x00, // ## 262 | 0x06, 0x00, // ## 263 | 0x06, 0x00, // ## 264 | 0x0C, 0x00, // ## 265 | 0x1C, 0x00, // ### 266 | 0x18, 0x00, // ## 267 | 0x00, 0x00, // 268 | 0x00, 0x00, // 269 | 0x00, 0x00, // 270 | 271 | // @320 '*' (11 pixels wide) 272 | 0x00, 0x00, // 273 | 0x06, 0x00, // ## 274 | 0x06, 0x00, // ## 275 | 0x3F, 0xC0, // ######## 276 | 0x3F, 0xC0, // ######## 277 | 0x0F, 0x00, // #### 278 | 0x1F, 0x80, // ###### 279 | 0x19, 0x80, // ## ## 280 | 0x00, 0x00, // 281 | 0x00, 0x00, // 282 | 0x00, 0x00, // 283 | 0x00, 0x00, // 284 | 0x00, 0x00, // 285 | 0x00, 0x00, // 286 | 0x00, 0x00, // 287 | 0x00, 0x00, // 288 | 289 | // @352 '+' (11 pixels wide) 290 | 0x00, 0x00, // 291 | 0x00, 0x00, // 292 | 0x00, 0x00, // 293 | 0x04, 0x00, // # 294 | 0x04, 0x00, // # 295 | 0x04, 0x00, // # 296 | 0x3F, 0x80, // ####### 297 | 0x04, 0x00, // # 298 | 0x04, 0x00, // # 299 | 0x04, 0x00, // # 300 | 0x00, 0x00, // 301 | 0x00, 0x00, // 302 | 0x00, 0x00, // 303 | 0x00, 0x00, // 304 | 0x00, 0x00, // 305 | 0x00, 0x00, // 306 | 307 | // @384 ',' (11 pixels wide) 308 | 0x00, 0x00, // 309 | 0x00, 0x00, // 310 | 0x00, 0x00, // 311 | 0x00, 0x00, // 312 | 0x00, 0x00, // 313 | 0x00, 0x00, // 314 | 0x00, 0x00, // 315 | 0x00, 0x00, // 316 | 0x00, 0x00, // 317 | 0x06, 0x00, // ## 318 | 0x04, 0x00, // # 319 | 0x0C, 0x00, // ## 320 | 0x08, 0x00, // # 321 | 0x08, 0x00, // # 322 | 0x00, 0x00, // 323 | 0x00, 0x00, // 324 | 325 | // @416 '-' (11 pixels wide) 326 | 0x00, 0x00, // 327 | 0x00, 0x00, // 328 | 0x00, 0x00, // 329 | 0x00, 0x00, // 330 | 0x00, 0x00, // 331 | 0x00, 0x00, // 332 | 0x3F, 0x80, // ####### 333 | 0x00, 0x00, // 334 | 0x00, 0x00, // 335 | 0x00, 0x00, // 336 | 0x00, 0x00, // 337 | 0x00, 0x00, // 338 | 0x00, 0x00, // 339 | 0x00, 0x00, // 340 | 0x00, 0x00, // 341 | 0x00, 0x00, // 342 | 343 | // @448 '.' (11 pixels wide) 344 | 0x00, 0x00, // 345 | 0x00, 0x00, // 346 | 0x00, 0x00, // 347 | 0x00, 0x00, // 348 | 0x00, 0x00, // 349 | 0x00, 0x00, // 350 | 0x00, 0x00, // 351 | 0x00, 0x00, // 352 | 0x00, 0x00, // 353 | 0x0C, 0x00, // ## 354 | 0x0C, 0x00, // ## 355 | 0x00, 0x00, // 356 | 0x00, 0x00, // 357 | 0x00, 0x00, // 358 | 0x00, 0x00, // 359 | 0x00, 0x00, // 360 | 361 | // @480 '/' (11 pixels wide) 362 | 0x00, 0xC0, // ## 363 | 0x00, 0xC0, // ## 364 | 0x01, 0x80, // ## 365 | 0x01, 0x80, // ## 366 | 0x03, 0x00, // ## 367 | 0x03, 0x00, // ## 368 | 0x06, 0x00, // ## 369 | 0x0C, 0x00, // ## 370 | 0x0C, 0x00, // ## 371 | 0x18, 0x00, // ## 372 | 0x18, 0x00, // ## 373 | 0x30, 0x00, // ## 374 | 0x30, 0x00, // ## 375 | 0x00, 0x00, // 376 | 0x00, 0x00, // 377 | 0x00, 0x00, // 378 | 379 | // @512 '0' (11 pixels wide) 380 | 0x00, 0x00, // 381 | 0x0E, 0x00, // ### 382 | 0x1B, 0x00, // ## ## 383 | 0x31, 0x80, // ## ## 384 | 0x31, 0x80, // ## ## 385 | 0x31, 0x80, // ## ## 386 | 0x31, 0x80, // ## ## 387 | 0x31, 0x80, // ## ## 388 | 0x31, 0x80, // ## ## 389 | 0x1B, 0x00, // ## ## 390 | 0x0E, 0x00, // ### 391 | 0x00, 0x00, // 392 | 0x00, 0x00, // 393 | 0x00, 0x00, // 394 | 0x00, 0x00, // 395 | 0x00, 0x00, // 396 | 397 | // @544 '1' (11 pixels wide) 398 | 0x00, 0x00, // 399 | 0x06, 0x00, // ## 400 | 0x3E, 0x00, // ##### 401 | 0x06, 0x00, // ## 402 | 0x06, 0x00, // ## 403 | 0x06, 0x00, // ## 404 | 0x06, 0x00, // ## 405 | 0x06, 0x00, // ## 406 | 0x06, 0x00, // ## 407 | 0x06, 0x00, // ## 408 | 0x3F, 0xC0, // ######## 409 | 0x00, 0x00, // 410 | 0x00, 0x00, // 411 | 0x00, 0x00, // 412 | 0x00, 0x00, // 413 | 0x00, 0x00, // 414 | 415 | // @576 '2' (11 pixels wide) 416 | 0x00, 0x00, // 417 | 0x0F, 0x00, // #### 418 | 0x19, 0x80, // ## ## 419 | 0x31, 0x80, // ## ## 420 | 0x31, 0x80, // ## ## 421 | 0x03, 0x00, // ## 422 | 0x06, 0x00, // ## 423 | 0x0C, 0x00, // ## 424 | 0x18, 0x00, // ## 425 | 0x30, 0x00, // ## 426 | 0x3F, 0x80, // ####### 427 | 0x00, 0x00, // 428 | 0x00, 0x00, // 429 | 0x00, 0x00, // 430 | 0x00, 0x00, // 431 | 0x00, 0x00, // 432 | 433 | // @608 '3' (11 pixels wide) 434 | 0x00, 0x00, // 435 | 0x3F, 0x00, // ###### 436 | 0x61, 0x80, // ## ## 437 | 0x01, 0x80, // ## 438 | 0x03, 0x00, // ## 439 | 0x1F, 0x00, // ##### 440 | 0x03, 0x80, // ### 441 | 0x01, 0x80, // ## 442 | 0x01, 0x80, // ## 443 | 0x61, 0x80, // ## ## 444 | 0x3F, 0x00, // ###### 445 | 0x00, 0x00, // 446 | 0x00, 0x00, // 447 | 0x00, 0x00, // 448 | 0x00, 0x00, // 449 | 0x00, 0x00, // 450 | 451 | // @640 '4' (11 pixels wide) 452 | 0x00, 0x00, // 453 | 0x07, 0x00, // ### 454 | 0x07, 0x00, // ### 455 | 0x0F, 0x00, // #### 456 | 0x0B, 0x00, // # ## 457 | 0x1B, 0x00, // ## ## 458 | 0x13, 0x00, // # ## 459 | 0x33, 0x00, // ## ## 460 | 0x3F, 0x80, // ####### 461 | 0x03, 0x00, // ## 462 | 0x0F, 0x80, // ##### 463 | 0x00, 0x00, // 464 | 0x00, 0x00, // 465 | 0x00, 0x00, // 466 | 0x00, 0x00, // 467 | 0x00, 0x00, // 468 | 469 | // @672 '5' (11 pixels wide) 470 | 0x00, 0x00, // 471 | 0x1F, 0x80, // ###### 472 | 0x18, 0x00, // ## 473 | 0x18, 0x00, // ## 474 | 0x18, 0x00, // ## 475 | 0x1F, 0x00, // ##### 476 | 0x11, 0x80, // # ## 477 | 0x01, 0x80, // ## 478 | 0x01, 0x80, // ## 479 | 0x21, 0x80, // # ## 480 | 0x1F, 0x00, // ##### 481 | 0x00, 0x00, // 482 | 0x00, 0x00, // 483 | 0x00, 0x00, // 484 | 0x00, 0x00, // 485 | 0x00, 0x00, // 486 | 487 | // @704 '6' (11 pixels wide) 488 | 0x00, 0x00, // 489 | 0x07, 0x80, // #### 490 | 0x1C, 0x00, // ### 491 | 0x18, 0x00, // ## 492 | 0x30, 0x00, // ## 493 | 0x37, 0x00, // ## ### 494 | 0x39, 0x80, // ### ## 495 | 0x31, 0x80, // ## ## 496 | 0x31, 0x80, // ## ## 497 | 0x19, 0x80, // ## ## 498 | 0x0F, 0x00, // #### 499 | 0x00, 0x00, // 500 | 0x00, 0x00, // 501 | 0x00, 0x00, // 502 | 0x00, 0x00, // 503 | 0x00, 0x00, // 504 | 505 | // @736 '7' (11 pixels wide) 506 | 0x00, 0x00, // 507 | 0x7F, 0x00, // ####### 508 | 0x43, 0x00, // # ## 509 | 0x03, 0x00, // ## 510 | 0x06, 0x00, // ## 511 | 0x06, 0x00, // ## 512 | 0x06, 0x00, // ## 513 | 0x06, 0x00, // ## 514 | 0x0C, 0x00, // ## 515 | 0x0C, 0x00, // ## 516 | 0x0C, 0x00, // ## 517 | 0x00, 0x00, // 518 | 0x00, 0x00, // 519 | 0x00, 0x00, // 520 | 0x00, 0x00, // 521 | 0x00, 0x00, // 522 | 523 | // @768 '8' (11 pixels wide) 524 | 0x00, 0x00, // 525 | 0x1F, 0x00, // ##### 526 | 0x31, 0x80, // ## ## 527 | 0x31, 0x80, // ## ## 528 | 0x31, 0x80, // ## ## 529 | 0x1F, 0x00, // ##### 530 | 0x31, 0x80, // ## ## 531 | 0x31, 0x80, // ## ## 532 | 0x31, 0x80, // ## ## 533 | 0x31, 0x80, // ## ## 534 | 0x1F, 0x00, // ##### 535 | 0x00, 0x00, // 536 | 0x00, 0x00, // 537 | 0x00, 0x00, // 538 | 0x00, 0x00, // 539 | 0x00, 0x00, // 540 | 541 | // @800 '9' (11 pixels wide) 542 | 0x00, 0x00, // 543 | 0x1E, 0x00, // #### 544 | 0x33, 0x00, // ## ## 545 | 0x31, 0x80, // ## ## 546 | 0x31, 0x80, // ## ## 547 | 0x33, 0x80, // ## ### 548 | 0x1D, 0x80, // ### ## 549 | 0x01, 0x80, // ## 550 | 0x03, 0x00, // ## 551 | 0x07, 0x00, // ### 552 | 0x3C, 0x00, // #### 553 | 0x00, 0x00, // 554 | 0x00, 0x00, // 555 | 0x00, 0x00, // 556 | 0x00, 0x00, // 557 | 0x00, 0x00, // 558 | 559 | // @832 ':' (11 pixels wide) 560 | 0x00, 0x00, // 561 | 0x00, 0x00, // 562 | 0x00, 0x00, // 563 | 0x00, 0x00, // 564 | 0x0C, 0x00, // ## 565 | 0x0C, 0x00, // ## 566 | 0x00, 0x00, // 567 | 0x00, 0x00, // 568 | 0x00, 0x00, // 569 | 0x0C, 0x00, // ## 570 | 0x0C, 0x00, // ## 571 | 0x00, 0x00, // 572 | 0x00, 0x00, // 573 | 0x00, 0x00, // 574 | 0x00, 0x00, // 575 | 0x00, 0x00, // 576 | 577 | // @864 ';' (11 pixels wide) 578 | 0x00, 0x00, // 579 | 0x00, 0x00, // 580 | 0x00, 0x00, // 581 | 0x00, 0x00, // 582 | 0x03, 0x00, // ## 583 | 0x03, 0x00, // ## 584 | 0x00, 0x00, // 585 | 0x00, 0x00, // 586 | 0x00, 0x00, // 587 | 0x06, 0x00, // ## 588 | 0x04, 0x00, // # 589 | 0x08, 0x00, // # 590 | 0x08, 0x00, // # 591 | 0x00, 0x00, // 592 | 0x00, 0x00, // 593 | 0x00, 0x00, // 594 | 595 | // @896 '<' (11 pixels wide) 596 | 0x00, 0x00, // 597 | 0x00, 0x00, // 598 | 0x00, 0xC0, // ## 599 | 0x03, 0x00, // ## 600 | 0x04, 0x00, // # 601 | 0x18, 0x00, // ## 602 | 0x60, 0x00, // ## 603 | 0x18, 0x00, // ## 604 | 0x04, 0x00, // # 605 | 0x03, 0x00, // ## 606 | 0x00, 0xC0, // ## 607 | 0x00, 0x00, // 608 | 0x00, 0x00, // 609 | 0x00, 0x00, // 610 | 0x00, 0x00, // 611 | 0x00, 0x00, // 612 | 613 | // @928 '=' (11 pixels wide) 614 | 0x00, 0x00, // 615 | 0x00, 0x00, // 616 | 0x00, 0x00, // 617 | 0x00, 0x00, // 618 | 0x00, 0x00, // 619 | 0x7F, 0xC0, // ######### 620 | 0x00, 0x00, // 621 | 0x7F, 0xC0, // ######### 622 | 0x00, 0x00, // 623 | 0x00, 0x00, // 624 | 0x00, 0x00, // 625 | 0x00, 0x00, // 626 | 0x00, 0x00, // 627 | 0x00, 0x00, // 628 | 0x00, 0x00, // 629 | 0x00, 0x00, // 630 | 631 | // @960 '>' (11 pixels wide) 632 | 0x00, 0x00, // 633 | 0x00, 0x00, // 634 | 0x60, 0x00, // ## 635 | 0x18, 0x00, // ## 636 | 0x04, 0x00, // # 637 | 0x03, 0x00, // ## 638 | 0x00, 0xC0, // ## 639 | 0x03, 0x00, // ## 640 | 0x04, 0x00, // # 641 | 0x18, 0x00, // ## 642 | 0x60, 0x00, // ## 643 | 0x00, 0x00, // 644 | 0x00, 0x00, // 645 | 0x00, 0x00, // 646 | 0x00, 0x00, // 647 | 0x00, 0x00, // 648 | 649 | // @992 '?' (11 pixels wide) 650 | 0x00, 0x00, // 651 | 0x00, 0x00, // 652 | 0x1F, 0x00, // ##### 653 | 0x31, 0x80, // ## ## 654 | 0x31, 0x80, // ## ## 655 | 0x01, 0x80, // ## 656 | 0x07, 0x00, // ### 657 | 0x0C, 0x00, // ## 658 | 0x0C, 0x00, // ## 659 | 0x00, 0x00, // 660 | 0x0C, 0x00, // ## 661 | 0x00, 0x00, // 662 | 0x00, 0x00, // 663 | 0x00, 0x00, // 664 | 0x00, 0x00, // 665 | 0x00, 0x00, // 666 | 667 | // @1024 '@' (11 pixels wide) 668 | 0x00, 0x00, // 669 | 0x0E, 0x00, // ### 670 | 0x11, 0x00, // # # 671 | 0x21, 0x00, // # # 672 | 0x21, 0x00, // # # 673 | 0x27, 0x00, // # ### 674 | 0x29, 0x00, // # # # 675 | 0x29, 0x00, // # # # 676 | 0x27, 0x00, // # ### 677 | 0x20, 0x00, // # 678 | 0x11, 0x00, // # # 679 | 0x0E, 0x00, // ### 680 | 0x00, 0x00, // 681 | 0x00, 0x00, // 682 | 0x00, 0x00, // 683 | 0x00, 0x00, // 684 | 685 | // @1056 'A' (11 pixels wide) 686 | 0x00, 0x00, // 687 | 0x00, 0x00, // 688 | 0x3F, 0x00, // ###### 689 | 0x0F, 0x00, // #### 690 | 0x09, 0x00, // # # 691 | 0x19, 0x80, // ## ## 692 | 0x19, 0x80, // ## ## 693 | 0x1F, 0x80, // ###### 694 | 0x30, 0xC0, // ## ## 695 | 0x30, 0xC0, // ## ## 696 | 0x79, 0xE0, // #### #### 697 | 0x00, 0x00, // 698 | 0x00, 0x00, // 699 | 0x00, 0x00, // 700 | 0x00, 0x00, // 701 | 0x00, 0x00, // 702 | 703 | // @1088 'B' (11 pixels wide) 704 | 0x00, 0x00, // 705 | 0x00, 0x00, // 706 | 0x7F, 0x00, // ####### 707 | 0x31, 0x80, // ## ## 708 | 0x31, 0x80, // ## ## 709 | 0x31, 0x80, // ## ## 710 | 0x3F, 0x00, // ###### 711 | 0x31, 0x80, // ## ## 712 | 0x31, 0x80, // ## ## 713 | 0x31, 0x80, // ## ## 714 | 0x7F, 0x00, // ####### 715 | 0x00, 0x00, // 716 | 0x00, 0x00, // 717 | 0x00, 0x00, // 718 | 0x00, 0x00, // 719 | 0x00, 0x00, // 720 | 721 | // @1120 'C' (11 pixels wide) 722 | 0x00, 0x00, // 723 | 0x00, 0x00, // 724 | 0x1F, 0x40, // ##### # 725 | 0x30, 0xC0, // ## ## 726 | 0x60, 0x40, // ## # 727 | 0x60, 0x00, // ## 728 | 0x60, 0x00, // ## 729 | 0x60, 0x00, // ## 730 | 0x60, 0x40, // ## # 731 | 0x30, 0x80, // ## # 732 | 0x1F, 0x00, // ##### 733 | 0x00, 0x00, // 734 | 0x00, 0x00, // 735 | 0x00, 0x00, // 736 | 0x00, 0x00, // 737 | 0x00, 0x00, // 738 | 739 | // @1152 'D' (11 pixels wide) 740 | 0x00, 0x00, // 741 | 0x00, 0x00, // 742 | 0x7F, 0x00, // ####### 743 | 0x31, 0x80, // ## ## 744 | 0x30, 0xC0, // ## ## 745 | 0x30, 0xC0, // ## ## 746 | 0x30, 0xC0, // ## ## 747 | 0x30, 0xC0, // ## ## 748 | 0x30, 0xC0, // ## ## 749 | 0x31, 0x80, // ## ## 750 | 0x7F, 0x00, // ####### 751 | 0x00, 0x00, // 752 | 0x00, 0x00, // 753 | 0x00, 0x00, // 754 | 0x00, 0x00, // 755 | 0x00, 0x00, // 756 | 757 | // @1184 'E' (11 pixels wide) 758 | 0x00, 0x00, // 759 | 0x00, 0x00, // 760 | 0x7F, 0x80, // ######## 761 | 0x30, 0x80, // ## # 762 | 0x30, 0x80, // ## # 763 | 0x32, 0x00, // ## # 764 | 0x3E, 0x00, // ##### 765 | 0x32, 0x00, // ## # 766 | 0x30, 0x80, // ## # 767 | 0x30, 0x80, // ## # 768 | 0x7F, 0x80, // ######## 769 | 0x00, 0x00, // 770 | 0x00, 0x00, // 771 | 0x00, 0x00, // 772 | 0x00, 0x00, // 773 | 0x00, 0x00, // 774 | 775 | // @1216 'F' (11 pixels wide) 776 | 0x00, 0x00, // 777 | 0x00, 0x00, // 778 | 0x7F, 0xC0, // ######### 779 | 0x30, 0x40, // ## # 780 | 0x30, 0x40, // ## # 781 | 0x32, 0x00, // ## # 782 | 0x3E, 0x00, // ##### 783 | 0x32, 0x00, // ## # 784 | 0x30, 0x00, // ## 785 | 0x30, 0x00, // ## 786 | 0x7C, 0x00, // ##### 787 | 0x00, 0x00, // 788 | 0x00, 0x00, // 789 | 0x00, 0x00, // 790 | 0x00, 0x00, // 791 | 0x00, 0x00, // 792 | 793 | // @1248 'G' (11 pixels wide) 794 | 0x00, 0x00, // 795 | 0x00, 0x00, // 796 | 0x1E, 0x80, // #### # 797 | 0x31, 0x80, // ## ## 798 | 0x60, 0x80, // ## # 799 | 0x60, 0x00, // ## 800 | 0x60, 0x00, // ## 801 | 0x67, 0xC0, // ## ##### 802 | 0x61, 0x80, // ## ## 803 | 0x31, 0x80, // ## ## 804 | 0x1F, 0x00, // ##### 805 | 0x00, 0x00, // 806 | 0x00, 0x00, // 807 | 0x00, 0x00, // 808 | 0x00, 0x00, // 809 | 0x00, 0x00, // 810 | 811 | // @1280 'H' (11 pixels wide) 812 | 0x00, 0x00, // 813 | 0x00, 0x00, // 814 | 0x7B, 0xC0, // #### #### 815 | 0x31, 0x80, // ## ## 816 | 0x31, 0x80, // ## ## 817 | 0x31, 0x80, // ## ## 818 | 0x3F, 0x80, // ####### 819 | 0x31, 0x80, // ## ## 820 | 0x31, 0x80, // ## ## 821 | 0x31, 0x80, // ## ## 822 | 0x7B, 0xC0, // #### #### 823 | 0x00, 0x00, // 824 | 0x00, 0x00, // 825 | 0x00, 0x00, // 826 | 0x00, 0x00, // 827 | 0x00, 0x00, // 828 | 829 | // @1312 'I' (11 pixels wide) 830 | 0x00, 0x00, // 831 | 0x00, 0x00, // 832 | 0x3F, 0xC0, // ######## 833 | 0x06, 0x00, // ## 834 | 0x06, 0x00, // ## 835 | 0x06, 0x00, // ## 836 | 0x06, 0x00, // ## 837 | 0x06, 0x00, // ## 838 | 0x06, 0x00, // ## 839 | 0x06, 0x00, // ## 840 | 0x3F, 0xC0, // ######## 841 | 0x00, 0x00, // 842 | 0x00, 0x00, // 843 | 0x00, 0x00, // 844 | 0x00, 0x00, // 845 | 0x00, 0x00, // 846 | 847 | // @1344 'J' (11 pixels wide) 848 | 0x00, 0x00, // 849 | 0x00, 0x00, // 850 | 0x1F, 0xC0, // ####### 851 | 0x03, 0x00, // ## 852 | 0x03, 0x00, // ## 853 | 0x03, 0x00, // ## 854 | 0x03, 0x00, // ## 855 | 0x63, 0x00, // ## ## 856 | 0x63, 0x00, // ## ## 857 | 0x63, 0x00, // ## ## 858 | 0x3E, 0x00, // ##### 859 | 0x00, 0x00, // 860 | 0x00, 0x00, // 861 | 0x00, 0x00, // 862 | 0x00, 0x00, // 863 | 0x00, 0x00, // 864 | 865 | // @1376 'K' (11 pixels wide) 866 | 0x00, 0x00, // 867 | 0x00, 0x00, // 868 | 0x7B, 0xC0, // #### #### 869 | 0x31, 0x80, // ## ## 870 | 0x33, 0x00, // ## ## 871 | 0x36, 0x00, // ## ## 872 | 0x3C, 0x00, // #### 873 | 0x3E, 0x00, // ##### 874 | 0x33, 0x00, // ## ## 875 | 0x31, 0x80, // ## ## 876 | 0x79, 0xC0, // #### ### 877 | 0x00, 0x00, // 878 | 0x00, 0x00, // 879 | 0x00, 0x00, // 880 | 0x00, 0x00, // 881 | 0x00, 0x00, // 882 | 883 | // @1408 'L' (11 pixels wide) 884 | 0x00, 0x00, // 885 | 0x00, 0x00, // 886 | 0x7E, 0x00, // ###### 887 | 0x18, 0x00, // ## 888 | 0x18, 0x00, // ## 889 | 0x18, 0x00, // ## 890 | 0x18, 0x00, // ## 891 | 0x18, 0x40, // ## # 892 | 0x18, 0x40, // ## # 893 | 0x18, 0x40, // ## # 894 | 0x7F, 0xC0, // ######### 895 | 0x00, 0x00, // 896 | 0x00, 0x00, // 897 | 0x00, 0x00, // 898 | 0x00, 0x00, // 899 | 0x00, 0x00, // 900 | 901 | // @1440 'M' (11 pixels wide) 902 | 0x00, 0x00, // 903 | 0x00, 0x00, // 904 | 0xE0, 0xE0, // ### ### 905 | 0x60, 0xC0, // ## ## 906 | 0x71, 0xC0, // ### ### 907 | 0x7B, 0xC0, // #### #### 908 | 0x6A, 0xC0, // ## # # ## 909 | 0x6E, 0xC0, // ## ### ## 910 | 0x64, 0xC0, // ## # ## 911 | 0x60, 0xC0, // ## ## 912 | 0xFB, 0xE0, // ##### ##### 913 | 0x00, 0x00, // 914 | 0x00, 0x00, // 915 | 0x00, 0x00, // 916 | 0x00, 0x00, // 917 | 0x00, 0x00, // 918 | 919 | // @1472 'N' (11 pixels wide) 920 | 0x00, 0x00, // 921 | 0x00, 0x00, // 922 | 0x73, 0xC0, // ### #### 923 | 0x31, 0x80, // ## ## 924 | 0x39, 0x80, // ### ## 925 | 0x3D, 0x80, // #### ## 926 | 0x35, 0x80, // ## # ## 927 | 0x37, 0x80, // ## #### 928 | 0x33, 0x80, // ## ### 929 | 0x31, 0x80, // ## ## 930 | 0x79, 0x80, // #### ## 931 | 0x00, 0x00, // 932 | 0x00, 0x00, // 933 | 0x00, 0x00, // 934 | 0x00, 0x00, // 935 | 0x00, 0x00, // 936 | 937 | // @1504 'O' (11 pixels wide) 938 | 0x00, 0x00, // 939 | 0x00, 0x00, // 940 | 0x1F, 0x00, // ##### 941 | 0x31, 0x80, // ## ## 942 | 0x60, 0xC0, // ## ## 943 | 0x60, 0xC0, // ## ## 944 | 0x60, 0xC0, // ## ## 945 | 0x60, 0xC0, // ## ## 946 | 0x60, 0xC0, // ## ## 947 | 0x31, 0x80, // ## ## 948 | 0x1F, 0x00, // ##### 949 | 0x00, 0x00, // 950 | 0x00, 0x00, // 951 | 0x00, 0x00, // 952 | 0x00, 0x00, // 953 | 0x00, 0x00, // 954 | 955 | // @1536 'P' (11 pixels wide) 956 | 0x00, 0x00, // 957 | 0x00, 0x00, // 958 | 0x7F, 0x00, // ####### 959 | 0x31, 0x80, // ## ## 960 | 0x31, 0x80, // ## ## 961 | 0x31, 0x80, // ## ## 962 | 0x31, 0x80, // ## ## 963 | 0x3F, 0x00, // ###### 964 | 0x30, 0x00, // ## 965 | 0x30, 0x00, // ## 966 | 0x7E, 0x00, // ###### 967 | 0x00, 0x00, // 968 | 0x00, 0x00, // 969 | 0x00, 0x00, // 970 | 0x00, 0x00, // 971 | 0x00, 0x00, // 972 | 973 | // @1568 'Q' (11 pixels wide) 974 | 0x00, 0x00, // 975 | 0x00, 0x00, // 976 | 0x1F, 0x00, // ##### 977 | 0x31, 0x80, // ## ## 978 | 0x60, 0xC0, // ## ## 979 | 0x60, 0xC0, // ## ## 980 | 0x60, 0xC0, // ## ## 981 | 0x60, 0xC0, // ## ## 982 | 0x60, 0xC0, // ## ## 983 | 0x31, 0x80, // ## ## 984 | 0x1F, 0x00, // ##### 985 | 0x0C, 0xC0, // ## ## 986 | 0x1F, 0x80, // ###### 987 | 0x00, 0x00, // 988 | 0x00, 0x00, // 989 | 0x00, 0x00, // 990 | 991 | // @1600 'R' (11 pixels wide) 992 | 0x00, 0x00, // 993 | 0x00, 0x00, // 994 | 0x7F, 0x00, // ####### 995 | 0x31, 0x80, // ## ## 996 | 0x31, 0x80, // ## ## 997 | 0x31, 0x80, // ## ## 998 | 0x3E, 0x00, // ##### 999 | 0x33, 0x00, // ## ## 1000 | 0x31, 0x80, // ## ## 1001 | 0x31, 0x80, // ## ## 1002 | 0x7C, 0xE0, // ##### ### 1003 | 0x00, 0x00, // 1004 | 0x00, 0x00, // 1005 | 0x00, 0x00, // 1006 | 0x00, 0x00, // 1007 | 0x00, 0x00, // 1008 | 1009 | // @1632 'S' (11 pixels wide) 1010 | 0x00, 0x00, // 1011 | 0x00, 0x00, // 1012 | 0x1F, 0x80, // ###### 1013 | 0x31, 0x80, // ## ## 1014 | 0x31, 0x80, // ## ## 1015 | 0x38, 0x00, // ### 1016 | 0x1F, 0x00, // ##### 1017 | 0x03, 0x80, // ### 1018 | 0x31, 0x80, // ## ## 1019 | 0x31, 0x80, // ## ## 1020 | 0x3F, 0x00, // ###### 1021 | 0x00, 0x00, // 1022 | 0x00, 0x00, // 1023 | 0x00, 0x00, // 1024 | 0x00, 0x00, // 1025 | 0x00, 0x00, // 1026 | 1027 | // @1664 'T' (11 pixels wide) 1028 | 0x00, 0x00, // 1029 | 0x00, 0x00, // 1030 | 0x7F, 0x80, // ######## 1031 | 0x4C, 0x80, // # ## # 1032 | 0x4C, 0x80, // # ## # 1033 | 0x4C, 0x80, // # ## # 1034 | 0x0C, 0x00, // ## 1035 | 0x0C, 0x00, // ## 1036 | 0x0C, 0x00, // ## 1037 | 0x0C, 0x00, // ## 1038 | 0x3F, 0x00, // ###### 1039 | 0x00, 0x00, // 1040 | 0x00, 0x00, // 1041 | 0x00, 0x00, // 1042 | 0x00, 0x00, // 1043 | 0x00, 0x00, // 1044 | 1045 | // @1696 'U' (11 pixels wide) 1046 | 0x00, 0x00, // 1047 | 0x00, 0x00, // 1048 | 0x7B, 0xC0, // #### #### 1049 | 0x31, 0x80, // ## ## 1050 | 0x31, 0x80, // ## ## 1051 | 0x31, 0x80, // ## ## 1052 | 0x31, 0x80, // ## ## 1053 | 0x31, 0x80, // ## ## 1054 | 0x31, 0x80, // ## ## 1055 | 0x31, 0x80, // ## ## 1056 | 0x1F, 0x00, // ##### 1057 | 0x00, 0x00, // 1058 | 0x00, 0x00, // 1059 | 0x00, 0x00, // 1060 | 0x00, 0x00, // 1061 | 0x00, 0x00, // 1062 | 1063 | // @1728 'V' (11 pixels wide) 1064 | 0x00, 0x00, // 1065 | 0x00, 0x00, // 1066 | 0x7B, 0xC0, // #### #### 1067 | 0x31, 0x80, // ## ## 1068 | 0x31, 0x80, // ## ## 1069 | 0x1B, 0x00, // ## ## 1070 | 0x1B, 0x00, // ## ## 1071 | 0x1B, 0x00, // ## ## 1072 | 0x0A, 0x00, // # # 1073 | 0x0E, 0x00, // ### 1074 | 0x0E, 0x00, // ### 1075 | 0x00, 0x00, // 1076 | 0x00, 0x00, // 1077 | 0x00, 0x00, // 1078 | 0x00, 0x00, // 1079 | 0x00, 0x00, // 1080 | 1081 | // @1760 'W' (11 pixels wide) 1082 | 0x00, 0x00, // 1083 | 0x00, 0x00, // 1084 | 0xFB, 0xE0, // ##### ##### 1085 | 0x60, 0xC0, // ## ## 1086 | 0x64, 0xC0, // ## # ## 1087 | 0x6E, 0xC0, // ## ### ## 1088 | 0x6E, 0xC0, // ## ### ## 1089 | 0x2A, 0x80, // # # # # 1090 | 0x3B, 0x80, // ### ### 1091 | 0x3B, 0x80, // ### ### 1092 | 0x31, 0x80, // ## ## 1093 | 0x00, 0x00, // 1094 | 0x00, 0x00, // 1095 | 0x00, 0x00, // 1096 | 0x00, 0x00, // 1097 | 0x00, 0x00, // 1098 | 1099 | // @1792 'X' (11 pixels wide) 1100 | 0x00, 0x00, // 1101 | 0x00, 0x00, // 1102 | 0x7B, 0xC0, // #### #### 1103 | 0x31, 0x80, // ## ## 1104 | 0x1B, 0x00, // ## ## 1105 | 0x0E, 0x00, // ### 1106 | 0x0E, 0x00, // ### 1107 | 0x0E, 0x00, // ### 1108 | 0x1B, 0x00, // ## ## 1109 | 0x31, 0x80, // ## ## 1110 | 0x7B, 0xC0, // #### #### 1111 | 0x00, 0x00, // 1112 | 0x00, 0x00, // 1113 | 0x00, 0x00, // 1114 | 0x00, 0x00, // 1115 | 0x00, 0x00, // 1116 | 1117 | // @1824 'Y' (11 pixels wide) 1118 | 0x00, 0x00, // 1119 | 0x00, 0x00, // 1120 | 0x79, 0xE0, // #### #### 1121 | 0x30, 0xC0, // ## ## 1122 | 0x19, 0x80, // ## ## 1123 | 0x0F, 0x00, // #### 1124 | 0x06, 0x00, // ## 1125 | 0x06, 0x00, // ## 1126 | 0x06, 0x00, // ## 1127 | 0x06, 0x00, // ## 1128 | 0x1F, 0x80, // ###### 1129 | 0x00, 0x00, // 1130 | 0x00, 0x00, // 1131 | 0x00, 0x00, // 1132 | 0x00, 0x00, // 1133 | 0x00, 0x00, // 1134 | 1135 | // @1856 'Z' (11 pixels wide) 1136 | 0x00, 0x00, // 1137 | 0x00, 0x00, // 1138 | 0x3F, 0x80, // ####### 1139 | 0x21, 0x80, // # ## 1140 | 0x23, 0x00, // # ## 1141 | 0x06, 0x00, // ## 1142 | 0x04, 0x00, // # 1143 | 0x0C, 0x00, // ## 1144 | 0x18, 0x80, // ## # 1145 | 0x30, 0x80, // ## # 1146 | 0x3F, 0x80, // ####### 1147 | 0x00, 0x00, // 1148 | 0x00, 0x00, // 1149 | 0x00, 0x00, // 1150 | 0x00, 0x00, // 1151 | 0x00, 0x00, // 1152 | 1153 | // @1888 '[' (11 pixels wide) 1154 | 0x00, 0x00, // 1155 | 0x07, 0x80, // #### 1156 | 0x06, 0x00, // ## 1157 | 0x06, 0x00, // ## 1158 | 0x06, 0x00, // ## 1159 | 0x06, 0x00, // ## 1160 | 0x06, 0x00, // ## 1161 | 0x06, 0x00, // ## 1162 | 0x06, 0x00, // ## 1163 | 0x06, 0x00, // ## 1164 | 0x06, 0x00, // ## 1165 | 0x06, 0x00, // ## 1166 | 0x07, 0x80, // #### 1167 | 0x00, 0x00, // 1168 | 0x00, 0x00, // 1169 | 0x00, 0x00, // 1170 | 1171 | // @1920 '\' (11 pixels wide) 1172 | 0x30, 0x00, // ## 1173 | 0x30, 0x00, // ## 1174 | 0x18, 0x00, // ## 1175 | 0x18, 0x00, // ## 1176 | 0x0C, 0x00, // ## 1177 | 0x0C, 0x00, // ## 1178 | 0x06, 0x00, // ## 1179 | 0x03, 0x00, // ## 1180 | 0x03, 0x00, // ## 1181 | 0x01, 0x80, // ## 1182 | 0x01, 0x80, // ## 1183 | 0x00, 0xC0, // ## 1184 | 0x00, 0xC0, // ## 1185 | 0x00, 0x00, // 1186 | 0x00, 0x00, // 1187 | 0x00, 0x00, // 1188 | 1189 | // @1952 ']' (11 pixels wide) 1190 | 0x00, 0x00, // 1191 | 0x1E, 0x00, // #### 1192 | 0x06, 0x00, // ## 1193 | 0x06, 0x00, // ## 1194 | 0x06, 0x00, // ## 1195 | 0x06, 0x00, // ## 1196 | 0x06, 0x00, // ## 1197 | 0x06, 0x00, // ## 1198 | 0x06, 0x00, // ## 1199 | 0x06, 0x00, // ## 1200 | 0x06, 0x00, // ## 1201 | 0x06, 0x00, // ## 1202 | 0x1E, 0x00, // #### 1203 | 0x00, 0x00, // 1204 | 0x00, 0x00, // 1205 | 0x00, 0x00, // 1206 | 1207 | // @1984 '^' (11 pixels wide) 1208 | 0x04, 0x00, // # 1209 | 0x0A, 0x00, // # # 1210 | 0x0A, 0x00, // # # 1211 | 0x11, 0x00, // # # 1212 | 0x20, 0x80, // # # 1213 | 0x20, 0x80, // # # 1214 | 0x00, 0x00, // 1215 | 0x00, 0x00, // 1216 | 0x00, 0x00, // 1217 | 0x00, 0x00, // 1218 | 0x00, 0x00, // 1219 | 0x00, 0x00, // 1220 | 0x00, 0x00, // 1221 | 0x00, 0x00, // 1222 | 0x00, 0x00, // 1223 | 0x00, 0x00, // 1224 | 1225 | // @2016 '_' (11 pixels wide) 1226 | 0x00, 0x00, // 1227 | 0x00, 0x00, // 1228 | 0x00, 0x00, // 1229 | 0x00, 0x00, // 1230 | 0x00, 0x00, // 1231 | 0x00, 0x00, // 1232 | 0x00, 0x00, // 1233 | 0x00, 0x00, // 1234 | 0x00, 0x00, // 1235 | 0x00, 0x00, // 1236 | 0x00, 0x00, // 1237 | 0x00, 0x00, // 1238 | 0x00, 0x00, // 1239 | 0x00, 0x00, // 1240 | 0x00, 0x00, // 1241 | 0xFF, 0xE0, // ########### 1242 | 1243 | // @2048 '`' (11 pixels wide) 1244 | 0x08, 0x00, // # 1245 | 0x04, 0x00, // # 1246 | 0x02, 0x00, // # 1247 | 0x00, 0x00, // 1248 | 0x00, 0x00, // 1249 | 0x00, 0x00, // 1250 | 0x00, 0x00, // 1251 | 0x00, 0x00, // 1252 | 0x00, 0x00, // 1253 | 0x00, 0x00, // 1254 | 0x00, 0x00, // 1255 | 0x00, 0x00, // 1256 | 0x00, 0x00, // 1257 | 0x00, 0x00, // 1258 | 0x00, 0x00, // 1259 | 0x00, 0x00, // 1260 | 1261 | // @2080 'a' (11 pixels wide) 1262 | 0x00, 0x00, // 1263 | 0x00, 0x00, // 1264 | 0x00, 0x00, // 1265 | 0x00, 0x00, // 1266 | 0x1F, 0x00, // ##### 1267 | 0x01, 0x80, // ## 1268 | 0x01, 0x80, // ## 1269 | 0x1F, 0x80, // ###### 1270 | 0x31, 0x80, // ## ## 1271 | 0x33, 0x80, // ## ### 1272 | 0x1D, 0xC0, // ### ### 1273 | 0x00, 0x00, // 1274 | 0x00, 0x00, // 1275 | 0x00, 0x00, // 1276 | 0x00, 0x00, // 1277 | 0x00, 0x00, // 1278 | 1279 | // @2112 'b' (11 pixels wide) 1280 | 0x00, 0x00, // 1281 | 0x70, 0x00, // ### 1282 | 0x30, 0x00, // ## 1283 | 0x30, 0x00, // ## 1284 | 0x37, 0x00, // ## ### 1285 | 0x39, 0x80, // ### ## 1286 | 0x30, 0xC0, // ## ## 1287 | 0x30, 0xC0, // ## ## 1288 | 0x30, 0xC0, // ## ## 1289 | 0x39, 0x80, // ### ## 1290 | 0x77, 0x00, // ### ### 1291 | 0x00, 0x00, // 1292 | 0x00, 0x00, // 1293 | 0x00, 0x00, // 1294 | 0x00, 0x00, // 1295 | 0x00, 0x00, // 1296 | 1297 | // @2144 'c' (11 pixels wide) 1298 | 0x00, 0x00, // 1299 | 0x00, 0x00, // 1300 | 0x00, 0x00, // 1301 | 0x00, 0x00, // 1302 | 0x1E, 0x80, // #### # 1303 | 0x31, 0x80, // ## ## 1304 | 0x60, 0x80, // ## # 1305 | 0x60, 0x00, // ## 1306 | 0x60, 0x80, // ## # 1307 | 0x31, 0x80, // ## ## 1308 | 0x1F, 0x00, // ##### 1309 | 0x00, 0x00, // 1310 | 0x00, 0x00, // 1311 | 0x00, 0x00, // 1312 | 0x00, 0x00, // 1313 | 0x00, 0x00, // 1314 | 1315 | // @2176 'd' (11 pixels wide) 1316 | 0x00, 0x00, // 1317 | 0x03, 0x80, // ### 1318 | 0x01, 0x80, // ## 1319 | 0x01, 0x80, // ## 1320 | 0x1D, 0x80, // ### ## 1321 | 0x33, 0x80, // ## ### 1322 | 0x61, 0x80, // ## ## 1323 | 0x61, 0x80, // ## ## 1324 | 0x61, 0x80, // ## ## 1325 | 0x33, 0x80, // ## ### 1326 | 0x1D, 0xC0, // ### ### 1327 | 0x00, 0x00, // 1328 | 0x00, 0x00, // 1329 | 0x00, 0x00, // 1330 | 0x00, 0x00, // 1331 | 0x00, 0x00, // 1332 | 1333 | // @2208 'e' (11 pixels wide) 1334 | 0x00, 0x00, // 1335 | 0x00, 0x00, // 1336 | 0x00, 0x00, // 1337 | 0x00, 0x00, // 1338 | 0x1F, 0x00, // ##### 1339 | 0x31, 0x80, // ## ## 1340 | 0x60, 0xC0, // ## ## 1341 | 0x7F, 0xC0, // ######### 1342 | 0x60, 0x00, // ## 1343 | 0x30, 0xC0, // ## ## 1344 | 0x1F, 0x80, // ###### 1345 | 0x00, 0x00, // 1346 | 0x00, 0x00, // 1347 | 0x00, 0x00, // 1348 | 0x00, 0x00, // 1349 | 0x00, 0x00, // 1350 | 1351 | // @2240 'f' (11 pixels wide) 1352 | 0x00, 0x00, // 1353 | 0x07, 0xE0, // ###### 1354 | 0x0C, 0x00, // ## 1355 | 0x0C, 0x00, // ## 1356 | 0x3F, 0x80, // ####### 1357 | 0x0C, 0x00, // ## 1358 | 0x0C, 0x00, // ## 1359 | 0x0C, 0x00, // ## 1360 | 0x0C, 0x00, // ## 1361 | 0x0C, 0x00, // ## 1362 | 0x3F, 0x80, // ####### 1363 | 0x00, 0x00, // 1364 | 0x00, 0x00, // 1365 | 0x00, 0x00, // 1366 | 0x00, 0x00, // 1367 | 0x00, 0x00, // 1368 | 1369 | // @2272 'g' (11 pixels wide) 1370 | 0x00, 0x00, // 1371 | 0x00, 0x00, // 1372 | 0x00, 0x00, // 1373 | 0x00, 0x00, // 1374 | 0x1D, 0xC0, // ### ### 1375 | 0x33, 0x80, // ## ### 1376 | 0x61, 0x80, // ## ## 1377 | 0x61, 0x80, // ## ## 1378 | 0x61, 0x80, // ## ## 1379 | 0x33, 0x80, // ## ### 1380 | 0x1D, 0x80, // ### ## 1381 | 0x01, 0x80, // ## 1382 | 0x01, 0x80, // ## 1383 | 0x1F, 0x00, // ##### 1384 | 0x00, 0x00, // 1385 | 0x00, 0x00, // 1386 | 1387 | // @2304 'h' (11 pixels wide) 1388 | 0x00, 0x00, // 1389 | 0x70, 0x00, // ### 1390 | 0x30, 0x00, // ## 1391 | 0x30, 0x00, // ## 1392 | 0x37, 0x00, // ## ### 1393 | 0x39, 0x80, // ### ## 1394 | 0x31, 0x80, // ## ## 1395 | 0x31, 0x80, // ## ## 1396 | 0x31, 0x80, // ## ## 1397 | 0x31, 0x80, // ## ## 1398 | 0x7B, 0xC0, // #### #### 1399 | 0x00, 0x00, // 1400 | 0x00, 0x00, // 1401 | 0x00, 0x00, // 1402 | 0x00, 0x00, // 1403 | 0x00, 0x00, // 1404 | 1405 | // @2336 'i' (11 pixels wide) 1406 | 0x00, 0x00, // 1407 | 0x06, 0x00, // ## 1408 | 0x06, 0x00, // ## 1409 | 0x00, 0x00, // 1410 | 0x1E, 0x00, // #### 1411 | 0x06, 0x00, // ## 1412 | 0x06, 0x00, // ## 1413 | 0x06, 0x00, // ## 1414 | 0x06, 0x00, // ## 1415 | 0x06, 0x00, // ## 1416 | 0x3F, 0xC0, // ######## 1417 | 0x00, 0x00, // 1418 | 0x00, 0x00, // 1419 | 0x00, 0x00, // 1420 | 0x00, 0x00, // 1421 | 0x00, 0x00, // 1422 | 1423 | // @2368 'j' (11 pixels wide) 1424 | 0x00, 0x00, // 1425 | 0x06, 0x00, // ## 1426 | 0x06, 0x00, // ## 1427 | 0x00, 0x00, // 1428 | 0x3F, 0x00, // ###### 1429 | 0x03, 0x00, // ## 1430 | 0x03, 0x00, // ## 1431 | 0x03, 0x00, // ## 1432 | 0x03, 0x00, // ## 1433 | 0x03, 0x00, // ## 1434 | 0x03, 0x00, // ## 1435 | 0x03, 0x00, // ## 1436 | 0x03, 0x00, // ## 1437 | 0x3E, 0x00, // ##### 1438 | 0x00, 0x00, // 1439 | 0x00, 0x00, // 1440 | 1441 | // @2400 'k' (11 pixels wide) 1442 | 0x00, 0x00, // 1443 | 0x70, 0x00, // ### 1444 | 0x30, 0x00, // ## 1445 | 0x30, 0x00, // ## 1446 | 0x37, 0x80, // ## #### 1447 | 0x36, 0x00, // ## ## 1448 | 0x3C, 0x00, // #### 1449 | 0x3C, 0x00, // #### 1450 | 0x36, 0x00, // ## ## 1451 | 0x33, 0x00, // ## ## 1452 | 0x77, 0xC0, // ### ##### 1453 | 0x00, 0x00, // 1454 | 0x00, 0x00, // 1455 | 0x00, 0x00, // 1456 | 0x00, 0x00, // 1457 | 0x00, 0x00, // 1458 | 1459 | // @2432 'l' (11 pixels wide) 1460 | 0x00, 0x00, // 1461 | 0x1E, 0x00, // #### 1462 | 0x06, 0x00, // ## 1463 | 0x06, 0x00, // ## 1464 | 0x06, 0x00, // ## 1465 | 0x06, 0x00, // ## 1466 | 0x06, 0x00, // ## 1467 | 0x06, 0x00, // ## 1468 | 0x06, 0x00, // ## 1469 | 0x06, 0x00, // ## 1470 | 0x3F, 0xC0, // ######## 1471 | 0x00, 0x00, // 1472 | 0x00, 0x00, // 1473 | 0x00, 0x00, // 1474 | 0x00, 0x00, // 1475 | 0x00, 0x00, // 1476 | 1477 | // @2464 'm' (11 pixels wide) 1478 | 0x00, 0x00, // 1479 | 0x00, 0x00, // 1480 | 0x00, 0x00, // 1481 | 0x00, 0x00, // 1482 | 0x7F, 0x80, // ######## 1483 | 0x36, 0xC0, // ## ## ## 1484 | 0x36, 0xC0, // ## ## ## 1485 | 0x36, 0xC0, // ## ## ## 1486 | 0x36, 0xC0, // ## ## ## 1487 | 0x36, 0xC0, // ## ## ## 1488 | 0x76, 0xE0, // ### ## ### 1489 | 0x00, 0x00, // 1490 | 0x00, 0x00, // 1491 | 0x00, 0x00, // 1492 | 0x00, 0x00, // 1493 | 0x00, 0x00, // 1494 | 1495 | // @2496 'n' (11 pixels wide) 1496 | 0x00, 0x00, // 1497 | 0x00, 0x00, // 1498 | 0x00, 0x00, // 1499 | 0x00, 0x00, // 1500 | 0x77, 0x00, // ### ### 1501 | 0x39, 0x80, // ### ## 1502 | 0x31, 0x80, // ## ## 1503 | 0x31, 0x80, // ## ## 1504 | 0x31, 0x80, // ## ## 1505 | 0x31, 0x80, // ## ## 1506 | 0x7B, 0xC0, // #### #### 1507 | 0x00, 0x00, // 1508 | 0x00, 0x00, // 1509 | 0x00, 0x00, // 1510 | 0x00, 0x00, // 1511 | 0x00, 0x00, // 1512 | 1513 | // @2528 'o' (11 pixels wide) 1514 | 0x00, 0x00, // 1515 | 0x00, 0x00, // 1516 | 0x00, 0x00, // 1517 | 0x00, 0x00, // 1518 | 0x1F, 0x00, // ##### 1519 | 0x31, 0x80, // ## ## 1520 | 0x60, 0xC0, // ## ## 1521 | 0x60, 0xC0, // ## ## 1522 | 0x60, 0xC0, // ## ## 1523 | 0x31, 0x80, // ## ## 1524 | 0x1F, 0x00, // ##### 1525 | 0x00, 0x00, // 1526 | 0x00, 0x00, // 1527 | 0x00, 0x00, // 1528 | 0x00, 0x00, // 1529 | 0x00, 0x00, // 1530 | 1531 | // @2560 'p' (11 pixels wide) 1532 | 0x00, 0x00, // 1533 | 0x00, 0x00, // 1534 | 0x00, 0x00, // 1535 | 0x00, 0x00, // 1536 | 0x77, 0x00, // ### ### 1537 | 0x39, 0x80, // ### ## 1538 | 0x30, 0xC0, // ## ## 1539 | 0x30, 0xC0, // ## ## 1540 | 0x30, 0xC0, // ## ## 1541 | 0x39, 0x80, // ### ## 1542 | 0x37, 0x00, // ## ### 1543 | 0x30, 0x00, // ## 1544 | 0x30, 0x00, // ## 1545 | 0x7C, 0x00, // ##### 1546 | 0x00, 0x00, // 1547 | 0x00, 0x00, // 1548 | 1549 | // @2592 'q' (11 pixels wide) 1550 | 0x00, 0x00, // 1551 | 0x00, 0x00, // 1552 | 0x00, 0x00, // 1553 | 0x00, 0x00, // 1554 | 0x1D, 0xC0, // ### ### 1555 | 0x33, 0x80, // ## ### 1556 | 0x61, 0x80, // ## ## 1557 | 0x61, 0x80, // ## ## 1558 | 0x61, 0x80, // ## ## 1559 | 0x33, 0x80, // ## ### 1560 | 0x1D, 0x80, // ### ## 1561 | 0x01, 0x80, // ## 1562 | 0x01, 0x80, // ## 1563 | 0x07, 0xC0, // ##### 1564 | 0x00, 0x00, // 1565 | 0x00, 0x00, // 1566 | 1567 | // @2624 'r' (11 pixels wide) 1568 | 0x00, 0x00, // 1569 | 0x00, 0x00, // 1570 | 0x00, 0x00, // 1571 | 0x00, 0x00, // 1572 | 0x7B, 0x80, // #### ### 1573 | 0x1C, 0xC0, // ### ## 1574 | 0x18, 0x00, // ## 1575 | 0x18, 0x00, // ## 1576 | 0x18, 0x00, // ## 1577 | 0x18, 0x00, // ## 1578 | 0x7F, 0x00, // ####### 1579 | 0x00, 0x00, // 1580 | 0x00, 0x00, // 1581 | 0x00, 0x00, // 1582 | 0x00, 0x00, // 1583 | 0x00, 0x00, // 1584 | 1585 | // @2656 's' (11 pixels wide) 1586 | 0x00, 0x00, // 1587 | 0x00, 0x00, // 1588 | 0x00, 0x00, // 1589 | 0x00, 0x00, // 1590 | 0x1F, 0x80, // ###### 1591 | 0x31, 0x80, // ## ## 1592 | 0x3C, 0x00, // #### 1593 | 0x1F, 0x00, // ##### 1594 | 0x03, 0x80, // ### 1595 | 0x31, 0x80, // ## ## 1596 | 0x3F, 0x00, // ###### 1597 | 0x00, 0x00, // 1598 | 0x00, 0x00, // 1599 | 0x00, 0x00, // 1600 | 0x00, 0x00, // 1601 | 0x00, 0x00, // 1602 | 1603 | // @2688 't' (11 pixels wide) 1604 | 0x00, 0x00, // 1605 | 0x18, 0x00, // ## 1606 | 0x18, 0x00, // ## 1607 | 0x18, 0x00, // ## 1608 | 0x7F, 0x00, // ####### 1609 | 0x18, 0x00, // ## 1610 | 0x18, 0x00, // ## 1611 | 0x18, 0x00, // ## 1612 | 0x18, 0x00, // ## 1613 | 0x18, 0x80, // ## # 1614 | 0x0F, 0x00, // #### 1615 | 0x00, 0x00, // 1616 | 0x00, 0x00, // 1617 | 0x00, 0x00, // 1618 | 0x00, 0x00, // 1619 | 0x00, 0x00, // 1620 | 1621 | // @2720 'u' (11 pixels wide) 1622 | 0x00, 0x00, // 1623 | 0x00, 0x00, // 1624 | 0x00, 0x00, // 1625 | 0x00, 0x00, // 1626 | 0x73, 0x80, // ### ### 1627 | 0x31, 0x80, // ## ## 1628 | 0x31, 0x80, // ## ## 1629 | 0x31, 0x80, // ## ## 1630 | 0x31, 0x80, // ## ## 1631 | 0x33, 0x80, // ## ### 1632 | 0x1D, 0xC0, // ### ### 1633 | 0x00, 0x00, // 1634 | 0x00, 0x00, // 1635 | 0x00, 0x00, // 1636 | 0x00, 0x00, // 1637 | 0x00, 0x00, // 1638 | 1639 | // @2752 'v' (11 pixels wide) 1640 | 0x00, 0x00, // 1641 | 0x00, 0x00, // 1642 | 0x00, 0x00, // 1643 | 0x00, 0x00, // 1644 | 0x7B, 0xC0, // #### #### 1645 | 0x31, 0x80, // ## ## 1646 | 0x31, 0x80, // ## ## 1647 | 0x1B, 0x00, // ## ## 1648 | 0x1B, 0x00, // ## ## 1649 | 0x0E, 0x00, // ### 1650 | 0x0E, 0x00, // ### 1651 | 0x00, 0x00, // 1652 | 0x00, 0x00, // 1653 | 0x00, 0x00, // 1654 | 0x00, 0x00, // 1655 | 0x00, 0x00, // 1656 | 1657 | // @2784 'w' (11 pixels wide) 1658 | 0x00, 0x00, // 1659 | 0x00, 0x00, // 1660 | 0x00, 0x00, // 1661 | 0x00, 0x00, // 1662 | 0xF1, 0xE0, // #### #### 1663 | 0x60, 0xC0, // ## ## 1664 | 0x64, 0xC0, // ## # ## 1665 | 0x6E, 0xC0, // ## ### ## 1666 | 0x3B, 0x80, // ### ### 1667 | 0x3B, 0x80, // ### ### 1668 | 0x31, 0x80, // ## ## 1669 | 0x00, 0x00, // 1670 | 0x00, 0x00, // 1671 | 0x00, 0x00, // 1672 | 0x00, 0x00, // 1673 | 0x00, 0x00, // 1674 | 1675 | // @2816 'x' (11 pixels wide) 1676 | 0x00, 0x00, // 1677 | 0x00, 0x00, // 1678 | 0x00, 0x00, // 1679 | 0x00, 0x00, // 1680 | 0x7B, 0xC0, // #### #### 1681 | 0x1B, 0x00, // ## ## 1682 | 0x0E, 0x00, // ### 1683 | 0x0E, 0x00, // ### 1684 | 0x0E, 0x00, // ### 1685 | 0x1B, 0x00, // ## ## 1686 | 0x7B, 0xC0, // #### #### 1687 | 0x00, 0x00, // 1688 | 0x00, 0x00, // 1689 | 0x00, 0x00, // 1690 | 0x00, 0x00, // 1691 | 0x00, 0x00, // 1692 | 1693 | // @2848 'y' (11 pixels wide) 1694 | 0x00, 0x00, // 1695 | 0x00, 0x00, // 1696 | 0x00, 0x00, // 1697 | 0x00, 0x00, // 1698 | 0x79, 0xE0, // #### #### 1699 | 0x30, 0xC0, // ## ## 1700 | 0x19, 0x80, // ## ## 1701 | 0x19, 0x80, // ## ## 1702 | 0x0B, 0x00, // # ## 1703 | 0x0F, 0x00, // #### 1704 | 0x06, 0x00, // ## 1705 | 0x06, 0x00, // ## 1706 | 0x0C, 0x00, // ## 1707 | 0x3E, 0x00, // ##### 1708 | 0x00, 0x00, // 1709 | 0x00, 0x00, // 1710 | 1711 | // @2880 'z' (11 pixels wide) 1712 | 0x00, 0x00, // 1713 | 0x00, 0x00, // 1714 | 0x00, 0x00, // 1715 | 0x00, 0x00, // 1716 | 0x3F, 0x80, // ####### 1717 | 0x21, 0x80, // # ## 1718 | 0x03, 0x00, // ## 1719 | 0x0E, 0x00, // ### 1720 | 0x18, 0x00, // ## 1721 | 0x30, 0x80, // ## # 1722 | 0x3F, 0x80, // ####### 1723 | 0x00, 0x00, // 1724 | 0x00, 0x00, // 1725 | 0x00, 0x00, // 1726 | 0x00, 0x00, // 1727 | 0x00, 0x00, // 1728 | 1729 | // @2912 '{' (11 pixels wide) 1730 | 0x00, 0x00, // 1731 | 0x06, 0x00, // ## 1732 | 0x0C, 0x00, // ## 1733 | 0x0C, 0x00, // ## 1734 | 0x0C, 0x00, // ## 1735 | 0x0C, 0x00, // ## 1736 | 0x0C, 0x00, // ## 1737 | 0x18, 0x00, // ## 1738 | 0x0C, 0x00, // ## 1739 | 0x0C, 0x00, // ## 1740 | 0x0C, 0x00, // ## 1741 | 0x0C, 0x00, // ## 1742 | 0x06, 0x00, // ## 1743 | 0x00, 0x00, // 1744 | 0x00, 0x00, // 1745 | 0x00, 0x00, // 1746 | 1747 | // @2944 '|' (11 pixels wide) 1748 | 0x00, 0x00, // 1749 | 0x06, 0x00, // ## 1750 | 0x06, 0x00, // ## 1751 | 0x06, 0x00, // ## 1752 | 0x06, 0x00, // ## 1753 | 0x06, 0x00, // ## 1754 | 0x06, 0x00, // ## 1755 | 0x06, 0x00, // ## 1756 | 0x06, 0x00, // ## 1757 | 0x06, 0x00, // ## 1758 | 0x06, 0x00, // ## 1759 | 0x06, 0x00, // ## 1760 | 0x06, 0x00, // ## 1761 | 0x00, 0x00, // 1762 | 0x00, 0x00, // 1763 | 0x00, 0x00, // 1764 | 1765 | // @2976 '}' (11 pixels wide) 1766 | 0x00, 0x00, // 1767 | 0x0C, 0x00, // ## 1768 | 0x06, 0x00, // ## 1769 | 0x06, 0x00, // ## 1770 | 0x06, 0x00, // ## 1771 | 0x06, 0x00, // ## 1772 | 0x06, 0x00, // ## 1773 | 0x03, 0x00, // ## 1774 | 0x06, 0x00, // ## 1775 | 0x06, 0x00, // ## 1776 | 0x06, 0x00, // ## 1777 | 0x06, 0x00, // ## 1778 | 0x0C, 0x00, // ## 1779 | 0x00, 0x00, // 1780 | 0x00, 0x00, // 1781 | 0x00, 0x00, // 1782 | 1783 | // @3008 '~' (11 pixels wide) 1784 | 0x00, 0x00, // 1785 | 0x00, 0x00, // 1786 | 0x00, 0x00, // 1787 | 0x00, 0x00, // 1788 | 0x00, 0x00, // 1789 | 0x18, 0x00, // ## 1790 | 0x24, 0x80, // # # # 1791 | 0x03, 0x00, // ## 1792 | 0x00, 0x00, // 1793 | 0x00, 0x00, // 1794 | 0x00, 0x00, // 1795 | 0x00, 0x00, // 1796 | 0x00, 0x00, // 1797 | 0x00, 0x00, // 1798 | 0x00, 0x00, // 1799 | 0x00, 0x00, // 1800 | }; 1801 | 1802 | sFONT Font16 = { 1803 | Font16_Table, 1804 | 11, /* Width */ 1805 | 16, /* Height */ 1806 | 2, /* Size = bytes per pixel row */ 1807 | }; 1808 | 1809 | /** 1810 | * @} 1811 | */ 1812 | 1813 | 1814 | /** @defgroup FONTS_Private_Function_Prototypes 1815 | * @{ 1816 | */ 1817 | /** 1818 | * @} 1819 | */ 1820 | 1821 | 1822 | /** @defgroup FONTS_Private_Functions 1823 | * @{ 1824 | */ 1825 | 1826 | /** 1827 | * @} 1828 | */ 1829 | 1830 | /** 1831 | * @} 1832 | */ 1833 | 1834 | /** 1835 | * @} 1836 | */ 1837 | 1838 | /** 1839 | * @} 1840 | */ 1841 | 1842 | /** 1843 | * @} 1844 | */ 1845 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 1846 | --------------------------------------------------------------------------------