• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

lh155.h

Go to the documentation of this file.
00001 /* LH155 access definitions and functions */
00002 /* Copyright (C) 2009 Thomas Klosa, Holger Dietze
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation; either version 2 of the License, or
00007  *   (at your option) version 3.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License along
00015  *   with this program; if not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef LH155_H
00019 #define LH155_H
00020 
00034 #ifdef HAVE_STDINT_H
00035 #include <stdint.h>
00036 #endif
00037 
00038 /* display size in Pixel */
00040 #define HL_LCD_WIDTH  (240)
00041 
00042 #define HL_LCD_HEIGHT  (64)
00043 
00044 #define HL_LCD_WIDTH_BYTES (HL_LCD_WIDTH/8)
00045 
00053 #define HL_LCD_PARAM_MASK       (0x0F)
00054 
00055 #define HL_LCD_X_ADR_L_CMD      (0x00)
00056 
00057 #define HL_LCD_X_ADR_H_CMD      (0x10)
00058 
00059 #define HL_LCD_Y_ADR_L_CMD      (0x20)
00060 
00061 #define HL_LCD_Y_ADR_H_CMD      (0x30)
00062 
00063 #define HL_LCD_START_LINE_L     (0x40)
00064 
00065 #define HL_LCD_START_LINE_H     (0x50)
00066 
00067 #define HL_LCD_SET_RE           (0xF1)
00068 
00069 #define HL_LCD_CLR_RE           (0xF0)
00070 
00071 #define HL_LCD_ALT_LINE_L       (0x60)
00072 
00073 #define HL_LCD_ALT_LINE_H       (0x70)
00074 
00081 #define HL_LCD_DISP_CTRL_1      (0x80)
00082 
00087 #define HL_LCD_DISP_CTRL_2      (0x90)
00088 
00089 #define HL_LCD_INC_CTRL         (0xA0)
00090 
00091 #define HL_LCD_PWR_CTRL_1       (0xB0)
00092 
00093 #define HL_LCD_PWR_CTRL_2       (0xD0)
00094 
00095 #define HL_LCD_PWR_CTRL_3       (0xE0)
00096 
00097 #define HL_LCD_REG_RD_ADR       (0xC0)
00098 
00103 #define HL_LCD_INC_CTRL_AIM     (0x04) /* Increment mode */
00104 
00105 #define HL_LCD_INC_CTRL_AYI     (0x02) /* Auto Y increment */
00106 
00107 #define HL_LCD_INC_CTRL_AXI     (0x01) /* Auto X increment */
00108 
00110 void HL_LCD_WriteCmd (uint8_t cmd);
00111 
00113 void HL_LCD_WriteData (uint8_t Data);
00121 uint8_t HL_LCD_ReadData (void);
00122 
00124 void HL_LCD_SetX (uint8_t XAdr);
00126 void HL_LCD_SetY (uint8_t YAdr);
00133 void HL_LCD_WriteByte (uint8_t XAdr, uint8_t YAdr, uint8_t Data);
00134 
00136 void HL_LCD_Init (void);
00137 
00149 uint8_t hl_pixel_setXY_mask (uint8_t x, uint8_t y);
00150 
00161 uint8_t hl_pixel_setXY_bit (uint8_t x, uint8_t y);
00162 
00164 inline void HL_LCD_PowerOff (void){
00165 
00166         HL_LCD_WriteCmd ( HL_LCD_PWR_CTRL_1 | 0 );      // PowerOff
00167 
00168 };
00169 
00171 inline void HL_LCD_PowerOn (void){
00172 
00173         HL_LCD_WriteCmd ( HL_LCD_PWR_CTRL_1 | 2 );      // PowerOn
00174 
00175 };
00176 
00177 #endif

Generated by  doxygen 1.7.1