Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef LH155_H
00019 #define LH155_H
00020
00034 #ifdef HAVE_STDINT_H
00035 #include <stdint.h>
00036 #endif
00037
00038
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)
00104
00105 #define HL_LCD_INC_CTRL_AYI (0x02)
00106
00107 #define HL_LCD_INC_CTRL_AXI (0x01)
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 );
00167
00168 };
00169
00171 inline void HL_LCD_PowerOn (void){
00172
00173 HL_LCD_WriteCmd ( HL_LCD_PWR_CTRL_1 | 2 );
00174
00175 };
00176
00177 #endif