OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [drivers/] [ST/] [STM32F10xFWLib/] [inc/] [lcd.h] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 608 jeremybenn
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
2
* File Name          : lcd.h
3
* Author             : MCD Application Team
4
* Date First Issued  : mm/dd/yyyy
5
* Description        : This file contains all the functions prototypes for the
6
*                      lcd software driver.
7
********************************************************************************
8
* History:
9
* mm/dd/yyyy
10
********************************************************************************
11
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
13
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
14
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
15
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
16
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17
*******************************************************************************/
18
 
19
/* Define to prevent recursive inclusion -------------------------------------*/
20
#ifndef __LCD_H
21
#define __LCD_H
22
 
23
/* Includes ------------------------------------------------------------------*/
24
#include "stm32f10x_lib.h"
25
 
26
/* Exported types ------------------------------------------------------------*/
27
/* Exported constants --------------------------------------------------------*/
28
/* LCD Registers */
29
#define R0             0x00
30
#define R1             0x01
31
#define R2             0x02
32
#define R3             0x03
33
#define R5             0x05
34
#define R6             0x06
35
#define R13            0x0D
36
#define R14            0x0E
37
#define R15            0x0F
38
#define R16            0x10
39
#define R17            0x11
40
#define R18            0x12
41
#define R19            0x13
42
#define R20            0x14
43
#define R21            0x15
44
#define R22            0x16
45
#define R23            0x17
46
#define R24            0x18
47
#define R25            0x19
48
#define R26            0x1A
49
#define R27            0x1B
50
#define R28            0x1C
51
#define R29            0x1D
52
#define R30            0x1E
53
#define R31            0x1F
54
#define R32            0x20
55
#define R36            0x24
56
#define R37            0x25
57
#define R40            0x28
58
#define R43            0x2B
59
#define R45            0x2D
60
#define R49            0x31
61
#define R50            0x32
62
#define R51            0x33
63
#define R52            0x34
64
#define R53            0x35
65
#define R55            0x37
66
#define R59            0x3B
67
#define R60            0x3C
68
#define R61            0x3D
69
#define R62            0x3E
70
#define R63            0x3F
71
#define R64            0x40
72
#define R65            0x41
73
#define R66            0x42
74
#define R67            0x43
75
#define R68            0x44
76
#define R69            0x45
77
#define R70            0x46
78
#define R71            0x47
79
#define R72            0x48
80
#define R73            0x49
81
#define R74            0x4A
82
#define R75            0x4B
83
#define R76            0x4C
84
#define R77            0x4D
85
#define R78            0x4E
86
#define R79            0x4F
87
#define R80            0x50
88
#define R118           0x76
89
#define R134           0x86
90
#define R135           0x87
91
#define R136           0x88
92
#define R137           0x89
93
#define R139           0x8B
94
#define R140           0x8C
95
#define R141           0x8D
96
#define R143           0x8F
97
#define R144           0x90
98
#define R145           0x91
99
#define R146           0x92
100
#define R147           0x93
101
#define R148           0x94
102
#define R149           0x95
103
#define R150           0x96
104
#define R151           0x97
105
#define R152           0x98
106
#define R153           0x99
107
#define R154           0x9A
108
#define R157           0x9D
109
#define R192           0xC0
110
#define R193           0xC1
111
 
112
/* LCD Control pins */
113
#define CtrlPin_NCS    GPIO_Pin_2   /* PB.02 */
114
#define CtrlPin_RS     GPIO_Pin_7   /* PD.07 */
115
#define CtrlPin_NWR    GPIO_Pin_15  /* PD.15 */
116
 
117
/* LCD color */
118
#define White          0xFFFF
119
#define Black          0x0000
120
#define Blue           0x001F
121
#define Orange         0x051F
122
#define Red            0xF800
123
#define Magenta        0xF81F
124
#define Green          0x07E0
125
#define Cyan           0x7FFF
126
#define Yellow         0xFFE0
127
 
128
#define Line0          0
129
#define Line1          24
130
#define Line2          48
131
#define Line3          72
132
#define Line4          96
133
#define Line5          120
134
#define Line6          144
135
#define Line7          168
136
#define Line8          192
137
#define Line9          216
138
 
139
#define Horizontal     0x00
140
#define Vertical       0x01
141
 
142
/* Exported macro ------------------------------------------------------------*/
143
/* Exported functions ------------------------------------------------------- */
144
/*----- High layer function -----*/
145
void LCD_Init(void);
146
void LCD_SetTextColor(vu16 Color);
147
void LCD_SetBackColor(vu16 Color);
148
void LCD_ClearLine(u8 Line);
149
void LCD_Clear(void);
150
void LCD_SetCursor(u8 Xpos, u16 Ypos);
151
void LCD_DrawChar(u8 Xpos, u16 Ypos, uc16 *c);
152
void LCD_DisplayChar(u8 Line, u16 Column, u8 Ascii);
153
void LCD_DisplayStringLine(u8 Line, u8 *ptr);
154
void LCD_DisplayString(u8 Line, u8 *ptr);
155
void LCD_ScrollText(u8 Line, u8 *ptr);
156
void LCD_SetDisplayWindow(u8 Xpos, u16 Ypos, u8 Height, u16 Width);
157
void LCD_DrawLine(u8 Xpos, u16 Ypos, u16 Length, u8 Direction);
158
void LCD_DrawRect(u8 Xpos, u16 Ypos, u8 Height, u16 Width);
159
void LCD_DrawCircle(u8 Xpos, u16 Ypos, u16 Radius);
160
void LCD_DrawMonoPict(uc32 *Pict);
161
void LCD_DrawBMP(u32 BmpAddress);
162
 
163
/*----- Medium layer function -----*/
164
void LCD_WriteReg(u8 LCD_Reg, u8 LCD_RegValue);
165
u8 LCD_ReadReg(u8 LCD_Reg);
166
void LCD_WriteRAM(u16 RGB_Code);
167
u16  LCD_ReadRAM(void);
168
void LCD_PowerOn(void);
169
void LCD_DisplayOn(void);
170
void LCD_DisplayOff(void);
171
 
172
/*----- Low layer function -----*/
173
void LCD_CtrlLinesConfig(void);
174
void LCD_CtrlLinesWrite(GPIO_TypeDef* GPIOx, u16 CtrlPins, BitAction BitVal);
175
void LCD_SPIConfig(void);
176
 
177
#endif /* __LCD_H */
178
 
179
/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.