STM32L152C-Discovery BSP User Manual: stm32l152c_discovery_glass_lcd.h Source File

STM32L152C-Discovery BSP Driver

stm32l152c_discovery_glass_lcd.h
Go to the documentation of this file.
00001  /**
00002   ******************************************************************************
00003   * @file    stm32l152c_discovery_glass_lcd.h
00004   * @author  MCD Application Team
00005   * @brief   Header file for stm32l152c_discovery_glass_lcd.c module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
00010   *
00011   * Redistribution and use in source and binary forms, with or without modification,
00012   * are permitted provided that the following conditions are met:
00013   *   1. Redistributions of source code must retain the above copyright notice,
00014   *      this list of conditions and the following disclaimer.
00015   *   2. Redistributions in binary form must reproduce the above copyright notice,
00016   *      this list of conditions and the following disclaimer in the documentation
00017   *      and/or other materials provided with the distribution.
00018   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00019   *      may be used to endorse or promote products derived from this software
00020   *      without specific prior written permission.
00021   *
00022   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00025   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00026   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00028   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00029   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00030   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00031   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032   *
00033   ******************************************************************************
00034   */ 
00035 
00036 /** @addtogroup BSP
00037   * @{
00038   */
00039   
00040 /** @addtogroup STM32L152C_DISCOVERY
00041   * @{
00042   */
00043 
00044 /* Define to prevent recursive inclusion -------------------------------------*/
00045 #ifndef __stm32l152c_discovery_GLASS_LCD_H
00046 #define __stm32l152c_discovery_GLASS_LCD_H
00047 
00048 #ifdef __cplusplus
00049  extern "C" {
00050 #endif
00051 
00052 /* Includes ------------------------------------------------------------------*/
00053 #include "stm32l152c_discovery.h"
00054 
00055 /** @addtogroup STM32L152C_Discovery_GLASS_LCD
00056   * @{
00057   */ 
00058 
00059 /** @defgroup STM32L152C-Discovery_GLASS_LCD_Exported_Types Exported Types
00060   * @{
00061   */
00062 /**
00063   * @brief LCD Glass digit position
00064   */
00065 typedef enum
00066 {
00067   LCD_DIGIT_POSITION_1 = 1,
00068   LCD_DIGIT_POSITION_2 = 2,
00069   LCD_DIGIT_POSITION_3 = 3,
00070   LCD_DIGIT_POSITION_4 = 4,
00071   LCD_DIGIT_POSITION_5 = 5,
00072   LCD_DIGIT_POSITION_6 = 6,
00073   LCD_DIGIT_MAX_NUMBER = 6,
00074 }DigitPosition_Typedef;
00075 
00076 /**
00077   * @brief LCD Glass point
00078   * Warning: element values correspond to LCD Glass point.
00079   */
00080 
00081 typedef enum
00082 {
00083   POINT_OFF = 0,
00084   POINT_ON = 1
00085 }Point_Typedef;
00086 
00087 /**
00088   * @brief LCD Glass Double point
00089   * Warning: element values correspond to LCD Glass Double point.
00090   */
00091 typedef enum
00092 {
00093   DOUBLEPOINT_OFF = 0,
00094   DOUBLEPOINT_ON = 1
00095 }DoublePoint_Typedef;
00096 
00097 /**
00098   * @brief LCD Glass Battery Level
00099   * element values correspond to different LCD Glass battery levels
00100   */
00101 typedef enum
00102 {
00103   BATTERYLEVEL_OFF = 0,
00104   BATTERYLEVEL_1_4 = 1,
00105   BATTERYLEVEL_1_2 = 2,
00106   BATTERYLEVEL_3_4 = 3,
00107   BATTERYLEVEL_FULL = 4
00108 }BatteryLevel_Typedef;
00109 
00110 /**
00111   * @brief LCD Glass Bar Id
00112   */
00113 typedef enum
00114 {
00115   LCD_BAR_NONE  = 0,
00116   LCD_BAR_0     = (1 << 0),
00117   LCD_BAR_1     = (1 << 1),
00118   LCD_BAR_2     = (1 << 2),
00119   LCD_BAR_3     = (1 << 3)
00120 }BarId_Typedef;
00121 
00122 /**
00123   * @}
00124   */
00125   
00126 /** @defgroup STM32L152C-Discovery_GLASS_LCD_Exported_Defines Exported Defines
00127   * @{
00128   */
00129 
00130 /**
00131   * @brief LCD digit defintion 
00132   */
00133 #define COM_PER_DIGIT_NB          4/*!< Specifies number of COM to address a digit */
00134 #define SEG_PER_DIGIT_NB          4/*!< Specifies number of SEG to address a digit */
00135 
00136 #define LCD_MAP_CHAR_COM0_SEG_1ST_POS   (1 << LCD_MAP_CHAR_COM0_SEG_1ST_SHIFT)
00137 #define LCD_MAP_CHAR_COM0_SEG_2ND_POS   (1 << LCD_MAP_CHAR_COM0_SEG_2ND_SHIFT)
00138 #define LCD_MAP_CHAR_COM0_SEG_3RD_POS   (1 << LCD_MAP_CHAR_COM0_SEG_3RD_SHIFT)
00139 #define LCD_MAP_CHAR_COM0_SEG_4TH_POS   (1 << LCD_MAP_CHAR_COM0_SEG_4TH_SHIFT)
00140 #define LCD_MAP_CHAR_COM1_SEG_1ST_POS   (1 << LCD_MAP_CHAR_COM1_SEG_1ST_SHIFT)
00141 #define LCD_MAP_CHAR_COM1_SEG_2ND_POS   (1 << LCD_MAP_CHAR_COM1_SEG_2ND_SHIFT)
00142 #define LCD_MAP_CHAR_COM1_SEG_3RD_POS   (1 << LCD_MAP_CHAR_COM1_SEG_3RD_SHIFT)
00143 #define LCD_MAP_CHAR_COM1_SEG_4TH_POS   (1 << LCD_MAP_CHAR_COM1_SEG_4TH_SHIFT)
00144 #define LCD_MAP_CHAR_COM2_SEG_1ST_POS   (1 << LCD_MAP_CHAR_COM2_SEG_1ST_SHIFT)
00145 #define LCD_MAP_CHAR_COM2_SEG_2ND_POS   (1 << LCD_MAP_CHAR_COM2_SEG_2ND_SHIFT)
00146 #define LCD_MAP_CHAR_COM2_SEG_3RD_POS   (1 << LCD_MAP_CHAR_COM2_SEG_3RD_SHIFT)
00147 #define LCD_MAP_CHAR_COM2_SEG_4TH_POS   (1 << LCD_MAP_CHAR_COM2_SEG_4TH_SHIFT)
00148 #define LCD_MAP_CHAR_COM3_SEG_1ST_POS   (1 << LCD_MAP_CHAR_COM3_SEG_1ST_SHIFT)
00149 #define LCD_MAP_CHAR_COM3_SEG_2ND_POS   (1 << LCD_MAP_CHAR_COM3_SEG_2ND_SHIFT)
00150 #define LCD_MAP_CHAR_COM3_SEG_3RD_POS   (1 << LCD_MAP_CHAR_COM3_SEG_3RD_SHIFT)
00151 #define LCD_MAP_CHAR_COM3_SEG_4TH_POS   (1 << LCD_MAP_CHAR_COM3_SEG_4TH_SHIFT)
00152 #define LCD_MAP_CHAR_COM0_SEG_1ST_SHIFT 0x00000000
00153 #define LCD_MAP_CHAR_COM0_SEG_2ND_SHIFT 0x00000001
00154 #define LCD_MAP_CHAR_COM0_SEG_3RD_SHIFT 0x00000002
00155 #define LCD_MAP_CHAR_COM0_SEG_4TH_SHIFT 0x00000003
00156 #define LCD_MAP_CHAR_COM1_SEG_1ST_SHIFT 0x00000004
00157 #define LCD_MAP_CHAR_COM1_SEG_2ND_SHIFT 0x00000005
00158 #define LCD_MAP_CHAR_COM1_SEG_3RD_SHIFT 0x00000006
00159 #define LCD_MAP_CHAR_COM1_SEG_4TH_SHIFT 0x00000007
00160 #define LCD_MAP_CHAR_COM2_SEG_1ST_SHIFT 0x00000008
00161 #define LCD_MAP_CHAR_COM2_SEG_2ND_SHIFT 0x00000009
00162 #define LCD_MAP_CHAR_COM2_SEG_3RD_SHIFT 0x00000010
00163 #define LCD_MAP_CHAR_COM2_SEG_4TH_SHIFT 0x00000011
00164 #define LCD_MAP_CHAR_COM3_SEG_1ST_SHIFT 0x00000012
00165 #define LCD_MAP_CHAR_COM3_SEG_2ND_SHIFT 0x00000013
00166 #define LCD_MAP_CHAR_COM3_SEG_3RD_SHIFT 0x00000014
00167 #define LCD_MAP_CHAR_COM3_SEG_4TH_SHIFT 0x00000015
00168 
00169 /**
00170   * @brief LCD Digit defines
00171   */
00172 #define LCD_DIGIT1_COM0               LCD_COM0
00173 #define LCD_DIGIT1_COM0_SEG_MASK      ~(LCD_SEG0 | LCD_SEG1 | LCD_SEG22 | LCD_SEG23)
00174 #define LCD_DIGIT1_COM1               LCD_COM1
00175 #define LCD_DIGIT1_COM1_SEG_MASK      ~(LCD_SEG0 | LCD_SEG1 | LCD_SEG22 | LCD_SEG23)
00176 #define LCD_DIGIT1_COM2               LCD_COM2
00177 #define LCD_DIGIT1_COM2_SEG_MASK      ~(LCD_SEG0 | LCD_SEG1 | LCD_SEG22 | LCD_SEG23)
00178 #define LCD_DIGIT1_COM3               LCD_COM3
00179 #define LCD_DIGIT1_COM3_SEG_MASK      ~(LCD_SEG0 | LCD_SEG1 | LCD_SEG22 | LCD_SEG23)
00180 
00181 #define LCD_DIGIT2_COM0               LCD_COM0
00182 #define LCD_DIGIT2_COM0_SEG_MASK      ~(LCD_SEG2 | LCD_SEG3 | LCD_SEG20 | LCD_SEG21)
00183 #define LCD_DIGIT2_COM1               LCD_COM1
00184 #define LCD_DIGIT2_COM1_SEG_MASK      ~(LCD_SEG2 | LCD_SEG3 | LCD_SEG20 | LCD_SEG21)
00185 #define LCD_DIGIT2_COM2               LCD_COM2
00186 #define LCD_DIGIT2_COM2_SEG_MASK      ~(LCD_SEG2 | LCD_SEG3 | LCD_SEG20 | LCD_SEG21)
00187 #define LCD_DIGIT2_COM3               LCD_COM3
00188 #define LCD_DIGIT2_COM3_SEG_MASK      ~(LCD_SEG2 | LCD_SEG3 | LCD_SEG20 | LCD_SEG21)
00189 
00190 #define LCD_DIGIT3_COM0               LCD_COM0
00191 #define LCD_DIGIT3_COM0_SEG_MASK      ~(LCD_SEG4 | LCD_SEG5 | LCD_SEG18 | LCD_SEG19)
00192 #define LCD_DIGIT3_COM1               LCD_COM1
00193 #define LCD_DIGIT3_COM1_SEG_MASK      ~(LCD_SEG4 | LCD_SEG5 | LCD_SEG18 | LCD_SEG19)
00194 #define LCD_DIGIT3_COM2               LCD_COM2
00195 #define LCD_DIGIT3_COM2_SEG_MASK      ~(LCD_SEG4 | LCD_SEG5 | LCD_SEG18 | LCD_SEG19)
00196 #define LCD_DIGIT3_COM3               LCD_COM3
00197 #define LCD_DIGIT3_COM3_SEG_MASK      ~(LCD_SEG4 | LCD_SEG5 | LCD_SEG18 | LCD_SEG19)
00198 
00199 #define LCD_DIGIT4_COM0               LCD_COM0
00200 #define LCD_DIGIT4_COM0_SEG_MASK      ~(LCD_SEG6 | LCD_SEG17)
00201 #define LCD_DIGIT4_COM0_1             LCD_COM0_1
00202 #define LCD_DIGIT4_COM0_1_SEG_MASK    ~(LCD_SEG7 | LCD_SEG16)
00203 #define LCD_DIGIT4_COM1               LCD_COM1
00204 #define LCD_DIGIT4_COM1_SEG_MASK      ~(LCD_SEG6 |  LCD_SEG17)
00205 #define LCD_DIGIT4_COM1_1             LCD_COM1_1
00206 #define LCD_DIGIT4_COM1_1_SEG_MASK    ~(LCD_SEG7 | LCD_SEG16)
00207 #define LCD_DIGIT4_COM2               LCD_COM2
00208 #define LCD_DIGIT4_COM2_SEG_MASK      ~(LCD_SEG6 | LCD_SEG17)
00209 #define LCD_DIGIT4_COM2_1             LCD_COM2_1
00210 #define LCD_DIGIT4_COM2_1_SEG_MASK    ~(LCD_SEG7 | LCD_SEG16)
00211 #define LCD_DIGIT4_COM3               LCD_COM3
00212 #define LCD_DIGIT4_COM3_SEG_MASK      ~(LCD_SEG6 | LCD_SEG17)
00213 #define LCD_DIGIT4_COM3_1             LCD_COM3_1
00214 #define LCD_DIGIT4_COM3_1_SEG_MASK    ~(LCD_SEG7 | LCD_SEG16)
00215 
00216 #define LCD_DIGIT5_COM0               LCD_COM0
00217 #define LCD_DIGIT5_COM0_SEG_MASK      ~(LCD_SEG9 | LCD_SEG14)
00218 #define LCD_DIGIT5_COM0_1             LCD_COM0_1
00219 #define LCD_DIGIT5_COM0_1_SEG_MASK    ~(LCD_SEG8 | LCD_SEG15)
00220 #define LCD_DIGIT5_COM1               LCD_COM1
00221 #define LCD_DIGIT5_COM1_SEG_MASK      ~(LCD_SEG9 | LCD_SEG14)
00222 #define LCD_DIGIT5_COM1_1             LCD_COM1_1
00223 #define LCD_DIGIT5_COM1_1_SEG_MASK    ~(LCD_SEG8 | LCD_SEG15)
00224 #define LCD_DIGIT5_COM2               LCD_COM2
00225 #define LCD_DIGIT5_COM2_SEG_MASK      ~(LCD_SEG9 | LCD_SEG14)
00226 #define LCD_DIGIT5_COM2_1             LCD_COM2_1
00227 #define LCD_DIGIT5_COM2_1_SEG_MASK    ~(LCD_SEG8 | LCD_SEG15)
00228 #define LCD_DIGIT5_COM3               LCD_COM3
00229 #define LCD_DIGIT5_COM3_SEG_MASK      ~(LCD_SEG9 | LCD_SEG14)
00230 #define LCD_DIGIT5_COM3_1             LCD_COM3_1
00231 #define LCD_DIGIT5_COM3_1_SEG_MASK    ~(LCD_SEG8 | LCD_SEG15)
00232 
00233 #define LCD_DIGIT6_COM0               LCD_COM0
00234 #define LCD_DIGIT6_COM0_SEG_MASK      ~(LCD_SEG10 | LCD_SEG11 | LCD_SEG12 | LCD_SEG13)
00235 #define LCD_DIGIT6_COM1               LCD_COM1
00236 #define LCD_DIGIT6_COM1_SEG_MASK      ~(LCD_SEG10 | LCD_SEG11 | LCD_SEG12 | LCD_SEG13)
00237 #define LCD_DIGIT6_COM2               LCD_COM2
00238 #define LCD_DIGIT6_COM2_SEG_MASK      ~(LCD_SEG10 | LCD_SEG11 | LCD_SEG12 | LCD_SEG13)
00239 #define LCD_DIGIT6_COM3               LCD_COM3
00240 #define LCD_DIGIT6_COM3_SEG_MASK      ~(LCD_SEG10 | LCD_SEG11 | LCD_SEG12 | LCD_SEG13)
00241 
00242 /**
00243   * @brief LCD Bar location
00244   */
00245 #define LCD_BAR0_2_COM            LCD_COM3
00246 #define LCD_BAR1_3_COM            LCD_COM2
00247 #define LCD_BAR0_SEG              LCD_SEG11
00248 #define LCD_BAR1_SEG              LCD_SEG11
00249 #define LCD_BAR2_SEG              LCD_SEG9
00250 #define LCD_BAR3_SEG              LCD_SEG9
00251 #define LCD_BAR0_2_SEG_MASK       ~(LCD_BAR0_SEG | LCD_BAR2_SEG)
00252 #define LCD_BAR1_3_SEG_MASK       ~(LCD_BAR1_SEG | LCD_BAR3_SEG)
00253 
00254 /**
00255   * @brief LCD segments & coms redefinition.
00256   * LCD component segments & coms are not necessarily link to MCU segmnents & coms output.
00257   */
00258 #define LCD_COM0          MCU_LCD_COM0
00259 #define LCD_COM0_1        MCU_LCD_COM0
00260 #define LCD_COM1          MCU_LCD_COM1
00261 #define LCD_COM1_1        MCU_LCD_COM1
00262 #define LCD_COM2          MCU_LCD_COM2
00263 #define LCD_COM2_1        MCU_LCD_COM2
00264 #define LCD_COM3          MCU_LCD_COM3
00265 #define LCD_COM3_1        MCU_LCD_COM3
00266 #define LCD_SEG0          MCU_LCD_SEG0
00267 #define LCD_SEG1          MCU_LCD_SEG1
00268 #define LCD_SEG2          MCU_LCD_SEG2
00269 #define LCD_SEG3          MCU_LCD_SEG7
00270 #define LCD_SEG4          MCU_LCD_SEG8
00271 #define LCD_SEG5          MCU_LCD_SEG9
00272 #define LCD_SEG6          MCU_LCD_SEG10
00273 #define LCD_SEG7          MCU_LCD_SEG11
00274 #define LCD_SEG8          MCU_LCD_SEG12
00275 #define LCD_SEG9          MCU_LCD_SEG13
00276 #define LCD_SEG10         MCU_LCD_SEG14
00277 #define LCD_SEG11         MCU_LCD_SEG15
00278 #define LCD_SEG12         MCU_LCD_SEG17
00279 #define LCD_SEG13         MCU_LCD_SEG16
00280 #define LCD_SEG14         MCU_LCD_SEG18
00281 #define LCD_SEG15         MCU_LCD_SEG19
00282 #define LCD_SEG16         MCU_LCD_SEG20
00283 #define LCD_SEG17         MCU_LCD_SEG21
00284 #define LCD_SEG18         MCU_LCD_SEG24
00285 #define LCD_SEG19         MCU_LCD_SEG25
00286 #define LCD_SEG20         MCU_LCD_SEG26
00287 #define LCD_SEG21         MCU_LCD_SEG27
00288 #define LCD_SEG22         MCU_LCD_SEG28
00289 #define LCD_SEG23         MCU_LCD_SEG29
00290 #define LCD_SEG0_SHIFT          MCU_LCD_SEG0_SHIFT
00291 #define LCD_SEG1_SHIFT          MCU_LCD_SEG1_SHIFT
00292 #define LCD_SEG2_SHIFT          MCU_LCD_SEG2_SHIFT
00293 #define LCD_SEG3_SHIFT          MCU_LCD_SEG7_SHIFT
00294 #define LCD_SEG4_SHIFT          MCU_LCD_SEG8_SHIFT
00295 #define LCD_SEG5_SHIFT          MCU_LCD_SEG9_SHIFT
00296 #define LCD_SEG6_SHIFT          MCU_LCD_SEG10_SHIFT
00297 #define LCD_SEG7_SHIFT          MCU_LCD_SEG11_SHIFT
00298 #define LCD_SEG8_SHIFT          MCU_LCD_SEG12_SHIFT
00299 #define LCD_SEG9_SHIFT          MCU_LCD_SEG13_SHIFT
00300 #define LCD_SEG10_SHIFT         MCU_LCD_SEG14_SHIFT
00301 #define LCD_SEG11_SHIFT         MCU_LCD_SEG15_SHIFT
00302 #define LCD_SEG12_SHIFT         MCU_LCD_SEG17_SHIFT
00303 #define LCD_SEG13_SHIFT         MCU_LCD_SEG16_SHIFT
00304 #define LCD_SEG14_SHIFT         MCU_LCD_SEG18_SHIFT
00305 #define LCD_SEG15_SHIFT         MCU_LCD_SEG19_SHIFT
00306 #define LCD_SEG16_SHIFT         MCU_LCD_SEG20_SHIFT
00307 #define LCD_SEG17_SHIFT         MCU_LCD_SEG21_SHIFT
00308 #define LCD_SEG18_SHIFT         MCU_LCD_SEG24_SHIFT
00309 #define LCD_SEG19_SHIFT         MCU_LCD_SEG25_SHIFT
00310 #define LCD_SEG20_SHIFT         MCU_LCD_SEG26_SHIFT
00311 #define LCD_SEG21_SHIFT         MCU_LCD_SEG27_SHIFT
00312 #define LCD_SEG22_SHIFT         MCU_LCD_SEG28_SHIFT
00313 #define LCD_SEG23_SHIFT         MCU_LCD_SEG29_SHIFT
00314 
00315 /**
00316   * @brief STM32 LCD segments & coms definitions.
00317   */
00318 #define MCU_LCD_COM0          LCD_RAM_REGISTER0
00319 #define MCU_LCD_COM0_1        LCD_RAM_REGISTER1
00320 #define MCU_LCD_COM1          LCD_RAM_REGISTER2
00321 #define MCU_LCD_COM1_1        LCD_RAM_REGISTER3
00322 #define MCU_LCD_COM2          LCD_RAM_REGISTER4
00323 #define MCU_LCD_COM2_1        LCD_RAM_REGISTER5
00324 #define MCU_LCD_COM3          LCD_RAM_REGISTER6
00325 #define MCU_LCD_COM3_1        LCD_RAM_REGISTER7
00326 #define MCU_LCD_COM4          LCD_RAM_REGISTER8
00327 #define MCU_LCD_COM4_1        LCD_RAM_REGISTER9
00328 #define MCU_LCD_COM5          LCD_RAM_REGISTER10
00329 #define MCU_LCD_COM5_1        LCD_RAM_REGISTER11
00330 #define MCU_LCD_COM6          LCD_RAM_REGISTER12
00331 #define MCU_LCD_COM6_1        LCD_RAM_REGISTER13
00332 #define MCU_LCD_COM7          LCD_RAM_REGISTER14
00333 #define MCU_LCD_COM7_1        LCD_RAM_REGISTER15
00334 #define MCU_LCD_SEG0          (0x00000001 << MCU_LCD_SEG0_SHIFT)
00335 #define MCU_LCD_SEG1          (0x00000001 << MCU_LCD_SEG1_SHIFT)
00336 #define MCU_LCD_SEG2          (0x00000001 << MCU_LCD_SEG2_SHIFT)
00337 #define MCU_LCD_SEG3          (0x00000001 << MCU_LCD_SEG3_SHIFT)
00338 #define MCU_LCD_SEG4          (0x00000001 << MCU_LCD_SEG4_SHIFT)
00339 #define MCU_LCD_SEG5          (0x00000001 << MCU_LCD_SEG5_SHIFT)
00340 #define MCU_LCD_SEG6          (0x00000001 << MCU_LCD_SEG6_SHIFT)
00341 #define MCU_LCD_SEG7          (0x00000001 << MCU_LCD_SEG7_SHIFT)
00342 #define MCU_LCD_SEG8          (0x00000001 << MCU_LCD_SEG8_SHIFT)
00343 #define MCU_LCD_SEG9          (0x00000001 << MCU_LCD_SEG9_SHIFT)
00344 #define MCU_LCD_SEG10         (0x00000001 << MCU_LCD_SEG10_SHIFT)
00345 #define MCU_LCD_SEG11         (0x00000001 << MCU_LCD_SEG11_SHIFT)
00346 #define MCU_LCD_SEG12         (0x00000001 << MCU_LCD_SEG12_SHIFT)
00347 #define MCU_LCD_SEG13         (0x00000001 << MCU_LCD_SEG13_SHIFT)
00348 #define MCU_LCD_SEG14         (0x00000001 << MCU_LCD_SEG14_SHIFT)
00349 #define MCU_LCD_SEG15         (0x00000001 << MCU_LCD_SEG15_SHIFT)
00350 #define MCU_LCD_SEG16         (0x00000001 << MCU_LCD_SEG16_SHIFT)
00351 #define MCU_LCD_SEG17         (0x00000001 << MCU_LCD_SEG17_SHIFT)
00352 #define MCU_LCD_SEG18         (0x00000001 << MCU_LCD_SEG18_SHIFT)
00353 #define MCU_LCD_SEG19         (0x00000001 << MCU_LCD_SEG19_SHIFT)
00354 #define MCU_LCD_SEG20         (0x00000001 << MCU_LCD_SEG20_SHIFT)
00355 #define MCU_LCD_SEG21         (0x00000001 << MCU_LCD_SEG21_SHIFT)
00356 #define MCU_LCD_SEG22         (0x00000001 << MCU_LCD_SEG22_SHIFT)
00357 #define MCU_LCD_SEG23         (0x00000001 << MCU_LCD_SEG23_SHIFT)
00358 #define MCU_LCD_SEG24         (0x00000001 << MCU_LCD_SEG24_SHIFT)
00359 #define MCU_LCD_SEG25         (0x00000001 << MCU_LCD_SEG25_SHIFT)
00360 #define MCU_LCD_SEG26         (0x00000001 << MCU_LCD_SEG26_SHIFT)
00361 #define MCU_LCD_SEG27         (0x00000001 << MCU_LCD_SEG27_SHIFT)
00362 #define MCU_LCD_SEG28         (0x00000001 << MCU_LCD_SEG28_SHIFT)
00363 #define MCU_LCD_SEG29         (0x00000001 << MCU_LCD_SEG29_SHIFT)
00364 #define MCU_LCD_SEG30         (0x00000001 << MCU_LCD_SEG30_SHIFT)
00365 #define MCU_LCD_SEG31         (0x00000001 << MCU_LCD_SEG31_SHIFT)
00366 #define MCU_LCD_SEG32         (0x00000001 << MCU_LCD_SEG32_SHIFT)
00367 #define MCU_LCD_SEG33         (0x00000001 << MCU_LCD_SEG33_SHIFT)
00368 #define MCU_LCD_SEG34         (0x00000001 << MCU_LCD_SEG34_SHIFT)
00369 #define MCU_LCD_SEG35         (0x00000001 << MCU_LCD_SEG35_SHIFT)
00370 #define MCU_LCD_SEG36         (0x00000001 << MCU_LCD_SEG36_SHIFT)
00371 #define MCU_LCD_SEG37         (0x00000001 << MCU_LCD_SEG37_SHIFT)
00372 #define MCU_LCD_SEG38         (0x00000001 << MCU_LCD_SEG38_SHIFT)
00373 #define MCU_LCD_SEG0_SHIFT    0
00374 #define MCU_LCD_SEG1_SHIFT    1
00375 #define MCU_LCD_SEG2_SHIFT    2
00376 #define MCU_LCD_SEG3_SHIFT    3
00377 #define MCU_LCD_SEG4_SHIFT    4
00378 #define MCU_LCD_SEG5_SHIFT    5
00379 #define MCU_LCD_SEG6_SHIFT    6
00380 #define MCU_LCD_SEG7_SHIFT    7
00381 #define MCU_LCD_SEG8_SHIFT    8
00382 #define MCU_LCD_SEG9_SHIFT    9
00383 #define MCU_LCD_SEG10_SHIFT   10
00384 #define MCU_LCD_SEG11_SHIFT   11
00385 #define MCU_LCD_SEG12_SHIFT   12
00386 #define MCU_LCD_SEG13_SHIFT   13
00387 #define MCU_LCD_SEG14_SHIFT   14
00388 #define MCU_LCD_SEG15_SHIFT   15
00389 #define MCU_LCD_SEG16_SHIFT   16
00390 #define MCU_LCD_SEG17_SHIFT   17
00391 #define MCU_LCD_SEG18_SHIFT   18
00392 #define MCU_LCD_SEG19_SHIFT   19
00393 #define MCU_LCD_SEG20_SHIFT   20
00394 #define MCU_LCD_SEG21_SHIFT   21
00395 #define MCU_LCD_SEG22_SHIFT   22
00396 #define MCU_LCD_SEG23_SHIFT   23
00397 #define MCU_LCD_SEG24_SHIFT   24
00398 #define MCU_LCD_SEG25_SHIFT   25
00399 #define MCU_LCD_SEG26_SHIFT   26
00400 #define MCU_LCD_SEG27_SHIFT   27
00401 #define MCU_LCD_SEG28_SHIFT   28
00402 #define MCU_LCD_SEG29_SHIFT   29
00403 #define MCU_LCD_SEG30_SHIFT   30
00404 #define MCU_LCD_SEG31_SHIFT   31
00405 #define MCU_LCD_SEG32_SHIFT   0
00406 #define MCU_LCD_SEG33_SHIFT   1
00407 #define MCU_LCD_SEG34_SHIFT   2
00408 #define MCU_LCD_SEG35_SHIFT   3
00409 #define MCU_LCD_SEG36_SHIFT   4
00410 #define MCU_LCD_SEG37_SHIFT   5
00411 #define MCU_LCD_SEG38_SHIFT   6
00412 #define MCU_LCD_SEG39_SHIFT   7
00413 #define MCU_LCD_SEG40_SHIFT   8
00414 #define MCU_LCD_SEG41_SHIFT   9
00415 #define MCU_LCD_SEG42_SHIFT   10
00416 #define MCU_LCD_SEG43_SHIFT   11
00417 
00418 /**
00419   * @brief LCD Pins definition.
00420   */
00421 #define LCD_GPIO_BANKA_PINS  (GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_8 | GPIO_PIN_9 |\
00422                              GPIO_PIN_10 |GPIO_PIN_15)
00423 #define LCD_GPIO_BANKB_PINS  (GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_8 | GPIO_PIN_9 | \
00424                              GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\
00425                              GPIO_PIN_15)
00426 #define LCD_GPIO_BANKC_PINS  (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_6 | \
00427                              GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 |GPIO_PIN_11)
00428 
00429 /* Define for scrolling sentences*/
00430 #define SCROLL_SPEED_HIGH     125
00431 #define SCROLL_SPEED_MEDIUM   250
00432 #define SCROLL_SPEED_LOW      500
00433 
00434 #define DOT                   ((uint16_t) 0x8000 ) /* for add decimal point in string */
00435 #define DOUBLE_DOT            ((uint16_t) 0x4000) /* for add decimal point in string */
00436 
00437 /* code for '(' character */
00438 #define C_OPENPARMAP          ((uint16_t) 0x0028)
00439 
00440 /* code for ')' character */
00441 #define C_CLOSEPARMAP         ((uint16_t) 0x0011)
00442 
00443 /* code for 'm' character */
00444 #define C_MMAP                ((uint16_t) 0xb210)
00445 
00446 /* code for 'n' character */
00447 #define C_NMAP                ((uint16_t) 0x2210)
00448 
00449 /* code for '�' character */
00450 #define C_UMAP                ((uint16_t) 0x6084)
00451 
00452 /* constant code for '*' character */
00453 #define C_STAR                ((uint16_t) 0xA0DD)
00454 
00455 /* constant code for '-' character */
00456 #define C_MINUS               ((uint16_t) 0xA000)
00457 
00458 /* constant code for '/' */
00459 #define C_SLATCH              ((uint16_t) 0x00c0)
00460 
00461 /* constant code for � */
00462 #define C_PERCENT_1           ((uint16_t) 0xec00)
00463 
00464 /* constant code for small o */
00465 #define C_PERCENT_2           ((uint16_t) 0xb300)
00466 
00467 #define C_FULL                ((uint16_t) 0xffdd)
00468 
00469 /**
00470   * @}
00471   */   
00472 
00473 /** @addtogroup STM32L152C-Discovery_LCD_Exported_Functions
00474   * @{
00475   */
00476 void BSP_LCD_GLASS_Init(void);
00477 void BSP_LCD_GLASS_DeInit(void);
00478 void BSP_LCD_GLASS_BlinkConfig(uint32_t BlinkMode, uint32_t BlinkFrequency);
00479 void BSP_LCD_GLASS_Contrast(uint32_t Contrast);
00480 void BSP_LCD_GLASS_DisplayChar(uint8_t* ch, Point_Typedef Point, DoublePoint_Typedef Column, DigitPosition_Typedef Position);
00481 void BSP_LCD_GLASS_DisplayString(uint8_t* ptr);
00482 void BSP_LCD_GLASS_WriteChar(uint8_t* ch, uint8_t Point, uint8_t Column, uint8_t Position);
00483 void BSP_LCD_GLASS_DisplayStrDeci(uint16_t* ptr);
00484 void BSP_LCD_GLASS_ScrollSentence(uint8_t* ptr, uint16_t nScroll, uint16_t ScrollSpeed);
00485 void BSP_LCD_GLASS_DisplayBar(uint32_t BarId);
00486 void BSP_LCD_GLASS_ClearBar(uint32_t BarId);
00487 void BSP_LCD_GLASS_BarLevelConfig(uint8_t BarLevel);
00488 void BSP_LCD_GLASS_Clear(void);
00489 /**
00490   * @}
00491   */
00492 
00493 /**
00494   * @}
00495   */   
00496 
00497 #ifdef __cplusplus
00498 }
00499 #endif
00500 
00501 #endif /* __STM32L152C-Discovery_GLASS_LCD_H */
00502 
00503 /**
00504   * @}
00505   */   
00506 
00507 /**
00508   * @}
00509   */   
00510 
00511 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Aug 24 2017 17:55:24 for STM32L152C-Discovery BSP User Manual by   doxygen 1.7.6.1