2 ******************************************************************************
\r
3 * @file stm32l_discovery_lcd.h
\r
4 * @author Microcontroller Division
\r
7 * @brief This file contains all the functions prototypes for the glass LCD
\r
9 ******************************************************************************
\r
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
\r
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
\r
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
\r
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
\r
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
\r
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
\r
19 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
\r
22 /* Define to prevent recursive inclusion -------------------------------------*/
\r
23 #ifndef __stm32l_discovery_lcd
\r
24 #define __stm32l_discovery_lcd
\r
26 /* Includes ------------------------------------------------------------------*/
\r
27 #include "stm32l1xx.h"
\r
28 #include "discover_board.h"
\r
30 /* Define for scrolling sentences*/
\r
31 #define SCROLL_SPEED 75
\r
32 #define SCROLL_SPEED_L 600
\r
33 #define SCROLL_NUM 1
\r
35 /* Define for character '.' */
\r
36 #define POINT_OFF FALSE
\r
37 #define POINT_ON TRUE
\r
39 /* Define for caracter ":" */
\r
40 #define COLUMN_OFF FALSE
\r
41 #define COLUMN_ON TRUE
\r
43 #define DOT 0x8000 /* for add decimal point in string */
\r
44 #define DOUBLE_DOT 0x4000 /* for add decimal point in string */
\r
47 /* =========================================================================
\r
49 =========================================================================
\r
62 An LCD character coding is based on the following matrix:
\r
68 The character 'A' for example is:
\r
69 -------------------------------
\r
70 LSB { 1 , 0 , 0 , 0 }
\r
73 MSB { 1 , 1 , 0 , 0 }
\r
78 /* Macros used for set/reset bar LCD bar */
\r
79 #define BAR0_ON t_bar[1] |= 8
\r
80 #define BAR0_OFF t_bar[1] &= ~8
\r
81 #define BAR1_ON t_bar[0] |= 8
\r
82 #define BAR1_OFF t_bar[0] &= ~8
\r
83 #define BAR2_ON t_bar[1] |= 2
\r
84 #define BAR2_OFF t_bar[1] &= ~2
\r
85 #define BAR3_ON t_bar[0] |= 2
\r
86 #define BAR3_OFF t_bar[0] &= ~2
\r
88 /* code for 'µ' character */
\r
89 #define C_UMAP 0x6084
\r
91 /* code for 'm' character */
\r
92 #define C_mMap 0xb210
\r
94 /* code for 'n' character */
\r
95 #define C_nMap 0x2210
\r
97 /* constant code for '*' character */
\r
100 /* constant code for '-' character */
\r
101 #define C_minus 0xA000
\r
103 /* constant code for '/' */
\r
104 #define C_slatch 0x00c0
\r
106 /* constant code for ° */
\r
107 #define C_percent_1 0xec00
\r
109 /* constant code for small o */
\r
110 #define C_percent_2 0xb300
\r
112 #define C_full 0xffdd
\r
114 void LCD_bar(void);
\r
115 void LCD_GLASS_Init(void);
\r
116 void LCD_GLASS_WriteChar(uint8_t* ch, bool point, bool column,uint8_t position);
\r
117 void LCD_GLASS_DisplayString(uint8_t* ptr);
\r
118 void LCD_GLASS_DisplayStrDeci(uint16_t* ptr);
\r
119 void LCD_GLASS_ClearChar(uint8_t position);
\r
120 void LCD_GLASS_Clear(void);
\r
121 void LCD_GLASS_ScrollSentence(uint8_t* ptr, uint16_t nScroll, uint16_t ScrollSpeed);
\r
122 void LCD_GLASS_WriteTime(char a, uint8_t posi, bool column);
\r
123 void LCD_GLASS_Configure_GPIO(void);
\r
125 #endif /* stm32l_discovery_lcd*/
\r
127 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
\r