STM32L073Z_EVAL BSP User Manual
|
stm32l073z_eval_glass_lcd.c
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file STM32L073Z_eval_glass_lcd.c 00004 * @author MCD Application Team 00005 * @brief This file includes the LCD Glass driver for LCD XHO5002B Module of 00006 * STM32L073Z-EVAL board. 00007 ****************************************************************************** 00008 * @attention 00009 * 00010 * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> 00011 * 00012 * Redistribution and use in source and binary forms, with or without modification, 00013 * are permitted provided that the following conditions are met: 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00020 * may be used to endorse or promote products derived from this software 00021 * without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00027 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00028 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00029 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00030 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00031 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 ****************************************************************************** 00035 */ 00036 00037 /* Includes ------------------------------------------------------------------*/ 00038 #include "stm32l073z_eval_glass_lcd.h" 00039 00040 /** @addtogroup BSP 00041 * @{ 00042 */ 00043 00044 /** @addtogroup STM32L073Z_EVAL 00045 * @{ 00046 */ 00047 00048 /** @defgroup STM32L073Z_EVAL_GLASS_LCD STM32L073Z-EVAL Glass LCD 00049 * @brief This file includes the LCD Glass driver for LCD_XHO5002B Module of 00050 * STM32L073Z-EVAL board. 00051 * @{ 00052 */ 00053 00054 00055 /** @defgroup STM32L073Z_EVAL_GLASS_LCD_Private_Defines Private Defines 00056 * @{ 00057 */ 00058 #define ASCII_CHAR_SPACE 0x20 /* */ 00059 #define ASCII_CHAR_FORWARD_SLASH 0x2F /* / */ 00060 #define ASCII_CHAR_0 0x30 /* 0 */ 00061 #define ASCII_CHAR_COLON 0x3A /* : */ 00062 #define ASCII_CHAR_AT_SYMBOL 0x40 /* @ */ 00063 #define ASCII_CHAR_A 0x41 /* A */ 00064 #define ASCII_CHAR_LEFT_OPEN_BRACKET 0x5B /* [ */ 00065 /** 00066 * @} 00067 */ 00068 00069 /** @defgroup STM32L073Z_EVAL_GLASS_LCD_Private_Variables Private Variables 00070 * @{ 00071 */ 00072 00073 /** 00074 @verbatim 00075 ================================================================================ 00076 GLASS LCD MAPPING 00077 ================================================================================ 00078 A 00079 _ ---------- 00080 P|_| |\ |H /| 00081 F| G | I |B 00082 | \ | / | 00083 --M-- --N-- 00084 | /| \ | 00085 E| L | J |C 00086 _ | / |K \| 00087 Q|_| ----------- 00088 D 00089 00090 A LCD character coding is based on the following matrix: 00091 COM0 COM1 COM4 COM5 COM6 COM7 00092 SEG(n) { 0 , 0 , I , B , C , J } 00093 SEG(n+1) { D , K , A , H , M , N } 00094 SEG(n+2) { Q , L , G , F , P , E } 00095 00096 The character A for example is: 00097 ----------------------------------------------------------- 00098 COM0 COM1 COM4 COM5 COM6 COM7 00099 SEG(n) { 0 , 0 , 0 , 1 , 1 , 0 } 00100 SEG(n+1) { 0 , 0 , 1 , 0 , 1 , 1 } 00101 SEG(n+2) { 0 , 0 , 0 , 1 , 0 , 1 } 00102 -------------------------------------------------------- 00103 = 0 0 2 5 3 6 hex 00104 00105 => 'A' = 0x002536 00106 00107 @endverbatim 00108 */ 00109 00110 LCD_HandleTypeDef LCDHandle; 00111 00112 /* LCD BAR status: To save the bar setting after writing in LCD RAM memory */ 00113 uint8_t LCDBar = BATTERYLEVEL_FULL; 00114 00115 /** 00116 * @brief LETTERS AND NUMBERS MAPPING DEFINITION 00117 */ 00118 const uint32_t Mask[] = 00119 { 00120 0x00F00000, 0x000F0000, 0x0000F000, 0x00000F00, 0x000000F0, 0x0000000F 00121 }; 00122 const uint8_t Shift[6] = 00123 { 00124 20, 16, 12, 8, 4, 0 00125 }; 00126 00127 uint32_t Digit[6]; /* Digit frame buffer */ 00128 00129 /* Letters and number map of the custom LCD 8x40(STM32L073Z-EVAL evaluation board) */ 00130 const uint32_t LetterMap[26] = 00131 { 00132 /* A B C D E F */ 00133 0x00002536, 0x00202536, 0x00202404, 0x00222310, 0x00202426, 0x00002426, 00134 /* G H I J K L */ 00135 0x00202416, 0x00000536, 0x00222200, 0x00200114, 0x00001425, 0x00200404, 00136 /* M N O P Q R */ 00137 0x00005514, 0x00004515, 0x00202514, 0x00002526, 0x00002532, 0x00002527, 00138 /* S T U V W X */ 00139 0x00202432, 0x00022200, 0x00200514, 0x00041404, 0x00050515, 0x00045001, 00140 /* Y Z */ 00141 0x00025000, 0x00243000 00142 }; 00143 00144 const uint32_t NumberMap[10] = 00145 { 00146 /* 0 1 2 3 4 */ 00147 0x00202514, 0x00000110, 0x00202126, 0x00202132, 0x00000532, 00148 /* 5 6 7 8 9 */ 00149 0x00202432, 0x00202436, 0x00002110, 0x00202536, 0x00202532 00150 }; 00151 00152 /* Constant table for cap characters 'A' --> 'Z' */ 00153 const uint16_t CapLetterMap[26]= 00154 { 00155 /* A B C D E F G H I */ 00156 0xFE00, 0x6714, 0x1D00, 0x4714, 0x9D00, 0x9C00, 0x3F00, 0xFA00, 0x0014, 00157 /* J K L M N O P Q R */ 00158 0x5300, 0x9841, 0x1900, 0x5A48, 0x5A09, 0x5F00, 0xFC00, 0x5F01, 0xFC01, 00159 /* S T U V W X Y Z */ 00160 0xAF00, 0x0414, 0x5b00, 0x18C0, 0x5A81, 0x00C9, 0x0058, 0x05C0 00161 }; 00162 00163 /** 00164 * @} 00165 */ 00166 00167 /** @defgroup STM32L073Z_EVAL_LCD_Private_Functions Private Functions 00168 * @{ 00169 */ 00170 static void Convert(uint8_t* c, Point_Typedef Point, DoublePoint_Typedef DoublePoint); 00171 static void LCD_MspInit(LCD_HandleTypeDef *hlcd); 00172 00173 /** 00174 * @} 00175 */ 00176 00177 /** @defgroup STM32L073Z_EVAL_GLASS_LCD_Exported_Functions Exported Functions 00178 * @{ 00179 */ 00180 00181 /** 00182 * @brief Configures the LCD GLASS relative GPIO port IOs and LCD peripheral. 00183 * @retval None 00184 */ 00185 void BSP_LCD_GLASS_Init(void) 00186 { 00187 LCDHandle.Instance = LCD; 00188 LCDHandle.Init.Prescaler = LCD_PRESCALER_4; 00189 LCDHandle.Init.Divider = LCD_DIVIDER_16; 00190 LCDHandle.Init.Duty = LCD_DUTY_1_8; 00191 LCDHandle.Init.Bias = LCD_BIAS_1_4; 00192 LCDHandle.Init.VoltageSource = LCD_VOLTAGESOURCE_INTERNAL; 00193 LCDHandle.Init.Contrast = LCD_CONTRASTLEVEL_7; 00194 LCDHandle.Init.DeadTime = LCD_DEADTIME_0; 00195 LCDHandle.Init.PulseOnDuration = LCD_PULSEONDURATION_2; 00196 LCDHandle.Init.BlinkMode = LCD_BLINKMODE_OFF; 00197 LCDHandle.Init.BlinkFrequency = LCD_BLINKFREQUENCY_DIV8; 00198 LCDHandle.Init.MuxSegment = LCD_MUXSEGMENT_DISABLE; 00199 00200 __HAL_LCD_RESET_HANDLE_STATE(&LCDHandle); 00201 00202 /* Initialize the LCD */ 00203 LCD_MspInit(&LCDHandle); /*optional*/ 00204 HAL_LCD_Init(&LCDHandle); 00205 00206 BSP_LCD_GLASS_Clear(); 00207 BSP_LCD_GLASS_BarLevelConfig(BATTERYLEVEL_OFF); 00208 00209 } 00210 00211 /** 00212 * @brief LCD contrast setting 00213 * @param Contrast: specifies the LCD Contrast. 00214 * This parameter can be one of the following values: 00215 * @arg LCD_CONTRASTLEVEL_0: Maximum Voltage = 2.60V 00216 * @arg LCD_CONTRASTLEVEL_1: Maximum Voltage = 2.73V 00217 * @arg LCD_CONTRASTLEVEL_2: Maximum Voltage = 2.86V 00218 * @arg LCD_CONTRASTLEVEL_3: Maximum Voltage = 2.99V 00219 * @arg LCD_CONTRASTLEVEL_4: Maximum Voltage = 3.12V 00220 * @arg LCD_CONTRASTLEVEL_5: Maximum Voltage = 3.25V 00221 * @arg LCD_CONTRASTLEVEL_6: Maximum Voltage = 3.38V 00222 * @arg LCD_CONTRASTLEVEL_7: Maximum Voltage = 3.51V 00223 * @retval None 00224 */ 00225 void BSP_LCD_GLASS_Contrast(uint32_t Contrast) 00226 { 00227 __HAL_LCD_CONTRAST_CONFIG(&LCDHandle, Contrast); 00228 } 00229 00230 /** 00231 * @brief This function writes a char in the LCD frame buffer. 00232 * @param ch: the character to display. 00233 * @param Point: a point to add in front of char 00234 * This parameter can be: POINT_OFF or POINT_ON 00235 * @param Column: flag indicating if a column has to be add in front 00236 * of displayed character. 00237 * This parameter can be: DOUBLEPOINT_OFF or DOUBLEPOINT_ON. 00238 * @param Position: position in the LCD of the caracter to write [1:7] 00239 * @retval None 00240 * @note Required preconditions: The LCD should be cleared before to start the 00241 * write operation. 00242 */ 00243 void BSP_LCD_GLASS_WriteChar(uint8_t* ch, uint8_t Point, uint8_t Column, uint8_t Position) 00244 { 00245 /* To convert displayed character in segment in array digit */ 00246 Convert(ch, (Point_Typedef)Point, (DoublePoint_Typedef)Column); 00247 switch(Position) 00248 { 00249 /* Position 1 on LCD */ 00250 case 1: 00251 /* Write Digit 0 on COM0 */ 00252 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFBFF, (Digit[0] << (uint32_t)0x09)); 00253 /* Write Digit 1 on COM1 */ 00254 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFF3FF, (Digit[1] << (uint32_t)0x09)); 00255 /* Write Digit 2 on COM4 */ 00256 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFF1FF, (Digit[2] << (uint32_t)0x09)); 00257 /* Write Digit 3 on COM5 */ 00258 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFF1FF, (Digit[3] << (uint32_t)0x09)); 00259 /* Write Digit 4 on COM6 */ 00260 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFF9FF, (Digit[4] << (uint32_t)0x09)); 00261 /* Write Digit 5 on COM7 */ 00262 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFF1FF, (Digit[5] << (uint32_t)0x09)); 00263 break; 00264 00265 /* Position 2 on LCD */ 00266 case 2: 00267 /* Write Digit 0 on COM0 */ 00268 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFF9FFF, (Digit[0] << (uint32_t)0x0C)); 00269 /* Write Digit 1 on COM1 */ 00270 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFF9FFF, (Digit[1] << (uint32_t)0x0C)); 00271 /* Write Digit 2 on COM4 */ 00272 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFF8FFF, (Digit[2] << (uint32_t)0x0C)); 00273 /* Write Digit 3 on COM5 */ 00274 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFF8FFF, (Digit[3] << (uint32_t)0x0C)); 00275 /* Write Digit 4 on COM6 */ 00276 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFF8FFF, (Digit[4] << (uint32_t)0x0C)); 00277 /* Write Digit 5 on COM7 */ 00278 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFF8FFF, (Digit[5] << (uint32_t)0x0C)); 00279 break; 00280 00281 /* Position 3 on LCD */ 00282 case 3: 00283 /* Write Digit 0 on COM0 */ 00284 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFCFFFF, (Digit[0] << (uint32_t)0x0F)); 00285 /* Write Digit 1 on COM1 */ 00286 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFCFFFF, (Digit[1] << (uint32_t)0x0F)); 00287 /* Write Digit 2 on COM4 */ 00288 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFC7FFF, (Digit[2] << (uint32_t)0x0F)); 00289 /* Write Digit 3 on COM5 */ 00290 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFC7FFF, (Digit[3] << (uint32_t)0x0F)); 00291 /* Write Digit 4 on COM6 */ 00292 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFC7FFF, (Digit[4] << (uint32_t)0x0F)); 00293 /* Write Digit 5 on COM7 */ 00294 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFC7FFF, (Digit[5] << (uint32_t)0x0F)); 00295 break; 00296 00297 /* Position 4 on LCD */ 00298 case 4: 00299 /* Write Digit 0 on COM0 */ 00300 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFE7FFFF, (Digit[0] << (uint32_t)0x12)); 00301 /* Write Digit 1 on COM1 */ 00302 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFE7FFFF, (Digit[1] << (uint32_t)0x12)); 00303 /* Write Digit 2 on COM4 */ 00304 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFE3FFFF, (Digit[2] << (uint32_t)0x12)); 00305 /* Write Digit 3 on COM5 */ 00306 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFE3FFFF, (Digit[3] << (uint32_t)0x12)); 00307 /* Write Digit 4 on COM6 */ 00308 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFE3FFFF, (Digit[4] << (uint32_t)0x12)); 00309 /* Write Digit 5 on COM7 */ 00310 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFE3FFFF, (Digit[5] << (uint32_t)0x12)); 00311 break; 00312 00313 /* Position 5 on LCD */ 00314 case 5: 00315 /* Write Digit 0 on COM0 */ 00316 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF9, Digit[0]); 00317 /* Write Digit 1 on COM1 */ 00318 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF9, Digit[1]); 00319 /* Write Digit 2 on COM4 */ 00320 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFFFF8, Digit[2]); 00321 /* Write Digit 3 on COM5 */ 00322 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFFFF8, Digit[3]); 00323 /* Write Digit 4 on COM6 */ 00324 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFFFF8, Digit[4]); 00325 /* Write Digit 5 on COM7 */ 00326 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFFFF8, Digit[5]); 00327 break; 00328 00329 /* Position 6 on LCD */ 00330 case 6: 00331 /* Write Digit 0 on COM0 */ 00332 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFCF, (Digit[0] << (uint32_t)0x03)); 00333 /* Write Digit 1 on COM1 */ 00334 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFCF, (Digit[1] << (uint32_t)0x03)); 00335 /* Write Digit 2 on COM4 */ 00336 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFFFC7, (Digit[2] << (uint32_t)0x03)); 00337 /* Write Digit 3 on COM5 */ 00338 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFFFC7, (Digit[3] << (uint32_t)0x03)); 00339 /* Write Digit 4 on COM6 */ 00340 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFFFC7, (Digit[4] << (uint32_t)0x03)); 00341 /* Write Digit 5 on COM7 */ 00342 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFFFC7, (Digit[5] << (uint32_t)0x03)); 00343 break; 00344 00345 /* Position 7 on LCD */ 00346 case 7: 00347 /* Write Digit 0 on COM0 */ 00348 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFE7F, (Digit[0] << (uint32_t)0x06)); 00349 /* Write Digit 1 on COM1 */ 00350 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFE7F, (Digit[1] << (uint32_t)0x06)); 00351 /* Write Digit 2 on COM4 */ 00352 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFFE3F, (Digit[2] << (uint32_t)0x06)); 00353 /* Write Digit 3 on COM5 */ 00354 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFFE3F, (Digit[3] << (uint32_t)0x06)); 00355 /* Write Digit 4 on COM6 */ 00356 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFFE3F, (Digit[4] << (uint32_t)0x06)); 00357 /* Write Digit 5 on COM7 */ 00358 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFFE3F, (Digit[5] << (uint32_t)0x06)); 00359 break; 00360 00361 default: 00362 break; 00363 } 00364 00365 /* Update the LCD display */ 00366 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00367 00368 /* Refresh LCD bar */ 00369 BSP_LCD_GLASS_BarLevelConfig(LCDBar); 00370 } 00371 00372 /** 00373 * @brief Setting bar on LCD, writes bar value in LCD frame buffer 00374 * @param BarLevel: specifies the LCD GLASS Batery Level. 00375 * This parameter can be one of the following values: 00376 * @arg BATTERYLEVEL_OFF: LCD GLASS Batery Empty 00377 * @arg BATTERYLEVEL_1_4: LCD GLASS Batery 1/4 Full 00378 * @arg BATTERYLEVEL_1_2: LCD GLASS Batery 1/2 Full 00379 * @arg BATTERYLEVEL_3_4: LCD GLASS Batery 3/4 Full 00380 * @arg BATTERYLEVEL_FULL: LCD GLASS Batery Full 00381 * @retval None 00382 */ 00383 void BSP_LCD_GLASS_BarLevelConfig(uint8_t BarLevel) 00384 { 00385 switch (BarLevel) 00386 { 00387 case BATTERYLEVEL_OFF: 00388 /* Set BATTERYLEVEL_3_4 off */ 00389 /* Set BATTERYLEVEL_1_4 off */ 00390 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF6, 0); 00391 /* Set BATTERYLEVEL_1_2 off */ 00392 /* Set BATTERYLEVEL_FULL off */ 00393 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF6, 0); 00394 LCDBar = BATTERYLEVEL_OFF; 00395 break; 00396 00397 /* BARLEVEL 1/4 */ 00398 case BATTERYLEVEL_1_4: 00399 /* Set BATTERYLEVEL_1_4 on */ 00400 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF6, (uint32_t)(0x00000001)); 00401 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF6, 0); 00402 LCDBar = BATTERYLEVEL_1_4; 00403 break; 00404 00405 /* BARLEVEL 1/2 */ 00406 case BATTERYLEVEL_1_2: 00407 /* Set BatteryLevel_1_4 on */ 00408 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF6, (uint32_t)(0x00000001)); 00409 /* Set BatteryLevel_1_2 on */ 00410 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF6, (uint32_t)(0x00000001)); 00411 LCDBar = BATTERYLEVEL_1_2; 00412 break; 00413 00414 /* Battery Level 3/4 */ 00415 case BATTERYLEVEL_3_4: 00416 /* Set BATTERYLEVEL_3_4 on */ 00417 /* Set BatteryLevel_1_4 on */ 00418 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF6, (uint32_t)(0x00000001)); 00419 /* Set BatteryLevel_1_2 on */ 00420 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF6, (uint32_t)(0x00000009)); 00421 LCDBar = BATTERYLEVEL_3_4; 00422 break; 00423 00424 /* BATTERYLEVEL_FULL */ 00425 case BATTERYLEVEL_FULL: 00426 /* Set BATTERYLEVEL_3_4 on */ 00427 /* Set BatteryLevel_1_4 on */ 00428 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF6, (uint32_t)(0x00000009)); 00429 /* Set BATTERYLEVEL_FULL on */ 00430 /* Set BatteryLevel_1_2 on */ 00431 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF6, (uint32_t)(0x00000009)); 00432 LCDBar = BATTERYLEVEL_FULL; 00433 break; 00434 00435 default: 00436 break; 00437 } 00438 00439 /* Update the LCD display */ 00440 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00441 } 00442 00443 /** 00444 * @brief This function Clear a char in the LCD RAM. 00445 * @param position: Position in the LCD of the caracter to write. 00446 * This parameter can be any value in range [1:7]. 00447 * @retval None 00448 */ 00449 void BSP_LCD_GLASS_ClearChar(uint8_t position) 00450 { 00451 switch (position) 00452 { 00453 /* Clear position 1 on LCD */ 00454 case 1: 00455 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFBFF, 0); 00456 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFF3FF, 0); 00457 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFF1FF, 0); 00458 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFF1FF, 0); 00459 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFF9FF, 0); 00460 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFF1FF, 0); 00461 break; 00462 00463 /* Clear position 2 on LCD */ 00464 case 2: 00465 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFF9FFF, 0); 00466 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFF9FFF, 0); 00467 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFF8FFF, 0); 00468 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFF8FFF, 0); 00469 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFF8FFF, 0); 00470 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFF8FFF, 0); 00471 break; 00472 00473 /* Clear position 3 on LCD */ 00474 case 3: 00475 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFCFFFF, 0); 00476 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFCFFFF, 0); 00477 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFC7FFF, 0); 00478 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFC7FFF, 0); 00479 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFC7FFF, 0); 00480 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFC7FFF, 0); 00481 break; 00482 00483 /* Clear position 4 on LCD */ 00484 case 4: 00485 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFE7FFFF, 0); 00486 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFE7FFFF, 0); 00487 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFE3FFFF, 0); 00488 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFE3FFFF, 0); 00489 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFE3FFFF, 0); 00490 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFE3FFFF, 0); 00491 break; 00492 00493 /* Clear position 5 on LCD */ 00494 case 5: 00495 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFF9, 0); 00496 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFF9, 0); 00497 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFFFF8, 0); 00498 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFFFF8, 0); 00499 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFFFF8, 0); 00500 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFFFF8, 0); 00501 break; 00502 00503 /* Clear position 6 on LCD */ 00504 case 6: 00505 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFCF, 0); 00506 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFFCF, 0); 00507 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFFFC7, 0); 00508 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFFFC7, 0); 00509 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFFFC7, 0); 00510 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFFFC7, 0); 00511 break; 00512 00513 /* Clear position 7 on LCD */ 00514 case 7: 00515 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFE7F, 0); 00516 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFE7F, 0); 00517 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFFFFE3F, 0); 00518 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFFFFE3F, 0); 00519 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFFE3F, 0); 00520 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFFFFE3F, 0); 00521 break; 00522 00523 default: 00524 break; 00525 } 00526 /* Update the LCD display */ 00527 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00528 } 00529 00530 /** 00531 * @brief This function writes a char in the LCD RAM. 00532 * @param Ch: The character to display. 00533 * @param Point: A point to add in front of char. 00534 * This parameter can be one of the following values: 00535 * @arg POINT_OFF: No point to add in front of char. 00536 * @arg POINT_ON: Add a point in front of char. 00537 * @param DoublePoint: Flag indicating if a apostrophe has to be add in front 00538 * of displayed character. 00539 * This parameter can be one of the following values: 00540 * @arg DOUBLEPOINT_OFF: No colon to add in back of char. 00541 * @arg DOUBLEPOINT_ON: Add an colon in back of char. 00542 * @param Position: Position in the LCD of the caracter to write. 00543 * This parameter can be any value in range [1:7]. 00544 * @retval None 00545 */ 00546 void BSP_LCD_GLASS_DisplayChar(uint8_t* Ch, Point_Typedef Point, DoublePoint_Typedef DoublePoint, uint8_t Position) 00547 { 00548 /*!< LCD Write Char */ 00549 BSP_LCD_GLASS_WriteChar(Ch, Point, DoublePoint, Position); 00550 00551 /* Update the LCD display */ 00552 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00553 } 00554 00555 /** 00556 * @brief This function writes a char in the LCD RAM. 00557 * @param ptr: Pointer to string to display on the LCD Glass. 00558 * @retval None 00559 */ 00560 void BSP_LCD_GLASS_DisplayString(uint8_t* ptr) 00561 { 00562 uint8_t position = 0x01; 00563 00564 /*!< Send the string character by character on lCD */ 00565 while ((*ptr != 0) & (position < 8)) 00566 { 00567 /*!< Display one character on LCD */ 00568 BSP_LCD_GLASS_WriteChar(ptr, 0, 0, position); 00569 /*!< Point on the next character */ 00570 ptr++; 00571 /*!< Increment the character counter */ 00572 position++; 00573 } 00574 } 00575 00576 /** 00577 * @brief This function Clears the LCD Glass Text Zone. 00578 * @retval None 00579 */ 00580 void BSP_LCD_GLASS_ClearTextZone(void) 00581 { 00582 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFE49A49, 0); 00583 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFE49A49, 0); 00584 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, 0xFFE00000, 0); 00585 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, 0xFFE00000, 0); 00586 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFE00800, 0); 00587 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, 0xFFE00000, 0); 00588 00589 /*!< Request LCD RAM update */ 00590 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00591 } 00592 00593 /** 00594 * @brief This function writes a char in the LCD RAM. 00595 * @param ptr: Pointer to string to display on the LCD Glass. 00596 * @retval None 00597 * @note Required preconditions: Char is ASCCI value "Ored" with decimal point or Column flag 00598 */ 00599 void BSP_LCD_GLASS_DisplayStrDeci(uint16_t* ptr) 00600 { 00601 uint8_t index = 1; 00602 uint8_t tmpchar; 00603 00604 /* Send the string character by character on lCD */ 00605 while((*ptr != 0) & (index < 8)) 00606 { 00607 tmpchar = (*ptr) & 0x00FF; 00608 00609 switch((*ptr) & 0xF000) 00610 { 00611 case DOT: 00612 /* Display one character on LCD with decimal point */ 00613 BSP_LCD_GLASS_WriteChar(&tmpchar, POINT_ON, DOUBLEPOINT_OFF, index); 00614 break; 00615 case DOUBLE_DOT: 00616 /* Display one character on LCD with decimal point */ 00617 BSP_LCD_GLASS_WriteChar(&tmpchar, POINT_OFF, DOUBLEPOINT_ON, index); 00618 break; 00619 default: 00620 BSP_LCD_GLASS_WriteChar(&tmpchar, POINT_OFF, DOUBLEPOINT_OFF, index); 00621 break; 00622 }/* Point on the next character */ 00623 ptr++; 00624 00625 /* Increment the character counter */ 00626 index++; 00627 } 00628 } 00629 00630 /** 00631 * @brief This function Clear the whole LCD RAM. 00632 * @retval None 00633 */ 00634 void BSP_LCD_GLASS_Clear(void) 00635 { 00636 HAL_LCD_Clear(&LCDHandle); 00637 } 00638 00639 /** 00640 * @brief Display a string in scrolling mode 00641 * @param ptr: Pointer to string to display on the LCD Glass. 00642 * @param nScroll: Specifies how many time the message will be scrolled 00643 * @param ScrollSpeed : Speciifes the speed of the scroll, low value gives 00644 * higher speed 00645 * @retval None 00646 * @note Required preconditions: The LCD should be cleared before to start the 00647 * write operation. 00648 */ 00649 void BSP_LCD_GLASS_ScrollSentence(uint8_t* ptr, uint16_t nScroll, uint16_t ScrollSpeed) 00650 { 00651 uint8_t repetition = 0, nbrchar = 0, sizestr = 0; 00652 uint8_t* ptr1; 00653 uint8_t str[8] = ""; 00654 00655 if(ptr == 0) 00656 { 00657 return; 00658 } 00659 00660 /* To calculate end of string */ 00661 for(ptr1 = ptr, sizestr = 0; *ptr1 != 0; sizestr++, ptr1++); 00662 00663 ptr1 = ptr; 00664 00665 BSP_LCD_GLASS_DisplayString(ptr); 00666 HAL_Delay(ScrollSpeed); 00667 00668 /* To shift the string for scrolling display*/ 00669 for (repetition = 0; repetition < nScroll; repetition++) 00670 { 00671 for(nbrchar = 0; nbrchar < sizestr; nbrchar++) 00672 { 00673 *(str) =* (ptr1+((nbrchar)%sizestr)); 00674 *(str+1) =* (ptr1+((nbrchar+1)%sizestr)); 00675 *(str+2) =* (ptr1+((nbrchar+2)%sizestr)); 00676 *(str+3) =* (ptr1+((nbrchar+3)%sizestr)); 00677 *(str+4) =* (ptr1+((nbrchar+4)%sizestr)); 00678 *(str+5) =* (ptr1+((nbrchar+5)%sizestr)); 00679 *(str+6) =* (ptr1+((nbrchar+6)%sizestr)); 00680 *(str+7) =* (ptr1+((nbrchar+7)%sizestr)); 00681 BSP_LCD_GLASS_ClearTextZone(); 00682 BSP_LCD_GLASS_DisplayString(str); 00683 00684 HAL_Delay(ScrollSpeed); 00685 } 00686 } 00687 } 00688 00689 /** 00690 * @brief Configure ST Logo display. 00691 * @param NewState: enable or disable the logo display . 00692 * @retval None 00693 */ 00694 void BSP_LCD_GLASS_DisplayLogo(FunctionalState NewState) 00695 { 00696 if (NewState != DISABLE) 00697 { 00698 /* Set logo on */ 00699 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFBF, 0x00000040); 00700 } 00701 else 00702 { 00703 /* Set logo of */ 00704 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFFBF, 0); 00705 } 00706 00707 /*!< Request LCD RAM update */ 00708 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00709 } 00710 00711 /** 00712 * @brief Configure the LCD ArrowDirection. 00713 * @param ArrowDirection: Specify the ArrowDirection to set. 00714 * @retval None 00715 */ 00716 void BSP_LCD_GLASS_ArrowConfig(ArrowDirection_TypeDef ArrowDirection) 00717 { 00718 switch (ArrowDirection) 00719 { 00720 /* ARROWDIRECTION_UP */ 00721 case ARROWDIRECTION_UP: 00722 /* Set ARROWDIRECTION_UP on */ 00723 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFF6FFF, 0x00001000); 00724 break; 00725 00726 /* ARROWDIRECTION_LEFT */ 00727 case ARROWDIRECTION_LEFT : 00728 /* Set ARROWDIRECTION_LEFT on */ 00729 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFF6FFF, 0x00001000); 00730 break; 00731 00732 /* ARROWDIRECTION_DOWN */ 00733 case ARROWDIRECTION_DOWN: 00734 /* Set ARROWDIRECTION_DOWN on */ 00735 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFF6FFF, 0x00008000); 00736 break; 00737 00738 /* ARROWDIRECTION_RIGHT */ 00739 case ARROWDIRECTION_RIGHT: 00740 /* Set ARROWDIRECTION_RIGHT on */ 00741 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFF6FFF, 0x00008000); 00742 break; 00743 00744 case ARROWDIRECTION_OFF: 00745 /* Set ARROWDIRECTION_UP off */ 00746 /* Set ARROWDIRECTION_RIGHT off */ 00747 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFF6FFF, 0); 00748 /* Set ARROWDIRECTION_LEFT off */ 00749 /* Set ARROWDIRECTION_DOWN off */ 00750 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFF6FFF, 0); 00751 break; 00752 00753 default: 00754 break; 00755 } 00756 00757 /*!< Request LCD RAM update */ 00758 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00759 } 00760 00761 /** 00762 * @brief Configure the LCD Temperature level display . 00763 * @param Temperature: indicate the Temperature level to set. 00764 * @retval None 00765 */ 00766 void BSP_LCD_GLASS_TemperatureConfig(TemperatureLevel_TypeDef Temperature) 00767 { 00768 switch (Temperature) 00769 { 00770 /* Temperature level 1*/ 00771 case TEMPERATURELEVEL_1 : 00772 /* Clear Temperature level 5 */ 00773 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0); 00774 /* Clear Temperature level 4 and level 2 */ 00775 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0); 00776 /* Clear Temperature level 1 and level 3 */ 00777 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0); 00778 /* Set Temperature level 1*/ 00779 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0x00000200); 00780 break; 00781 00782 /* Temperature level 2 */ 00783 case TEMPERATURELEVEL_2: 00784 /* Clear Temperature level 4 and level 2 */ 00785 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0); 00786 /* Clear Temperature level 1 and level 3 */ 00787 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0); 00788 /* Set Temperature level 1 */ 00789 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0x00000200); 00790 /* Set Temperature level 2 */ 00791 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0x00000200); 00792 break; 00793 00794 /* Temperature level 3 */ 00795 case TEMPERATURELEVEL_3: 00796 /* Clear Temperature level 1 and level 3 */ 00797 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0); 00798 /* Set Temperature level 1 */ 00799 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0x00000200); 00800 /* Set Temperature level 2 */ 00801 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0x00000200); 00802 /* Set Temperature level 3 */ 00803 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0x00000400); 00804 break; 00805 00806 /* Temperature level 4*/ 00807 case TEMPERATURELEVEL_4: 00808 /* Set Temperature level 1 */ 00809 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0x00000200); 00810 /* Set Temperature level 2 */ 00811 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0x00000200); 00812 /* Set Temperature level 3 */ 00813 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0x00000400); 00814 /* Set Temperature level 4 */ 00815 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0x00000400); 00816 break; 00817 00818 /* Temperature_2*/ 00819 case TEMPERATURELEVEL_5: 00820 /* Set Temperature level 1 */ 00821 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0x00000200); 00822 /* Set Temperature level 2 */ 00823 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0x00000200); 00824 /* Set Temperature level 3 and level 5 */ 00825 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0x00000C00); 00826 /* Set Temperature level 4 */ 00827 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0x00000400); 00828 break; 00829 00830 /* Temperature_6*/ 00831 case TEMPERATURELEVEL_6: 00832 /* Set Temperature level 1 */ 00833 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0x00000200); 00834 /* Set Temperature level 2 */ 00835 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0x00000200); 00836 /* Set Temperature level 3 and level 5 */ 00837 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0x00000C00); 00838 /* Set Temperature level 4 and level 6 */ 00839 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0x00000C00); 00840 break; 00841 00842 case TEMPERATURELEVEL_OFF: 00843 /* Clear Temperature level 5 */ 00844 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFFDFF, 0); 00845 /* Clear Temperature level 6 */ 00846 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFFFDFF, 0); 00847 /* Clear Temperature level 4 and level 2 */ 00848 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, 0xFFFFF3FF, 0); 00849 /* Clear Temperature level 1 and level 3 */ 00850 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, 0xFFFFF3FF, 0); 00851 break; 00852 00853 default: 00854 break; 00855 } 00856 00857 /*!< Request LCD RAM update */ 00858 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00859 } 00860 00861 /** 00862 * @brief Configure the LCD Value Unit. 00863 * @param ValueUnit: indicate the Value Unit to set. 00864 * @retval None 00865 */ 00866 void BSP_LCD_GLASS_ValueUnitConfig(ValueUnit_TypeDef ValueUnit) 00867 { 00868 switch (ValueUnit) 00869 { 00870 /* VALUEUNIT MILLIAMPERE*/ 00871 case VALUEUNIT_MILLIAMPERE: 00872 /* Set VALUEUNIT_MILLIAMPERE on */ 00873 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFBFFBF, 0x00040000); 00874 break; 00875 00876 /* VALUEUNIT MICROAMPERE)*/ 00877 case VALUEUNIT_MICROAMPERE: 00878 /* Set VALUEUNIT_MICROAMPERE */ 00879 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFBFFFF, 0x00040000); 00880 break; 00881 00882 /* VALUEUNIT NANOAMPERE*/ 00883 case VALUEUNIT_NANOAMPERE: 00884 /* Set VALUEUNIT_NANOAMPERE on */ 00885 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFBFFBF, 0x00000040); 00886 break; 00887 00888 case VALUEUNIT_OFF: 00889 /* Set VALUEUNIT_MILLIAMPERE and VALUEUNIT_NANOAMPERE OFF */ 00890 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, 0xFFFBFFBF, 0); 00891 /* Set VALUEUNIT_MICROAMPERE off */ 00892 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFBFFFF, 0); 00893 break; 00894 00895 default: 00896 break; 00897 } 00898 00899 /*!< Request LCD RAM update */ 00900 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00901 } 00902 00903 /** 00904 * @brief Configure the LCD sign. 00905 * @param Sign: indicate the sign to set. 00906 * @param NewState: enable or disable the Digit. 00907 * @retval None 00908 */ 00909 void BSP_LCD_GLASS_SignCmd(Sign_TypeDef Sign, FunctionalState NewState) 00910 { 00911 if (NewState != DISABLE) 00912 { 00913 switch (Sign) 00914 { 00915 /* Sign positive */ 00916 case SIGN_POSITIVE: 00917 /* Set SIGN_POSITIVE on */ 00918 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFF7FF, 0x00000800); 00919 break; 00920 00921 /* Sign negative*/ 00922 case SIGN_NEGATIVE: 00923 /* Set SIGN_NEGATIVE on */ 00924 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFF7FF, 0x00000800); 00925 break; 00926 00927 default: 00928 break; 00929 } 00930 } 00931 else 00932 { 00933 switch (Sign) 00934 { 00935 /* Sign positive */ 00936 case SIGN_POSITIVE: 00937 /* Set SIGN_POSITIVE off */ 00938 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, 0xFFFFF7FF, 0); 00939 break; 00940 00941 /* Sign negative */ 00942 case SIGN_NEGATIVE: 00943 /* Set SIGN_NEGATIVE off */ 00944 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, 0xFFFFF7FF, 0); 00945 break; 00946 00947 default: 00948 break; 00949 } 00950 } 00951 00952 /*!< Request LCD RAM update */ 00953 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 00954 } 00955 /** 00956 * @brief Set Matrix Pixel on. 00957 * @param PixelRow: Specify Matrix Row. 00958 * @param PixelColumn: Specify Matrix Column. 00959 * @retval None 00960 */ 00961 void BSP_LCD_GLASS_WriteMatrixPixel(PixelRow_TypeDef PixelRow, PixelColumn_TypeDef PixelColumn) 00962 { 00963 switch (PixelRow) 00964 { 00965 case PIXELROW_1: 00966 switch (PixelColumn) 00967 { 00968 case PIXELCOLUMN_1: 00969 /* Position : Row = 1 , Column= 1 */ 00970 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000200), (uint32_t)0x00000200); 00971 break; 00972 00973 case PIXELCOLUMN_2: 00974 /* Position : Row = 1 , Column= 2 */ 00975 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00004000), (uint32_t)0x00004000); 00976 break; 00977 00978 case PIXELCOLUMN_3: 00979 /* Position : Row = 1 , Column= 3 */ 00980 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00002000), (uint32_t)0x00002000); 00981 break; 00982 00983 case PIXELCOLUMN_4: 00984 /* Position : Row = 1 , Column= 4 */ 00985 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00001000), (uint32_t)0x00001000); 00986 break; 00987 00988 case PIXELCOLUMN_5: 00989 /* Position : Row = 1 , Column= 5 */ 00990 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00020000), (uint32_t)0x00020000); 00991 break; 00992 00993 case PIXELCOLUMN_6: 00994 /* Position : Row = 1 , Column= 6 */ 00995 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00010000), (uint32_t)0x00010000); 00996 break; 00997 00998 case PIXELCOLUMN_7: 00999 /* Position : Row = 1 , Column= 7 */ 01000 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00008000), (uint32_t)0x00008000); 01001 break; 01002 01003 case PIXELCOLUMN_8: 01004 /* Position : Row = 1 , Column= 8 */ 01005 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00100000), (uint32_t)0x00100000); 01006 break; 01007 01008 case PIXELCOLUMN_9: 01009 /* Position : Row = 1 , Column= 9 */ 01010 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00080000), (uint32_t)0x00080000); 01011 break; 01012 01013 case PIXELCOLUMN_10: 01014 /* Position : Row = 1 , Column= 10 */ 01015 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00040000), (uint32_t)0x00040000); 01016 break; 01017 01018 case PIXELCOLUMN_11: 01019 /* Position : Row = 1 , Column= 11 */ 01020 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01021 break; 01022 01023 case PIXELCOLUMN_12: 01024 /* Position : Row = 1 , Column= 12 */ 01025 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01026 break; 01027 01028 case PIXELCOLUMN_13: 01029 /* Position : Row = 1 , Column= 13 */ 01030 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01031 break; 01032 01033 case PIXELCOLUMN_14: 01034 /* Position : Row = 1 , Column= 14 */ 01035 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01036 break; 01037 01038 case PIXELCOLUMN_15: 01039 /* Position : Row = 1 , Column= 15 */ 01040 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01041 break; 01042 01043 case PIXELCOLUMN_16: 01044 /* Position : Row = 1 , Column= 16 */ 01045 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01046 break; 01047 01048 case PIXELCOLUMN_17: 01049 /* Position : Row = 1 , Column= 17 */ 01050 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000100), (uint32_t)0x00000100); 01051 break; 01052 01053 case PIXELCOLUMN_18: 01054 /* Position : Row = 1 , Column= 18 */ 01055 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01056 break; 01057 01058 case PIXELCOLUMN_19: 01059 /* Position : Row = 1 , Column= 19 */ 01060 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01061 break; 01062 01063 default: 01064 break; 01065 01066 } 01067 break; 01068 01069 case PIXELROW_2: 01070 switch (PixelColumn) 01071 { 01072 case PIXELCOLUMN_1: 01073 /* Position : Row = 2 , Column= 1 */ 01074 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000200), (uint32_t)0x00000200); 01075 break; 01076 01077 case PIXELCOLUMN_2: 01078 /* Position : Row = 2 , Column= 2 */ 01079 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00004000), (uint32_t)0x00004000); 01080 break; 01081 01082 case PIXELCOLUMN_3: 01083 /* Position : Row = 2 , Column= 3 */ 01084 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00002000), (uint32_t)0x00002000); 01085 break; 01086 01087 case PIXELCOLUMN_4: 01088 /* Position : Row = 2 , Column= 4 */ 01089 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00001000), (uint32_t)0x00001000); 01090 break; 01091 01092 case PIXELCOLUMN_5: 01093 /* Position : Row = 2 , Column= 5 */ 01094 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00020000), (uint32_t)0x00020000); 01095 break; 01096 01097 case PIXELCOLUMN_6: 01098 /* Position : Row = 2 , Column= 6 */ 01099 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00010000), (uint32_t)0x00010000); 01100 break; 01101 01102 case PIXELCOLUMN_7: 01103 /* Position : Row = 2 , Column= 7 */ 01104 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00008000), (uint32_t)0x00008000); 01105 break; 01106 01107 case PIXELCOLUMN_8: 01108 /* Position : Row = 2 , Column= 8 */ 01109 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00100000), (uint32_t)0x00100000); 01110 break; 01111 01112 case PIXELCOLUMN_9: 01113 /* Position : Row = 2 , Column= 9 */ 01114 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00080000), (uint32_t)0x00080000); 01115 break; 01116 01117 case PIXELCOLUMN_10: 01118 /* Position : Row = 2 , Column= 10 */ 01119 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00040000), (uint32_t)0x00040000); 01120 break; 01121 01122 case PIXELCOLUMN_11: 01123 /* Position : Row = 2 , Column= 11 */ 01124 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01125 break; 01126 01127 case PIXELCOLUMN_12: 01128 /* Position : Row = 2 , Column= 12 */ 01129 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01130 break; 01131 01132 case PIXELCOLUMN_13: 01133 /* Position : Row = 2 , Column= 13 */ 01134 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01135 break; 01136 01137 case PIXELCOLUMN_14: 01138 /* Position : Row = 2 , Column= 14 */ 01139 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01140 break; 01141 01142 case PIXELCOLUMN_15: 01143 /* Position : Row = 2 , Column= 15 */ 01144 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01145 break; 01146 01147 case PIXELCOLUMN_16: 01148 /* Position : Row = 2 , Column= 16 */ 01149 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01150 break; 01151 01152 case PIXELCOLUMN_17: 01153 /* Position : Row = 2 , Column= 17 */ 01154 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000100), (uint32_t)0x00000100); 01155 break; 01156 01157 case PIXELCOLUMN_18: 01158 /* Position : Row = 2 , Column= 18 */ 01159 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01160 break; 01161 01162 case PIXELCOLUMN_19: 01163 /* Position : Row = 2 , Column= 19 */ 01164 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01165 break; 01166 01167 default: 01168 break; 01169 } 01170 break; 01171 01172 case PIXELROW_3: 01173 switch (PixelColumn) 01174 { 01175 case PIXELCOLUMN_1: 01176 /* Position : Row = 3 , Column= 1 */ 01177 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01178 break; 01179 01180 case PIXELCOLUMN_2: 01181 /* Position : Row = 3 , Column= 2 */ 01182 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01183 break; 01184 01185 case PIXELCOLUMN_3: 01186 /* Position : Row = 3 , Column= 3 */ 01187 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01188 break; 01189 01190 case PIXELCOLUMN_4: 01191 /* Position : Row = 3 , Column= 4 */ 01192 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01193 break; 01194 01195 case PIXELCOLUMN_5: 01196 /* Position : Row = 3 , Column= 5 */ 01197 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01198 break; 01199 01200 case PIXELCOLUMN_6: 01201 /* Position : Row = 3 , Column= 6 */ 01202 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01203 break; 01204 01205 case PIXELCOLUMN_7: 01206 /* Position : Row = 3 , Column= 7 */ 01207 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01208 break; 01209 01210 case PIXELCOLUMN_8: 01211 /* Position : Row = 3 , Column= 8 */ 01212 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01213 break; 01214 01215 case PIXELCOLUMN_9: 01216 /* Position : Row = 3 , Column= 9*/ 01217 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01218 break; 01219 01220 case PIXELCOLUMN_10: 01221 /* Position : Row = 3 , Column= 10*/ 01222 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01223 break; 01224 01225 case PIXELCOLUMN_11: 01226 /* Position : Row = 3 , Column= 11*/ 01227 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01228 break; 01229 01230 case PIXELCOLUMN_12: 01231 /* Position : Row = 3 , Column= 12*/ 01232 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01233 break; 01234 01235 case PIXELCOLUMN_13: 01236 /* Position : Row = 3 , Column= 13*/ 01237 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01238 break; 01239 01240 case PIXELCOLUMN_14: 01241 /* Position : Row = 3 , Column= 14*/ 01242 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01243 break; 01244 01245 case PIXELCOLUMN_15: 01246 /* Position : Row = 3 , Column= 15*/ 01247 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01248 break; 01249 01250 case PIXELCOLUMN_16: 01251 /* Position : Row = 3 , Column= 16*/ 01252 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01253 break; 01254 01255 case PIXELCOLUMN_17: 01256 /* Position : Row = 3 , Column= 17*/ 01257 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01258 break; 01259 01260 case PIXELCOLUMN_18: 01261 /* Position : Row = 3 , Column= 18*/ 01262 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01263 break; 01264 01265 case PIXELCOLUMN_19: 01266 /* Position : Row = 3 , Column= 19 */ 01267 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01268 break; 01269 01270 default: 01271 break; 01272 } 01273 break; 01274 01275 case PIXELROW_4: 01276 switch (PixelColumn) 01277 { 01278 case PIXELCOLUMN_1: 01279 /* Position : Row = 4 , Column= 1 */ 01280 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01281 break; 01282 01283 case PIXELCOLUMN_2: 01284 /* Position : Row = 4 , Column= 2 */ 01285 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01286 break; 01287 01288 case PIXELCOLUMN_3: 01289 /* Position : Row = 4 , Column= 3 */ 01290 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01291 break; 01292 01293 case PIXELCOLUMN_4: 01294 /* Position : Row = 4 , Column= 4 */ 01295 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01296 break; 01297 01298 case PIXELCOLUMN_5: 01299 /* Position : Row = 4 , Column= 5 */ 01300 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01301 break; 01302 01303 case PIXELCOLUMN_6: 01304 /* Position : Row = 4 , Column= 6 */ 01305 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01306 break; 01307 01308 case PIXELCOLUMN_7: 01309 /* Position : Row = 4 , Column= 7 */ 01310 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01311 break; 01312 01313 case PIXELCOLUMN_8: 01314 /* Position : Row = 4 , Column= 8 */ 01315 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01316 break; 01317 01318 case PIXELCOLUMN_9: 01319 /* Position : Row = 4 , Column= 9*/ 01320 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01321 break; 01322 01323 case PIXELCOLUMN_10: 01324 /* Position : Row = 4 , Column= 10*/ 01325 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01326 break; 01327 01328 case PIXELCOLUMN_11: 01329 /* Position : Row = 4 , Column= 11*/ 01330 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01331 break; 01332 01333 case PIXELCOLUMN_12: 01334 /* Position : Row = 4 , Column= 12*/ 01335 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01336 break; 01337 01338 case PIXELCOLUMN_13: 01339 /* Position : Row = 4 , Column= 13*/ 01340 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01341 break; 01342 01343 case PIXELCOLUMN_14: 01344 /* Position : Row = 4 , Column= 14*/ 01345 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01346 break; 01347 01348 case PIXELCOLUMN_15: 01349 /* Position : Row = 4 , Column= 15*/ 01350 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01351 break; 01352 01353 case PIXELCOLUMN_16: 01354 /* Position : Row = 4 , Column= 16*/ 01355 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01356 break; 01357 01358 case PIXELCOLUMN_17: 01359 /* Position : Row = 4 , Column= 17*/ 01360 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01361 break; 01362 01363 case PIXELCOLUMN_18: 01364 /* Position : Row = 4 , Column= 18*/ 01365 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01366 break; 01367 01368 case PIXELCOLUMN_19: 01369 /* Position : Row = 4 , Column= 19 */ 01370 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01371 break; 01372 01373 default: 01374 break; 01375 01376 } 01377 break; 01378 01379 case PIXELROW_5: 01380 switch (PixelColumn) 01381 { 01382 case PIXELCOLUMN_1: 01383 /* Position : Row = 5 , Column= 1 */ 01384 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01385 break; 01386 01387 case PIXELCOLUMN_2: 01388 /* Position : Row = 5 , Column= 2 */ 01389 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01390 break; 01391 01392 case PIXELCOLUMN_3: 01393 /* Position : Row = 5 , Column= 3 */ 01394 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01395 break; 01396 01397 case PIXELCOLUMN_4: 01398 /* Position : Row = 5 , Column= 4 */ 01399 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01400 break; 01401 01402 case PIXELCOLUMN_5: 01403 /* Position : Row = 5 , Column= 5 */ 01404 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01405 break; 01406 01407 case PIXELCOLUMN_6: 01408 /* Position : Row = 5 , Column= 6 */ 01409 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01410 break; 01411 01412 case PIXELCOLUMN_7: 01413 /* Position : Row = 5 , Column= 7 */ 01414 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01415 break; 01416 01417 case PIXELCOLUMN_8: 01418 /* Position : Row = 5 , Column= 8 */ 01419 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01420 break; 01421 01422 case PIXELCOLUMN_9: 01423 /* Position : Row = 5 , Column= 9*/ 01424 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01425 break; 01426 01427 case PIXELCOLUMN_10: 01428 /* Position : Row = 5 , Column= 10*/ 01429 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01430 break; 01431 01432 case PIXELCOLUMN_11: 01433 /* Position : Row = 5 , Column= 11*/ 01434 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01435 break; 01436 01437 case PIXELCOLUMN_12: 01438 /* Position : Row = 5 , Column= 12*/ 01439 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01440 break; 01441 01442 case PIXELCOLUMN_13: 01443 /* Position : Row = 5 , Column= 13*/ 01444 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01445 break; 01446 01447 case PIXELCOLUMN_14: 01448 /* Position : Row = 5 , Column= 14*/ 01449 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01450 break; 01451 01452 case PIXELCOLUMN_15: 01453 /* Position : Row = 5 , Column= 15*/ 01454 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01455 break; 01456 01457 case PIXELCOLUMN_16: 01458 /* Position : Row = 5 , Column= 16*/ 01459 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01460 break; 01461 01462 case PIXELCOLUMN_17: 01463 /* Position : Row = 5 , Column= 17*/ 01464 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01465 break; 01466 01467 case PIXELCOLUMN_18: 01468 /* Position : Row = 5 , Column= 18*/ 01469 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01470 break; 01471 01472 case PIXELCOLUMN_19: 01473 /* Position : Row = 5 , Column= 19 */ 01474 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01475 break; 01476 01477 default: 01478 break; 01479 } 01480 break; 01481 01482 case PIXELROW_6: 01483 switch (PixelColumn) 01484 { 01485 case PIXELCOLUMN_1: 01486 /* Position : Row = 6 , Column= 1 */ 01487 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01488 break; 01489 01490 case PIXELCOLUMN_2: 01491 /* Position : Row = 6 , Column= 2 */ 01492 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01493 break; 01494 01495 case PIXELCOLUMN_3: 01496 /* Position : Row = 6 , Column= 3 */ 01497 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01498 break; 01499 01500 case PIXELCOLUMN_4: 01501 /* Position : Row = 6 , Column= 4 */ 01502 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01503 break; 01504 01505 case PIXELCOLUMN_5: 01506 /* Position : Row = 6 , Column= 5 */ 01507 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01508 break; 01509 01510 case PIXELCOLUMN_6: 01511 /* Position : Row = 6 , Column= 6 */ 01512 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01513 break; 01514 01515 case PIXELCOLUMN_7: 01516 /* Position : Row = 6 , Column= 7 */ 01517 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01518 break; 01519 01520 case PIXELCOLUMN_8: 01521 /* Position : Row = 6 , Column= 8 */ 01522 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01523 break; 01524 01525 case PIXELCOLUMN_9: 01526 /* Position : Row = 6 , Column= 9*/ 01527 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01528 break; 01529 01530 case PIXELCOLUMN_10: 01531 /* Position : Row = 6 , Column= 10*/ 01532 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01533 break; 01534 01535 case PIXELCOLUMN_11: 01536 /* Position : Row = 6 , Column= 11*/ 01537 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01538 break; 01539 01540 case PIXELCOLUMN_12: 01541 /* Position : Row = 6 , Column= 12*/ 01542 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01543 break; 01544 01545 case PIXELCOLUMN_13: 01546 /* Position : Row = 6 , Column= 13*/ 01547 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01548 break; 01549 01550 case PIXELCOLUMN_14: 01551 /* Position : Row = 6 , Column= 14*/ 01552 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01553 break; 01554 01555 case PIXELCOLUMN_15: 01556 /* Position : Row = 6 , Column= 15*/ 01557 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01558 break; 01559 01560 case PIXELCOLUMN_16: 01561 /* Position : Row = 6 , Column= 16*/ 01562 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01563 break; 01564 01565 case PIXELCOLUMN_17: 01566 /* Position : Row = 6 , Column= 17*/ 01567 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01568 break; 01569 01570 case PIXELCOLUMN_18: 01571 /* Position : Row = 6 , Column= 18*/ 01572 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01573 break; 01574 01575 case PIXELCOLUMN_19: 01576 /* Position : Row = 6 , Column= 19 */ 01577 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01578 break; 01579 01580 default: 01581 break; 01582 } 01583 break; 01584 01585 case PIXELROW_7: 01586 switch (PixelColumn) 01587 { 01588 case PIXELCOLUMN_1: 01589 /* Position : Row = 7 , Column =1 */ 01590 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01591 break; 01592 01593 case PIXELCOLUMN_2: 01594 /* Position : Row = 7 , Column =2 */ 01595 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01596 break; 01597 01598 case PIXELCOLUMN_3: 01599 /* Position : Row = 7 , Column =3 */ 01600 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01601 break; 01602 01603 case PIXELCOLUMN_4: 01604 /* Position : Row = 7 , Column =4 */ 01605 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01606 break; 01607 01608 case PIXELCOLUMN_5: 01609 /* Position : Row = 7 , Column =5 */ 01610 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01611 break; 01612 01613 case PIXELCOLUMN_6: 01614 /* Position : Row = 7 , Column =6 */ 01615 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01616 break; 01617 01618 case PIXELCOLUMN_7: 01619 /* Position : Row = 7 , Column =7 */ 01620 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01621 break; 01622 01623 case PIXELCOLUMN_8: 01624 /* Position : Row = 7 , Column =8 */ 01625 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01626 break; 01627 01628 case PIXELCOLUMN_9: 01629 /* Position : Row = 7 , Column =9*/ 01630 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01631 break; 01632 01633 case PIXELCOLUMN_10: 01634 /* Position : Row = 7 , Column =10*/ 01635 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01636 break; 01637 01638 case PIXELCOLUMN_11: 01639 /* Position : Row = 7 , Column =11*/ 01640 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01641 break; 01642 01643 case PIXELCOLUMN_12: 01644 /* Position : Row = 7 , Column =12*/ 01645 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01646 break; 01647 01648 case PIXELCOLUMN_13: 01649 /* Position : Row = 7 , Column =13*/ 01650 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01651 break; 01652 01653 case PIXELCOLUMN_14: 01654 /* Position : Row = 7 , Column =14*/ 01655 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01656 break; 01657 01658 case PIXELCOLUMN_15: 01659 /* Position : Row = 7 , Column =15*/ 01660 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01661 break; 01662 01663 case PIXELCOLUMN_16: 01664 /* Position : Row = 7 , Column =16*/ 01665 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01666 break; 01667 01668 case PIXELCOLUMN_17: 01669 /* Position : Row = 7 , Column =17*/ 01670 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01671 break; 01672 01673 case PIXELCOLUMN_18: 01674 /* Position : Row = 7 , Column =18*/ 01675 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01676 break; 01677 01678 case PIXELCOLUMN_19: 01679 /* Position : Row = 7 , Column =19 */ 01680 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01681 break; 01682 01683 default: 01684 break; 01685 } 01686 break; 01687 01688 case PIXELROW_8: 01689 switch (PixelColumn) 01690 { 01691 case PIXELCOLUMN_1: 01692 /* Position : Row = 8 , Column =1 */ 01693 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01694 break; 01695 01696 case PIXELCOLUMN_2: 01697 /* Position : Row = 8 , Column =2 */ 01698 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01699 break; 01700 01701 case PIXELCOLUMN_3: 01702 /* Position : Row = 8 , Column =3 */ 01703 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01704 break; 01705 01706 case PIXELCOLUMN_4: 01707 /* Position : Row = 8 , Column =4 */ 01708 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01709 break; 01710 01711 case PIXELCOLUMN_5: 01712 /* Position : Row = 8 , Column =5 */ 01713 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01714 break; 01715 01716 case PIXELCOLUMN_6: 01717 /* Position : Row = 8 , Column =6 */ 01718 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01719 break; 01720 01721 case PIXELCOLUMN_7: 01722 /* Position : Row = 8 , Column =7 */ 01723 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01724 break; 01725 01726 case PIXELCOLUMN_8: 01727 /* Position : Row = 8 , Column =8 */ 01728 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01729 break; 01730 01731 case PIXELCOLUMN_9: 01732 /* Position : Row = 8 , Column =9*/ 01733 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01734 break; 01735 01736 case PIXELCOLUMN_10: 01737 /* Position : Row = 8 , Column =10*/ 01738 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01739 break; 01740 01741 case PIXELCOLUMN_11: 01742 /* Position : Row = 8 , Column =11*/ 01743 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01744 break; 01745 01746 case PIXELCOLUMN_12: 01747 /* Position : Row = 8 , Column =12*/ 01748 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01749 break; 01750 01751 case PIXELCOLUMN_13: 01752 /* Position : Row = 8 , Column =13*/ 01753 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01754 break; 01755 01756 case PIXELCOLUMN_14: 01757 /* Position : Row = 8 , Column =14*/ 01758 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01759 break; 01760 01761 case PIXELCOLUMN_15: 01762 /* Position : Row = 8 , Column =15*/ 01763 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01764 break; 01765 01766 case PIXELCOLUMN_16: 01767 /* Position : Row = 8 , Column =16*/ 01768 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01769 break; 01770 01771 case PIXELCOLUMN_17: 01772 /* Position : Row = 8 , Column =17*/ 01773 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01774 break; 01775 01776 case PIXELCOLUMN_18: 01777 /* Position : Row = 8 , Column =18*/ 01778 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01779 break; 01780 01781 case PIXELCOLUMN_19: 01782 /* Position : Row = 8 , Column =19 */ 01783 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01784 break; 01785 01786 default: 01787 break; 01788 } 01789 break; 01790 01791 case PIXELROW_9: 01792 switch (PixelColumn) 01793 { 01794 case PIXELCOLUMN_1: 01795 /* Position : Row = 9 , Column =1 */ 01796 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01797 break; 01798 01799 case PIXELCOLUMN_2: 01800 /* Position : Row = 9 , Column =2 */ 01801 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01802 break; 01803 01804 case PIXELCOLUMN_3: 01805 /* Position : Row = 9 , Column =3 */ 01806 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01807 break; 01808 01809 case PIXELCOLUMN_4: 01810 /* Position : Row = 9 , Column =4 */ 01811 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01812 break; 01813 01814 case PIXELCOLUMN_5: 01815 /* Position : Row = 9 , Column =5 */ 01816 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01817 break; 01818 01819 case PIXELCOLUMN_6: 01820 /* Position : Row = 9 , Column =6 */ 01821 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01822 break; 01823 01824 case PIXELCOLUMN_7: 01825 /* Position : Row = 9 , Column =7 */ 01826 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01827 break; 01828 01829 case PIXELCOLUMN_8: 01830 /* Position : Row = 9 , Column =8 */ 01831 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01832 break; 01833 01834 case PIXELCOLUMN_9: 01835 /* Position : Row = 9 , Column =9*/ 01836 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01837 break; 01838 01839 case PIXELCOLUMN_10: 01840 /* Position : Row = 9 , Column =10*/ 01841 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01842 break; 01843 01844 case PIXELCOLUMN_11: 01845 /* Position : Row = 9 , Column =11*/ 01846 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01847 break; 01848 01849 case PIXELCOLUMN_12: 01850 /* Position : Row = 9 , Column =12*/ 01851 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01852 break; 01853 01854 case PIXELCOLUMN_13: 01855 /* Position : Row = 9 , Column =13*/ 01856 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01857 break; 01858 01859 case PIXELCOLUMN_14: 01860 /* Position : Row = 9 , Column =14*/ 01861 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01862 break; 01863 01864 case PIXELCOLUMN_15: 01865 /* Position : Row = 9 , Column =15*/ 01866 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01867 break; 01868 01869 case PIXELCOLUMN_16: 01870 /* Position : Row = 9 , Column =16*/ 01871 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01872 break; 01873 01874 case PIXELCOLUMN_17: 01875 /* Position : Row = 9 , Column =17*/ 01876 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01877 break; 01878 01879 case PIXELCOLUMN_18: 01880 /* Position : Row = 9 , Column =18*/ 01881 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01882 break; 01883 01884 case PIXELCOLUMN_19: 01885 /* Position : Row = 9 , Column =19 */ 01886 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01887 break; 01888 01889 default: 01890 break; 01891 } 01892 break; 01893 01894 case PIXELROW_10: 01895 switch (PixelColumn) 01896 { 01897 case PIXELCOLUMN_1: 01898 /* Position : Row = 10 , Column= 1 */ 01899 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x00200000), (uint32_t)0x00200000); 01900 break; 01901 01902 case PIXELCOLUMN_2: 01903 /* Position : Row = 10 , Column= 2 */ 01904 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x00400000), (uint32_t)0x00400000); 01905 break; 01906 01907 case PIXELCOLUMN_3: 01908 /* Position : Row = 10 , Column= 3 */ 01909 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x00800000), (uint32_t)0x00800000); 01910 break; 01911 01912 case PIXELCOLUMN_4: 01913 /* Position : Row = 10 , Column= 4 */ 01914 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x01000000), (uint32_t)0x01000000); 01915 break; 01916 01917 case PIXELCOLUMN_5: 01918 /* Position : Row = 10 , Column= 5 */ 01919 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x02000000), (uint32_t)0x02000000); 01920 break; 01921 01922 case PIXELCOLUMN_6: 01923 /* Position : Row = 10 , Column= 6 */ 01924 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x04000000), (uint32_t)0x04000000); 01925 break; 01926 01927 case PIXELCOLUMN_7: 01928 /* Position : Row = 10 , Column= 7 */ 01929 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x08000000), (uint32_t)0x08000000); 01930 break; 01931 01932 case PIXELCOLUMN_8: 01933 /* Position : Row = 10 , Column= 8 */ 01934 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x10000000), (uint32_t)0x10000000); 01935 break; 01936 01937 case PIXELCOLUMN_9: 01938 /* Position : Row = 10 , Column= 9*/ 01939 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x20000000), (uint32_t)0x20000000); 01940 break; 01941 01942 case PIXELCOLUMN_10: 01943 /* Position : Row = 10 , Column= 10*/ 01944 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x40000000), (uint32_t)0x40000000); 01945 break; 01946 01947 case PIXELCOLUMN_11: 01948 /* Position : Row = 10 , Column= 11*/ 01949 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, ~((uint32_t)0x80000000), (uint32_t)0x80000000); 01950 break; 01951 01952 case PIXELCOLUMN_12: 01953 /* Position : Row = 10 , Column= 12*/ 01954 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000001), (uint32_t)0x00000001); 01955 break; 01956 01957 case PIXELCOLUMN_13: 01958 /* Position : Row = 10 , Column= 13*/ 01959 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000002), (uint32_t)0x00000002); 01960 break; 01961 01962 case PIXELCOLUMN_14: 01963 /* Position : Row = 10 , Column= 14*/ 01964 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000004), (uint32_t)0x00000004); 01965 break; 01966 01967 case PIXELCOLUMN_15: 01968 /* Position : Row = 10 , Column= 15*/ 01969 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000008), (uint32_t)0x00000008); 01970 break; 01971 01972 case PIXELCOLUMN_16: 01973 /* Position : Row = 10 , Column= 16*/ 01974 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000010), (uint32_t)0x00000010); 01975 break; 01976 01977 case PIXELCOLUMN_17: 01978 /* Position : Row = 10 , Column= 17*/ 01979 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000020), (uint32_t)0x00000020); 01980 break; 01981 01982 case PIXELCOLUMN_18: 01983 /* Position : Row = 10 , Column= 18*/ 01984 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000040), (uint32_t)0x00000040); 01985 break; 01986 01987 case PIXELCOLUMN_19: 01988 /* Position : Row = 10 , Column= 19 */ 01989 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, ~((uint32_t)0x00000080), (uint32_t)0x00000080); 01990 break; 01991 01992 default: 01993 break; 01994 } 01995 break; 01996 } 01997 01998 /*!< Request LCD RAM update */ 01999 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 02000 } 02001 02002 /** 02003 * @brief Set Matrix Pixel off. 02004 * @param PixelRow: Specify Matrix Row. 02005 * @param PixelColumn: Specify Matrix Column. 02006 * @retval None 02007 */ 02008 void BSP_LCD_GLASS_ClearMatrixPixel(PixelRow_TypeDef PixelRow, PixelColumn_TypeDef PixelColumn) 02009 { 02010 switch (PixelRow) 02011 { 02012 case PIXELROW_1: 02013 switch (PixelColumn) 02014 { 02015 case PIXELCOLUMN_1: 02016 /* Position : Row = 1 , Column= 1 */ 02017 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFDFF, 0); 02018 break; 02019 02020 case PIXELCOLUMN_2: 02021 /* Position : Row = 1 , Column= 2 */ 02022 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFBFFF, 0); 02023 break; 02024 02025 case PIXELCOLUMN_3: 02026 /* Position : Row = 1 , Column= 3 */ 02027 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFDFFF, 0); 02028 break; 02029 02030 case PIXELCOLUMN_4: 02031 /* Position : Row = 1 , Column= 4 */ 02032 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFEFFF, 0); 02033 break; 02034 02035 case PIXELCOLUMN_5: 02036 /* Position : Row = 1 , Column= 5 */ 02037 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFDFFFF, 0); 02038 break; 02039 02040 case PIXELCOLUMN_6: 02041 /* Position : Row = 1 , Column= 6 */ 02042 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFEFFFF, 0); 02043 break; 02044 02045 case PIXELCOLUMN_7: 02046 /* Position : Row = 1 , Column= 7 */ 02047 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFF7FFF, 0); 02048 break; 02049 02050 case PIXELCOLUMN_8: 02051 /* Position : Row = 1 , Column= 8 */ 02052 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFEFFFFF, 0); 02053 break; 02054 02055 case PIXELCOLUMN_9: 02056 /* Position : Row = 1 , Column= 9 */ 02057 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFF7FFFF, 0); 02058 break; 02059 02060 case PIXELCOLUMN_10: 02061 /* Position : Row = 1 , Column= 10 */ 02062 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFBFFFF, 0); 02063 break; 02064 02065 case PIXELCOLUMN_11: 02066 /* Position : Row = 1 , Column= 11 */ 02067 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFFB, 0); 02068 break; 02069 02070 case PIXELCOLUMN_12: 02071 /* Position : Row = 1 , Column= 12 */ 02072 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFFD, 0); 02073 break; 02074 02075 case PIXELCOLUMN_13: 02076 /* Position : Row = 1 , Column= 13 */ 02077 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFFE, 0); 02078 break; 02079 02080 case PIXELCOLUMN_14: 02081 /* Position : Row = 1 , Column= 14 */ 02082 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFDF, 0); 02083 break; 02084 02085 case PIXELCOLUMN_15: 02086 /* Position : Row = 1 , Column= 15 */ 02087 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFEF, 0); 02088 break; 02089 02090 case PIXELCOLUMN_16: 02091 /* Position : Row = 1 , Column= 16 */ 02092 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFF7, 0); 02093 break; 02094 02095 case PIXELCOLUMN_17: 02096 /* Position : Row = 1 , Column= 17 */ 02097 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFEFF, 0); 02098 break; 02099 02100 case PIXELCOLUMN_18: 02101 /* Position : Row = 1 , Column= 18 */ 02102 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFF7F, 0); 02103 break; 02104 02105 case PIXELCOLUMN_19: 02106 /* Position : Row = 1 , Column= 19 */ 02107 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFFFFFBF, 0); 02108 break; 02109 02110 default: 02111 break; 02112 } 02113 break; 02114 02115 case PIXELROW_2: 02116 02117 switch (PixelColumn) 02118 { 02119 case PIXELCOLUMN_1: 02120 /* Position : Row = 2 , Column= 1 */ 02121 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFDFF, 0); 02122 break; 02123 02124 case PIXELCOLUMN_2: 02125 /* Position : Row = 2 , Column= 2 */ 02126 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFBFFF, 0); 02127 break; 02128 02129 case PIXELCOLUMN_3: 02130 /* Position : Row = 2 , Column= 3 */ 02131 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFDFFF, 0); 02132 break; 02133 02134 case PIXELCOLUMN_4: 02135 /* Position : Row = 2 , Column= 4 */ 02136 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFEFFF, 0); 02137 break; 02138 02139 case PIXELCOLUMN_5: 02140 /* Position : Row = 2 , Column= 5 */ 02141 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFDFFFF, 0); 02142 break; 02143 02144 case PIXELCOLUMN_6: 02145 /* Position : Row = 2 , Column= 6 */ 02146 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFEFFFF, 0); 02147 break; 02148 02149 case PIXELCOLUMN_7: 02150 /* Position : Row = 2 , Column= 7 */ 02151 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFF7FFF, 0); 02152 break; 02153 02154 case PIXELCOLUMN_8: 02155 /* Position : Row = 2 , Column= 8 */ 02156 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFEFFFFF, 0); 02157 break; 02158 02159 case PIXELCOLUMN_9: 02160 /* Position : Row = 2 , Column= 9 */ 02161 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFF7FFFF, 0); 02162 break; 02163 02164 case PIXELCOLUMN_10: 02165 /* Position : Row = 2 , Column= 10 */ 02166 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFBFFFF, 0); 02167 break; 02168 02169 case PIXELCOLUMN_11: 02170 /* Position : Row = 2 , Column= 11 */ 02171 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFFB, 0); 02172 break; 02173 02174 case PIXELCOLUMN_12: 02175 /* Position : Row = 2 , Column= 12 */ 02176 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFFD, 0); 02177 break; 02178 02179 case PIXELCOLUMN_13: 02180 /* Position : Row = 2 , Column= 13 */ 02181 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFFE, 0); 02182 break; 02183 02184 case PIXELCOLUMN_14: 02185 /* Position : Row = 2 , Column= 14 */ 02186 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFDF, 0); 02187 break; 02188 02189 case PIXELCOLUMN_15: 02190 /* Position : Row = 2 , Column= 15 */ 02191 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFEF, 0); 02192 break; 02193 02194 case PIXELCOLUMN_16: 02195 /* Position : Row = 2 , Column= 16 */ 02196 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFF7, 0); 02197 break; 02198 02199 case PIXELCOLUMN_17: 02200 /* Position : Row = 2 , Column= 17 */ 02201 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFEFF, 0); 02202 break; 02203 02204 case PIXELCOLUMN_18: 02205 /* Position : Row = 2 , Column= 18 */ 02206 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFF7F, 0); 02207 break; 02208 02209 case PIXELCOLUMN_19: 02210 /* Position : Row = 2 , Column= 19 */ 02211 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFFFFFBF, 0); 02212 break; 02213 02214 default: 02215 break; 02216 } 02217 break; 02218 02219 case PIXELROW_3: 02220 switch (PixelColumn) 02221 { 02222 case PIXELCOLUMN_1: 02223 /* Position : Row = 3 , Column= 1 */ 02224 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFDFFFFF, 0); 02225 break; 02226 02227 case PIXELCOLUMN_2: 02228 /* Position : Row = 3 , Column= 2 */ 02229 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFFBFFFFF, 0); 02230 break; 02231 02232 case PIXELCOLUMN_3: 02233 /* Position : Row = 3 , Column= 3 */ 02234 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFF7FFFFF, 0); 02235 break; 02236 02237 case PIXELCOLUMN_4: 02238 /* Position : Row = 3 , Column= 4 */ 02239 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFEFFFFFF, 0); 02240 break; 02241 02242 case PIXELCOLUMN_5: 02243 /* Position : Row = 3 , Column= 5 */ 02244 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFDFFFFFF, 0); 02245 break; 02246 02247 case PIXELCOLUMN_6: 02248 /* Position : Row = 3 , Column= 6 */ 02249 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xFBFFFFFF, 0); 02250 break; 02251 02252 case PIXELCOLUMN_7: 02253 /* Position : Row = 3 , Column= 7 */ 02254 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xF7FFFFFF, 0); 02255 break; 02256 02257 case PIXELCOLUMN_8: 02258 /* Position : Row = 3 , Column= 8 */ 02259 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xEFFFFFFF, 0); 02260 break; 02261 02262 case PIXELCOLUMN_9: 02263 /* Position : Row = 3 , Column= 9*/ 02264 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xDFFFFFFF, 0); 02265 break; 02266 02267 case PIXELCOLUMN_10: 02268 /* Position : Row = 3 , Column= 10*/ 02269 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0xBFFFFFFF, 0); 02270 break; 02271 02272 case PIXELCOLUMN_11: 02273 /* Position : Row = 3 , Column= 11*/ 02274 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER4, (uint32_t)0x7FFFFFFF, 0); 02275 break; 02276 02277 case PIXELCOLUMN_12: 02278 /* Position : Row = 3 , Column= 12*/ 02279 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFFE, 0); 02280 break; 02281 02282 case PIXELCOLUMN_13: 02283 /* Position : Row = 3 , Column= 13*/ 02284 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFFD, 0); 02285 break; 02286 02287 case PIXELCOLUMN_14: 02288 /* Position : Row = 3 , Column= 14*/ 02289 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFFB, 0); 02290 break; 02291 02292 case PIXELCOLUMN_15: 02293 /* Position : Row = 3 , Column= 15*/ 02294 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFF7, 0); 02295 break; 02296 02297 case PIXELCOLUMN_16: 02298 /* Position : Row = 3 , Column= 16*/ 02299 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFEF, 0); 02300 break; 02301 02302 case PIXELCOLUMN_17: 02303 /* Position : Row = 3 , Column= 17*/ 02304 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFDF, 0); 02305 break; 02306 02307 case PIXELCOLUMN_18: 02308 /* Position : Row = 3 , Column= 18*/ 02309 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFFBF, 0); 02310 break; 02311 02312 case PIXELCOLUMN_19: 02313 /* Position : Row = 3 , Column= 19 */ 02314 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER5, (uint32_t)0xFFFFFF7F, 0); 02315 break; 02316 02317 default: 02318 break; 02319 } 02320 break; 02321 02322 case PIXELROW_4: 02323 switch (PixelColumn) 02324 { 02325 case PIXELCOLUMN_1: 02326 /* Position : Row = 4 , Column= 1 */ 02327 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFDFFFFF, 0); 02328 break; 02329 02330 case PIXELCOLUMN_2: 02331 /* Position : Row = 4 , Column= 2 */ 02332 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFFBFFFFF, 0); 02333 break; 02334 02335 case PIXELCOLUMN_3: 02336 /* Position : Row = 4 , Column= 3 */ 02337 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFF7FFFFF, 0); 02338 break; 02339 02340 case PIXELCOLUMN_4: 02341 /* Position : Row = 4 , Column= 4 */ 02342 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFEFFFFFF, 0); 02343 break; 02344 02345 case PIXELCOLUMN_5: 02346 /* Position : Row = 4 , Column= 5 */ 02347 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFDFFFFFF, 0); 02348 break; 02349 02350 case PIXELCOLUMN_6: 02351 /* Position : Row = 4 , Column= 6 */ 02352 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xFBFFFFFF, 0); 02353 break; 02354 02355 case PIXELCOLUMN_7: 02356 /* Position : Row = 4 , Column= 7 */ 02357 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xF7FFFFFF, 0); 02358 break; 02359 02360 case PIXELCOLUMN_8: 02361 /* Position : Row = 4 , Column= 8 */ 02362 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xEFFFFFFF, 0); 02363 break; 02364 02365 case PIXELCOLUMN_9: 02366 /* Position : Row = 4 , Column= 9*/ 02367 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xDFFFFFFF, 0); 02368 break; 02369 02370 case PIXELCOLUMN_10: 02371 /* Position : Row = 4 , Column= 10*/ 02372 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0xBFFFFFFF, 0); 02373 break; 02374 02375 case PIXELCOLUMN_11: 02376 /* Position : Row = 4 , Column= 11*/ 02377 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER6, (uint32_t)0x7FFFFFFF, 0); 02378 break; 02379 02380 case PIXELCOLUMN_12: 02381 /* Position : Row = 4 , Column= 12*/ 02382 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFFE, 0); 02383 break; 02384 02385 case PIXELCOLUMN_13: 02386 /* Position : Row = 4 , Column= 13*/ 02387 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFFD, 0); 02388 break; 02389 02390 case PIXELCOLUMN_14: 02391 /* Position : Row = 4 , Column= 14*/ 02392 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFFB, 0); 02393 break; 02394 02395 case PIXELCOLUMN_15: 02396 /* Position : Row = 4 , Column= 15*/ 02397 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFF7, 0); 02398 break; 02399 02400 case PIXELCOLUMN_16: 02401 /* Position : Row = 4 , Column= 16*/ 02402 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFEF, 0); 02403 break; 02404 02405 case PIXELCOLUMN_17: 02406 /* Position : Row = 4 , Column= 17*/ 02407 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFDF, 0); 02408 break; 02409 02410 case PIXELCOLUMN_18: 02411 /* Position : Row = 4 , Column= 18*/ 02412 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFFBF, 0); 02413 break; 02414 02415 case PIXELCOLUMN_19: 02416 /* Position : Row = 4 , Column= 19 */ 02417 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER7, (uint32_t)0xFFFFFF7F, 0); 02418 break; 02419 02420 default: 02421 break; 02422 } 02423 break; 02424 02425 case PIXELROW_5: 02426 switch (PixelColumn) 02427 { 02428 case PIXELCOLUMN_1: 02429 /* Position : Row = 5 , Column= 1 */ 02430 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xFFDFFFFF, 0); 02431 break; 02432 02433 case PIXELCOLUMN_2: 02434 /* Position : Row = 5 , Column= 2 */ 02435 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xFFBFFFFF, 0); 02436 break; 02437 02438 case PIXELCOLUMN_3: 02439 /* Position : Row = 5 , Column= 3 */ 02440 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xFF7FFFFF, 0); 02441 break; 02442 02443 case PIXELCOLUMN_4: 02444 /* Position : Row = 5 , Column= 4 */ 02445 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xFEFFFFFF, 0); 02446 break; 02447 02448 case PIXELCOLUMN_5: 02449 /* Position : Row = 5 , Column= 5 */ 02450 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xFDFFFFFF, 0); 02451 break; 02452 02453 case PIXELCOLUMN_6: 02454 /* Position : Row = 5 , Column= 6 */ 02455 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xFBFFFFFF, 0); 02456 break; 02457 02458 case PIXELCOLUMN_7: 02459 /* Position : Row = 5 , Column= 7 */ 02460 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xF7FFFFFF, 0); 02461 break; 02462 02463 case PIXELCOLUMN_8: 02464 /* Position : Row = 5 , Column= 8 */ 02465 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xEFFFFFFF, 0); 02466 break; 02467 02468 case PIXELCOLUMN_9: 02469 /* Position : Row = 5 , Column= 9*/ 02470 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xDFFFFFFF, 0); 02471 break; 02472 02473 case PIXELCOLUMN_10: 02474 /* Position : Row = 5 , Column= 10*/ 02475 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0xBFFFFFFF, 0); 02476 break; 02477 02478 case PIXELCOLUMN_11: 02479 /* Position : Row = 5 , Column= 11*/ 02480 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER0, (uint32_t)0x7FFFFFFF, 0); 02481 break; 02482 02483 case PIXELCOLUMN_12: 02484 /* Position : Row = 5 , Column= 12*/ 02485 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFFE, 0); 02486 break; 02487 02488 case PIXELCOLUMN_13: 02489 /* Position : Row = 5 , Column= 13*/ 02490 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFFD, 0); 02491 break; 02492 02493 case PIXELCOLUMN_14: 02494 /* Position : Row = 5 , Column= 14*/ 02495 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFFB, 0); 02496 break; 02497 02498 case PIXELCOLUMN_15: 02499 /* Position : Row = 5 , Column= 15*/ 02500 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFF7, 0); 02501 break; 02502 02503 case PIXELCOLUMN_16: 02504 /* Position : Row = 5 , Column= 16*/ 02505 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFEF, 0); 02506 break; 02507 02508 case PIXELCOLUMN_17: 02509 /* Position : Row = 5 , Column= 17*/ 02510 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFDF, 0); 02511 break; 02512 02513 case PIXELCOLUMN_18: 02514 /* Position : Row = 5 , Column= 18*/ 02515 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFFBF, 0); 02516 break; 02517 02518 case PIXELCOLUMN_19: 02519 /* Position : Row = 5 , Column= 19 */ 02520 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER1, (uint32_t)0xFFFFFF7F, 0); 02521 break; 02522 02523 default: 02524 break; 02525 } 02526 break; 02527 02528 case PIXELROW_6: 02529 switch (PixelColumn) 02530 { 02531 case PIXELCOLUMN_1: 02532 /* Position : Row = 6 , Column= 1 */ 02533 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xFFDFFFFF, 0); 02534 break; 02535 02536 case PIXELCOLUMN_2: 02537 /* Position : Row = 6 , Column= 2 */ 02538 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xFFBFFFFF, 0); 02539 break; 02540 02541 case PIXELCOLUMN_3: 02542 /* Position : Row = 6 , Column= 3 */ 02543 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xFF7FFFFF, 0); 02544 break; 02545 02546 case PIXELCOLUMN_4: 02547 /* Position : Row = 6 , Column= 4 */ 02548 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xFEFFFFFF, 0); 02549 break; 02550 02551 case PIXELCOLUMN_5: 02552 /* Position : Row = 6 , Column= 5 */ 02553 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xFDFFFFFF, 0); 02554 break; 02555 02556 case PIXELCOLUMN_6: 02557 /* Position : Row = 6 , Column= 6 */ 02558 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xFBFFFFFF, 0); 02559 break; 02560 02561 case PIXELCOLUMN_7: 02562 /* Position : Row = 6 , Column= 7 */ 02563 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xF7FFFFFF, 0); 02564 break; 02565 02566 case PIXELCOLUMN_8: 02567 /* Position : Row = 6 , Column= 8 */ 02568 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xEFFFFFFF, 0); 02569 break; 02570 02571 case PIXELCOLUMN_9: 02572 /* Position : Row = 6 , Column= 9*/ 02573 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xDFFFFFFF, 0); 02574 break; 02575 02576 case PIXELCOLUMN_10: 02577 /* Position : Row = 6 , Column= 10*/ 02578 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0xBFFFFFFF, 0); 02579 break; 02580 02581 case PIXELCOLUMN_11: 02582 /* Position : Row = 6 , Column= 11*/ 02583 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER2, (uint32_t)0x7FFFFFFF, 0); 02584 break; 02585 02586 case PIXELCOLUMN_12: 02587 /* Position : Row = 6 , Column= 12*/ 02588 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFFE, 0); 02589 break; 02590 02591 case PIXELCOLUMN_13: 02592 /* Position : Row = 6 , Column= 13*/ 02593 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFFD, 0); 02594 break; 02595 02596 case PIXELCOLUMN_14: 02597 /* Position : Row = 6 , Column= 14*/ 02598 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFFB, 0); 02599 break; 02600 02601 case PIXELCOLUMN_15: 02602 /* Position : Row = 6 , Column= 15*/ 02603 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFF7, 0); 02604 break; 02605 02606 case PIXELCOLUMN_16: 02607 /* Position : Row = 6 , Column= 16*/ 02608 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFEF, 0); 02609 break; 02610 02611 case PIXELCOLUMN_17: 02612 /* Position : Row = 6 , Column= 17*/ 02613 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFDF, 0); 02614 break; 02615 02616 case PIXELCOLUMN_18: 02617 /* Position : Row = 6 , Column= 18*/ 02618 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFFBF, 0); 02619 break; 02620 02621 case PIXELCOLUMN_19: 02622 /* Position : Row = 6 , Column= 19 */ 02623 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER3, (uint32_t)0xFFFFFF7F, 0); 02624 break; 02625 02626 default: 02627 break; 02628 } 02629 break; 02630 02631 case PIXELROW_7: 02632 switch (PixelColumn) 02633 { 02634 case PIXELCOLUMN_1: 02635 /* Position : Row = 7 , Column =1 */ 02636 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xFFDFFFFF, 0); 02637 break; 02638 02639 case PIXELCOLUMN_2: 02640 /* Position : Row = 7 , Column =2 */ 02641 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xFFBFFFFF, 0); 02642 break; 02643 02644 case PIXELCOLUMN_3: 02645 /* Position : Row = 7 , Column =3 */ 02646 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xFF7FFFFF, 0); 02647 break; 02648 02649 case PIXELCOLUMN_4: 02650 /* Position : Row = 7 , Column =4 */ 02651 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xFEFFFFFF, 0); 02652 break; 02653 02654 case PIXELCOLUMN_5: 02655 /* Position : Row = 7 , Column =5 */ 02656 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xFDFFFFFF, 0); 02657 break; 02658 02659 case PIXELCOLUMN_6: 02660 /* Position : Row = 7 , Column =6 */ 02661 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xFBFFFFFF, 0); 02662 break; 02663 02664 case PIXELCOLUMN_7: 02665 /* Position : Row = 7 , Column =7 */ 02666 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xF7FFFFFF, 0); 02667 break; 02668 02669 case PIXELCOLUMN_8: 02670 /* Position : Row = 7 , Column =8 */ 02671 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xEFFFFFFF, 0); 02672 break; 02673 02674 case PIXELCOLUMN_9: 02675 /* Position : Row = 7 , Column =9*/ 02676 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xDFFFFFFF, 0); 02677 break; 02678 02679 case PIXELCOLUMN_10: 02680 /* Position : Row = 7 , Column =10*/ 02681 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0xBFFFFFFF, 0); 02682 break; 02683 02684 case PIXELCOLUMN_11: 02685 /* Position : Row = 7 , Column =11*/ 02686 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER14, (uint32_t)0x7FFFFFFF, 0); 02687 break; 02688 02689 case PIXELCOLUMN_12: 02690 /* Position : Row = 7 , Column =12*/ 02691 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFFE, 0); 02692 break; 02693 02694 case PIXELCOLUMN_13: 02695 /* Position : Row = 7 , Column =13*/ 02696 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFFD, 0); 02697 break; 02698 02699 case PIXELCOLUMN_14: 02700 /* Position : Row = 7 , Column =14*/ 02701 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFFB, 0); 02702 break; 02703 02704 case PIXELCOLUMN_15: 02705 /* Position : Row = 7 , Column =15*/ 02706 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFF7, 0); 02707 break; 02708 02709 case PIXELCOLUMN_16: 02710 /* Position : Row = 7 , Column =16*/ 02711 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFEF, 0); 02712 break; 02713 02714 case PIXELCOLUMN_17: 02715 /* Position : Row = 7 , Column =17*/ 02716 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFDF, 0); 02717 break; 02718 02719 case PIXELCOLUMN_18: 02720 /* Position : Row = 7 , Column =18*/ 02721 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFFBF, 0); 02722 break; 02723 02724 case PIXELCOLUMN_19: 02725 /* Position : Row = 7 , Column =19 */ 02726 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER15, (uint32_t)0xFFFFFF7F, 0); 02727 break; 02728 02729 default: 02730 break; 02731 } 02732 break; 02733 02734 case PIXELROW_8: 02735 switch (PixelColumn) 02736 { 02737 case PIXELCOLUMN_1: 02738 /* Position : Row = 8 , Column =1 */ 02739 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xFFDFFFFF, 0); 02740 break; 02741 02742 case PIXELCOLUMN_2: 02743 /* Position : Row = 8 , Column =2 */ 02744 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xFFBFFFFF, 0); 02745 break; 02746 02747 case PIXELCOLUMN_3: 02748 /* Position : Row = 8 , Column =3 */ 02749 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xFF7FFFFF, 0); 02750 break; 02751 02752 case PIXELCOLUMN_4: 02753 /* Position : Row = 8 , Column =4 */ 02754 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xFEFFFFF0, 0); 02755 break; 02756 02757 case PIXELCOLUMN_5: 02758 /* Position : Row = 8 , Column =5 */ 02759 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xFDFFFFFF, 0); 02760 break; 02761 02762 case PIXELCOLUMN_6: 02763 /* Position : Row = 8 , Column =6 */ 02764 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xFBFFFFF0, 0); 02765 break; 02766 02767 case PIXELCOLUMN_7: 02768 /* Position : Row = 8 , Column =7 */ 02769 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xF7FFFFFF, 0); 02770 break; 02771 02772 case PIXELCOLUMN_8: 02773 /* Position : Row = 8 , Column =8 */ 02774 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xEFFFFFFF, 0); 02775 break; 02776 02777 case PIXELCOLUMN_9: 02778 /* Position : Row = 8 , Column =9*/ 02779 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xDFFFFFFF, 0); 02780 break; 02781 02782 case PIXELCOLUMN_10: 02783 /* Position : Row = 8 , Column =10*/ 02784 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0xBFFFFFFF, 0); 02785 break; 02786 02787 case PIXELCOLUMN_11: 02788 /* Position : Row = 8 , Column =11*/ 02789 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER12, (uint32_t)0x7FFFFFFF, 0); 02790 break; 02791 02792 case PIXELCOLUMN_12: 02793 /* Position : Row = 8 , Column =12*/ 02794 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFFE, 0); 02795 break; 02796 02797 case PIXELCOLUMN_13: 02798 /* Position : Row = 8 , Column =13*/ 02799 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFFD, 0); 02800 break; 02801 02802 case PIXELCOLUMN_14: 02803 /* Position : Row = 8 , Column =14*/ 02804 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFFB, 0); 02805 break; 02806 02807 case PIXELCOLUMN_15: 02808 /* Position : Row = 8 , Column =15*/ 02809 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFF7, 0); 02810 break; 02811 02812 case PIXELCOLUMN_16: 02813 /* Position : Row = 8 , Column =16*/ 02814 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFEF, 0); 02815 break; 02816 02817 case PIXELCOLUMN_17: 02818 /* Position : Row = 8 , Column =17*/ 02819 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFDF, 0); 02820 break; 02821 02822 case PIXELCOLUMN_18: 02823 /* Position : Row = 8 , Column =18*/ 02824 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFFBF, 0); 02825 break; 02826 02827 case PIXELCOLUMN_19: 02828 /* Position : Row = 8 , Column =19 */ 02829 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER13, (uint32_t)0xFFFFFF7F, 0); 02830 break; 02831 02832 default: 02833 break; 02834 } 02835 break; 02836 02837 case PIXELROW_9: 02838 switch (PixelColumn) 02839 { 02840 case PIXELCOLUMN_1: 02841 /* Position : Row = 9 , Column =1 */ 02842 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xFFDFFFFF, 0); 02843 break; 02844 02845 case PIXELCOLUMN_2: 02846 /* Position : Row = 9 , Column =2 */ 02847 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xFFBFFFFF, 0); 02848 break; 02849 02850 case PIXELCOLUMN_3: 02851 /* Position : Row = 9 , Column =3 */ 02852 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xFF7FFFFF, 0); 02853 break; 02854 02855 case PIXELCOLUMN_4: 02856 /* Position : Row = 9 , Column =4 */ 02857 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xFEFFFFFF, 0); 02858 break; 02859 02860 case PIXELCOLUMN_5: 02861 /* Position : Row = 9 , Column =5 */ 02862 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xFDFFFFFF, 0); 02863 break; 02864 02865 case PIXELCOLUMN_6: 02866 /* Position : Row = 9 , Column =6 */ 02867 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xFBFFFFFF, 0); 02868 break; 02869 02870 case PIXELCOLUMN_7: 02871 /* Position : Row = 9 , Column =7 */ 02872 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xF7FFFFFF, 0); 02873 break; 02874 02875 case PIXELCOLUMN_8: 02876 /* Position : Row = 9 , Column =8 */ 02877 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xEFFFFFFF, 0); 02878 break; 02879 02880 case PIXELCOLUMN_9: 02881 /* Position : Row = 9 , Column =9*/ 02882 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xDFFFFFFF, 0); 02883 break; 02884 02885 case PIXELCOLUMN_10: 02886 /* Position : Row = 9 , Column =10*/ 02887 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0xBFFFFFF, 0); 02888 break; 02889 02890 case PIXELCOLUMN_11: 02891 /* Position : Row = 9 , Column =11*/ 02892 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER10, (uint32_t)0x7FFFFFFF, 0); 02893 break; 02894 02895 case PIXELCOLUMN_12: 02896 /* Position : Row = 9 , Column =12*/ 02897 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFFE, 0); 02898 break; 02899 02900 case PIXELCOLUMN_13: 02901 /* Position : Row = 9 , Column =13*/ 02902 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFFD, 0); 02903 break; 02904 02905 case PIXELCOLUMN_14: 02906 /* Position : Row = 9 , Column =14*/ 02907 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFFB, 0); 02908 break; 02909 02910 case PIXELCOLUMN_15: 02911 /* Position : Row = 9 , Column =15*/ 02912 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFF7, 0); 02913 break; 02914 02915 case PIXELCOLUMN_16: 02916 /* Position : Row = 9 , Column =16*/ 02917 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFEF, 0); 02918 break; 02919 02920 case PIXELCOLUMN_17: 02921 /* Position : Row = 9 , Column =17*/ 02922 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFDF, 0); 02923 break; 02924 02925 case PIXELCOLUMN_18: 02926 /* Position : Row = 9 , Column =18*/ 02927 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFFBF, 0); 02928 break; 02929 02930 case PIXELCOLUMN_19: 02931 /* Position : Row = 9 , Column =19 */ 02932 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER11, (uint32_t)0xFFFFFF7F, 0); 02933 break; 02934 02935 default: 02936 break; 02937 } 02938 break; 02939 02940 case PIXELROW_10: 02941 switch (PixelColumn) 02942 { 02943 case PIXELCOLUMN_1: 02944 /* Position : Row = 10 , Column= 1 */ 02945 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xFFDFFFFF, 0); 02946 break; 02947 02948 case PIXELCOLUMN_2: 02949 /* Position : Row = 10 , Column= 2 */ 02950 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xFFBFFFFF, 0); 02951 break; 02952 02953 case PIXELCOLUMN_3: 02954 /* Position : Row = 10 , Column= 3 */ 02955 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xFF7FFFFF, 0); 02956 break; 02957 02958 case PIXELCOLUMN_4: 02959 /* Position : Row = 10 , Column= 4 */ 02960 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xFEFFFFFF, 0); 02961 break; 02962 02963 case PIXELCOLUMN_5: 02964 /* Position : Row = 10 , Column= 5 */ 02965 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xFDFFFFFF, 0); 02966 break; 02967 02968 case PIXELCOLUMN_6: 02969 /* Position : Row = 10 , Column= 6 */ 02970 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xFBFFFFFF, 0); 02971 break; 02972 02973 case PIXELCOLUMN_7: 02974 /* Position : Row = 10 , Column= 7 */ 02975 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xF7FFFFFF, 0); 02976 break; 02977 02978 case PIXELCOLUMN_8: 02979 /* Position : Row = 10 , Column= 8 */ 02980 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xEFFFFFFF, 0); 02981 break; 02982 02983 case PIXELCOLUMN_9: 02984 /* Position : Row = 10 , Column= 9*/ 02985 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xDFFFFFFF, 0); 02986 break; 02987 02988 case PIXELCOLUMN_10: 02989 /* Position : Row = 10 , Column= 10*/ 02990 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0xBFFFFFFF, 0); 02991 break; 02992 02993 case PIXELCOLUMN_11: 02994 /* Position : Row = 10 , Column= 11*/ 02995 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER8, (uint32_t)0x7FFFFFFF, 0); 02996 break; 02997 02998 case PIXELCOLUMN_12: 02999 /* Position : Row = 10 , Column= 12*/ 03000 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFFE, 0); 03001 break; 03002 03003 case PIXELCOLUMN_13: 03004 /* Position : Row = 10 , Column= 13*/ 03005 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFFD, 0); 03006 break; 03007 03008 case PIXELCOLUMN_14: 03009 /* Position : Row = 10 , Column= 14*/ 03010 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFFB, 0); 03011 break; 03012 03013 case PIXELCOLUMN_15: 03014 /* Position : Row = 10 , Column= 15*/ 03015 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFF7, 0); 03016 break; 03017 03018 case PIXELCOLUMN_16: 03019 /* Position : Row = 10 , Column= 16*/ 03020 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFEF, 0); 03021 break; 03022 03023 case PIXELCOLUMN_17: 03024 /* Position : Row = 10 , Column= 17*/ 03025 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFDF, 0); 03026 break; 03027 03028 case PIXELCOLUMN_18: 03029 /* Position : Row = 10 , Column= 18*/ 03030 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFFBF, 0); 03031 break; 03032 03033 case PIXELCOLUMN_19: 03034 /* Position : Row = 10 , Column= 19 */ 03035 HAL_LCD_Write(&LCDHandle, LCD_RAM_REGISTER9, (uint32_t)0xFFFFFF7F, 0); 03036 break; 03037 03038 default: 03039 break; 03040 } 03041 break; 03042 } 03043 03044 /*!< Request LCD RAM update */ 03045 HAL_LCD_UpdateDisplayRequest(&LCDHandle); 03046 } 03047 03048 /** 03049 * @} 03050 */ 03051 03052 /** @addtogroup STM32L073Z_EVAL_LCD_Private_Functions 03053 * @{ 03054 */ 03055 03056 /** 03057 * @brief LCD MSP Init. 03058 * @param hlcd: LCD handle 03059 * @retval None 03060 */ 03061 static void LCD_MspInit(LCD_HandleTypeDef *hlcd) 03062 { 03063 GPIO_InitTypeDef gpioinitstruct = {0}; 03064 RCC_OscInitTypeDef oscinitstruct = {0}; 03065 03066 /*##-1- Enable PWR peripheral Clock #######################################*/ 03067 __HAL_RCC_PWR_CLK_ENABLE(); 03068 03069 /*##-2- Allow Access and Reset the Backup Domaine ##########################*/ 03070 /* Allow Access to Backup Domaine */ 03071 HAL_PWR_EnableBkUpAccess(); 03072 03073 /* Reset the Backup Domaine */ 03074 __HAL_RCC_BACKUPRESET_FORCE(); 03075 __HAL_RCC_BACKUPRESET_RELEASE(); 03076 03077 /*##-3- Configue LSE as RTC clock soucre ###################################*/ 03078 oscinitstruct.OscillatorType = RCC_OSCILLATORTYPE_LSE; 03079 oscinitstruct.PLL.PLLState = RCC_PLL_NONE; 03080 oscinitstruct.LSEState = RCC_LSE_ON; 03081 if(HAL_RCC_OscConfig(&oscinitstruct) != HAL_OK) 03082 { 03083 while(1); 03084 } 03085 __HAL_RCC_RTC_CONFIG(RCC_RTCCLKSOURCE_LSE); 03086 03087 03088 /*##-4- Enable LCD GPIO Clocks #############################################*/ 03089 __HAL_RCC_GPIOA_CLK_ENABLE(); 03090 __HAL_RCC_GPIOB_CLK_ENABLE(); 03091 __HAL_RCC_GPIOC_CLK_ENABLE(); 03092 __HAL_RCC_GPIOD_CLK_ENABLE(); 03093 __HAL_RCC_GPIOE_CLK_ENABLE(); 03094 03095 /*##-5- Configure peripheral GPIO ##########################################*/ 03096 /* Configure Output for LCD */ 03097 /* Port A */ 03098 gpioinitstruct.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_6 | \ 03099 GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | \ 03100 GPIO_PIN_15; 03101 03102 gpioinitstruct.Mode = GPIO_MODE_AF_PP; 03103 gpioinitstruct.Pull = GPIO_NOPULL; 03104 gpioinitstruct.Speed = GPIO_SPEED_FREQ_MEDIUM ; 03105 gpioinitstruct.Alternate = GPIO_AF1_LCD; 03106 HAL_GPIO_Init(GPIOA, &gpioinitstruct); 03107 03108 03109 /* Configure Output for LCD */ 03110 /* Port B */ 03111 gpioinitstruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3 | GPIO_PIN_4 | \ 03112 GPIO_PIN_5 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | \ 03113 GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | \ 03114 GPIO_PIN_15; 03115 HAL_GPIO_Init(GPIOB, &gpioinitstruct); 03116 03117 03118 /* Configure Output for LCD */ 03119 /* Port C*/ 03120 gpioinitstruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | \ 03121 GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 | \ 03122 GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | \ 03123 GPIO_PIN_12; 03124 HAL_GPIO_Init(GPIOC, &gpioinitstruct); 03125 03126 /* Configure Output for LCD */ 03127 /* Port D*/ 03128 gpioinitstruct.Pin = GPIO_PIN_2 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | \ 03129 GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | \ 03130 GPIO_PIN_15; 03131 HAL_GPIO_Init(GPIOD, &gpioinitstruct); 03132 03133 /* Configure Output for LCD */ 03134 /* Port E*/ 03135 gpioinitstruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3; 03136 HAL_GPIO_Init(GPIOE, &gpioinitstruct); 03137 03138 /*##-6- Enable LCD peripheral Clock ########################################*/ 03139 __HAL_RCC_LCD_CLK_ENABLE(); 03140 } 03141 03142 /** 03143 * @brief Converts an ascii char to the a LCD Digit (previous coding). 03144 * @param c: a char to display. 03145 * @param Point: a point to add in front of a char 03146 * This parameter can be: POINT_OFF or POINT_ON 03147 * @param DoublePoint: flag indicating if Double Point has to be added in front 03148 * of the displayed character. 03149 * This parameter can be: DOUBLEPOINT_ON or DOUBLEPOINT_OFF. 03150 * @retval None 03151 */ 03152 static void Convert(uint8_t* c, Point_Typedef Point, DoublePoint_Typedef DoublePoint) 03153 { 03154 uint32_t ch = 0 , tmp = 0; 03155 uint8_t i = 0; 03156 03157 /* The character c is a letter in upper case*/ 03158 if ((*c < (uint8_t)ASCII_CHAR_LEFT_OPEN_BRACKET)&(*c > (uint8_t)ASCII_CHAR_AT_SYMBOL)) 03159 { 03160 ch = LetterMap[*c-(uint8_t)ASCII_CHAR_A]; 03161 } 03162 /* The character c is a number*/ 03163 if ((*c < (uint8_t)ASCII_CHAR_COLON)&(*c > (uint8_t)ASCII_CHAR_FORWARD_SLASH)) 03164 { 03165 ch = NumberMap[*c-(uint8_t)ASCII_CHAR_0]; 03166 } 03167 /* The character c is a space character */ 03168 if (*c == (uint8_t)ASCII_CHAR_SPACE) 03169 { 03170 ch = (uint32_t)0x00; 03171 } 03172 /* Set the Q pixel in the character that can be displayed if the point is on */ 03173 if (Point == POINT_ON) 03174 { 03175 ch |= (uint32_t)0x00400000; 03176 } 03177 03178 /* Set the P pixel in the character that can be displayed if the double point is on */ 03179 if (DoublePoint == DOUBLEPOINT_ON) 03180 { 03181 ch |= (uint32_t)0x00000040; 03182 } 03183 03184 for (i = 0;i < 6; i++) 03185 { 03186 tmp = ch & Mask[i]; 03187 Digit[i] = (uint8_t)(tmp >> (uint8_t)Shift[i]); 03188 } 03189 } 03190 03191 03192 /** 03193 * @} 03194 */ 03195 03196 /** 03197 * @} 03198 */ 03199 03200 /** 03201 * @} 03202 */ 03203 03204 /** 03205 * @} 03206 */ 03207 03208 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 03209
Generated on Mon Aug 28 2017 14:54:25 for STM32L073Z_EVAL BSP User Manual by 1.7.6.1