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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM7_STR75x_GCC/] [STLibrary/] [inc/] [lcd.h] - Blame information for rev 577

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 577 jeremybenn
/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
2
* File Name          : lcd.h
3
* Author             : MCD Application Team
4
* Date First Issued  : 03/10/2006
5
* Description        : This file contains all the functions prototypes for the
6
*                      lcd software driver.
7
********************************************************************************
8
* History:
9
* 07/17/2006 : V1.0
10
* 03/10/2006 : V0.1
11
********************************************************************************
12
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
14
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
15
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
16
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
17
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18
*******************************************************************************/
19
 
20
/* Define to prevent recursive inclusion ---------------------------------------*/
21
#ifndef __LCD_H
22
#define __LCD_H
23
 
24
/* Includes --------------------------------------------------------------------*/
25
#include "75x_lib.h"
26
 
27
/* Exported types --------------------------------------------------------------*/
28
 
29
  /* Data lines configuration mode */
30
  typedef enum
31
  {
32
    Input,
33
    Output
34
  } DataConfigMode_TypeDef;
35
 
36
  /* Text color mode */
37
  typedef enum
38
  {
39
    BlackText=0,
40
    WhiteText=1
41
  } TextColorMode_TypeDef;
42
 
43
  /* Dot On/Off mode */
44
  typedef enum
45
  {
46
    Dot_On,
47
    Dot_Off
48
  } DotMode_TypeDef;
49
 
50
/* Exported constants ----------------------------------------------------------*/
51
 
52
/* LCD Control pins */
53
#define CtrlPin_E2           0x00000001
54
#define CtrlPin_E1           0x00000002
55
#define CtrlPin_RW           0x00000004
56
#define CtrlPin_DI           0x00000008
57
 
58
/* LCD Commands */
59
#define DISPLAY_ON             0xAF
60
#define DISPLAY_OFF            0xAE
61
#define START_LINE             0xC0
62
#define START_COLUMN           0x00
63
#define CLOCKWISE_OUTPUT       0xA0
64
#define DYNAMIC_DRIVE          0xA4
65
#define DUTY_CYCLE             0xA9
66
#define READ_MODIFY_WRITE_OFF  0xEE
67
#define SOFTWARE_RESET         0xE2
68
 
69
/* LCD Lines when LCD is managed as 2*17 characters */
70
#define Line1    0x0
71
#define Line2    0x2
72
 
73
/* Exported macro --------------------------------------------------------------*/
74
/* Exported functions ----------------------------------------------------------*/
75
/*----- Low layer function -----*/
76
void LCD_CtrlLinesConfig(void);
77
void LCD_CtrlLinesWrite(GPIO_TypeDef* GPIOx, u32 CtrlPins, BitAction BitVal);
78
void LCD_DataLinesConfig(DataConfigMode_TypeDef Mode);
79
void LCD_DataLinesWrite(GPIO_TypeDef* GPIOx, u32 PortVal);
80
 
81
/*----- Medium layer function -----*/
82
void LCD_CheckMasterStatus(void);
83
void LCD_CheckSlaveStatus(void);
84
void LCD_SendMasterCmd(u8 Cmd);
85
void LCD_SendSlaveCmd(u8 Cmd);
86
void LCD_SendMasterData(u8 Data);
87
u32 LCD_ReadMasterData(void);
88
void LCD_SendSlaveData(u8 Data);
89
u32 LCD_ReadSlaveData(void);
90
void LCD_SetMasterPage(u8 Page);
91
void LCD_SetSlavePage(u8 Page);
92
void LCD_SetMasterColumn(u8 Address);
93
void LCD_SetSlaveColumn(u8 Address);
94
void LCD_DrawChar(u8 Line, u8 Column, u8 Width, u8 *Bmp);
95
u8 LCD_HexToAsciiLow(u8 byte);
96
u8 LCD_HexToAsciiHigh(u8 byte);
97
void LCD_SetTextColor(TextColorMode_TypeDef TextColor);
98
 
99
/*----- High layer function -----*/
100
void LCD_Init(void);
101
/* LCD managed as 2 Lines, 17 characters each one (2Lines*17Char) */
102
void LCD_ClearLine(u8 Line);
103
void LCD_DisplayChar(u8 Line, u8 Column, u8 Ascii, TextColorMode_TypeDef CharMode);
104
void LCD_DisplayString(u8 Line, u8 *ptr, TextColorMode_TypeDef CharMode);
105
void LCD_Printf(u8* ptr, ...);
106
/* LCD managed as 122*32 dots */
107
void LCD_ClearMaster(void);
108
void LCD_ClearSlave(void);
109
void LCD_Clear(void);
110
void LCD_DrawMasterGraphic(u8 *Bmp);
111
void LCD_DrawSlaveGraphic(u8 *Bmp);
112
void LCD_DrawGraphic(u8 *Bmp);
113
void LCD_ScrollGraphic(u8 *Bmp, u32 nCount);
114
void LCD_DrawPixel(u8 XPos, u8 YPos, DotMode_TypeDef Mode);
115
void LCD_DrawLine(u8 XPos1, u8 YPos1, u8 XPos2, u8 YPos2);
116
void LCD_DrawBox(u8 XPos, u8 YPos, u8 Dx, u8 Dy);
117
 
118
#endif /*__LCD_H */
119
 
120
/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE******/

powered by: WebSVN 2.1.0

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