comparison BootLoader/Src/tInfoBootloader.c @ 30:ea1003f63e44

ADD GPL License ...
author jDG
date Tue, 23 Jan 2018 17:29:40 +0100
parents 97eafbcb81a9
children 7801c5d8a562
comparison
equal deleted inserted replaced
29:3a98f9e7ca58 30:ea1003f63e44
1 /** 1 ///////////////////////////////////////////////////////////////////////////////
2 ****************************************************************************** 2 /// -*- coding: UTF-8 -*-
3 * @file tInfoBootloader.c 3 ///
4 * @author heinrichs/weikamp, Christian Weikamp 4 /// \file BootLoader/Src/tInfoBootloader.c
5 * @version V0.0.1 5 /// \brief Write something on the screen in between steps
6 * @date 08-May-2015 6 /// \author heinrichs/weikamp, Christian Weikamp
7 * @brief Write something on the screen in between steps 7 /// \date 08-May-2015
8 * 8 ///
9 @verbatim 9 /// $Id$
10 ============================================================================== 10 ///////////////////////////////////////////////////////////////////////////////
11 ##### How to use ##### 11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
12 ============================================================================== 12 ///
13 * a little bit of text (DMA is not running for fast clean) 13 /// This program is free software: you can redistribute it and/or modify
14 @endverbatim 14 /// it under the terms of the GNU General Public License as published by
15 ****************************************************************************** 15 /// the Free Software Foundation, either version 3 of the License, or
16 * @attention 16 /// (at your option) any later version.
17 * 17 ///
18 * <h2><center>&copy; COPYRIGHT(c) 2015 heinrichs weikamp</center></h2> 18 /// This program is distributed in the hope that it will be useful,
19 * 19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ****************************************************************************** 20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 */ 21 /// GNU General Public License for more details.
22 ///
23 /// You should have received a copy of the GNU General Public License
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
25 //////////////////////////////////////////////////////////////////////////////
22 26
23 /* Includes ------------------------------------------------------------------*/ 27 /* Includes ------------------------------------------------------------------*/
24 #include "tInfoBootloader.h" 28 #include "tInfoBootloader.h"
25 29
26 #include "base_bootloader.h" 30 #include "base_bootloader.h"
35 /* Private variables ---------------------------------------------------------*/ 39 /* Private variables ---------------------------------------------------------*/
36 40
37 GFX_DrawCfgScreen tIBscreen; 41 GFX_DrawCfgScreen tIBscreen;
38 GFX_DrawCfgWindow tIBwindow; 42 GFX_DrawCfgWindow tIBwindow;
39 uint8_t line = 1; 43 uint8_t line = 1;
40 44
41 char textButtonLeft[30] = { 0 }; 45 char textButtonLeft[30] = { 0 };
42 char textButtonMid[31] = { 0 }; 46 char textButtonMid[31] = { 0 };
43 char textButtonRight[31] = { 0 }; 47 char textButtonRight[31] = { 0 };
44 48
45 /* Private types -------------------------------------------------------------*/ 49 /* Private types -------------------------------------------------------------*/
61 tIBwindow.WindowTab = 400; 65 tIBwindow.WindowTab = 400;
62 tIBwindow.WindowX0 = 20; 66 tIBwindow.WindowX0 = 20;
63 tIBwindow.WindowX1 = 779; 67 tIBwindow.WindowX1 = 779;
64 tIBwindow.WindowY0 = 0; 68 tIBwindow.WindowY0 = 0;
65 tIBwindow.WindowY1 = 799; 69 tIBwindow.WindowY1 = 799;
66 70
67 line = 1; 71 line = 1;
68 } 72 }
69 73
70 74
71 void tInfo_button_text(const char *text_left, const char *text_mid, const char *text_right) 75 void tInfo_button_text(const char *text_left, const char *text_mid, const char *text_right)
86 90
87 91
88 void tInfo_newpage(const char *text) 92 void tInfo_newpage(const char *text)
89 { 93 {
90 uint32_t backup = tIBscreen.FBStartAdress; 94 uint32_t backup = tIBscreen.FBStartAdress;
91 95
92 tIBscreen.FBStartAdress = getFrame(18); 96 tIBscreen.FBStartAdress = getFrame(18);
93 line = 1; 97 line = 1;
94 if(text) 98 if(text)
95 GFX_write_string(&FontT48, &tIBwindow, text,line); 99 GFX_write_string(&FontT48, &tIBwindow, text,line);
96 line++; 100 line++;
99 write_content_simple(&tIBscreen, 0, 800, 480-24, &FontT24,textButtonLeft,CLUT_ButtonSurfaceScreen); 103 write_content_simple(&tIBscreen, 0, 800, 480-24, &FontT24,textButtonLeft,CLUT_ButtonSurfaceScreen);
100 if(*textButtonMid) 104 if(*textButtonMid)
101 write_content_simple(&tIBscreen, 0, 800, 480-24, &FontT24,textButtonMid,CLUT_ButtonSurfaceScreen); 105 write_content_simple(&tIBscreen, 0, 800, 480-24, &FontT24,textButtonMid,CLUT_ButtonSurfaceScreen);
102 if(*textButtonRight) 106 if(*textButtonRight)
103 write_content_simple(&tIBscreen, 0, 800, 480-24, &FontT24,textButtonRight,CLUT_ButtonSurfaceScreen); 107 write_content_simple(&tIBscreen, 0, 800, 480-24, &FontT24,textButtonRight,CLUT_ButtonSurfaceScreen);
104 108
105 GFX_SetFrameTop(tIBscreen.FBStartAdress); 109 GFX_SetFrameTop(tIBscreen.FBStartAdress);
106 GFX_change_LTDC(); 110 GFX_change_LTDC();
107 111
108 if(backup != 0) 112 if(backup != 0)
109 releaseFrame(18,backup); 113 releaseFrame(18,backup);
110 } 114 }
111 115
112 116
118 { 122 {
119 if(text) 123 if(text)
120 GFX_write_string(&FontT48, &tIBwindow, text,line); 124 GFX_write_string(&FontT48, &tIBwindow, text,line);
121 line++; 125 line++;
122 126
123 } 127 }
124 } 128 }
125 129
126 /* Private functions ---------------------------------------------------------*/ 130 /* Private functions ---------------------------------------------------------*/