These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!
LCD/NOKIA6610_LCD/drv_glcd.h@0:bf7b9fba3924, 2011-03-20 (annotated)
- Committer:
- frank26080115
- Date:
- Sun Mar 20 05:38:56 2011 +0000
- Revision:
- 0:bf7b9fba3924
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
frank26080115 | 0:bf7b9fba3924 | 1 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 2 | * |
frank26080115 | 0:bf7b9fba3924 | 3 | * |
frank26080115 | 0:bf7b9fba3924 | 4 | * (c) Copyright IAR Systems 2006 |
frank26080115 | 0:bf7b9fba3924 | 5 | * |
frank26080115 | 0:bf7b9fba3924 | 6 | * File name : drv_glcd.h |
frank26080115 | 0:bf7b9fba3924 | 7 | * Description : Graphic LCD driver include file |
frank26080115 | 0:bf7b9fba3924 | 8 | * |
frank26080115 | 0:bf7b9fba3924 | 9 | * History : |
frank26080115 | 0:bf7b9fba3924 | 10 | * 1. Date : December 2, 2006 |
frank26080115 | 0:bf7b9fba3924 | 11 | * Author : Stanimir Bonev |
frank26080115 | 0:bf7b9fba3924 | 12 | * Description : Create |
frank26080115 | 0:bf7b9fba3924 | 13 | * |
frank26080115 | 0:bf7b9fba3924 | 14 | * $Revision: 28532 $ |
frank26080115 | 0:bf7b9fba3924 | 15 | **************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 16 | #include "drv_glcd_cnfg.h" |
frank26080115 | 0:bf7b9fba3924 | 17 | #include "lpc_types.h" |
frank26080115 | 0:bf7b9fba3924 | 18 | |
frank26080115 | 0:bf7b9fba3924 | 19 | #ifndef __DRV_GLCD_H |
frank26080115 | 0:bf7b9fba3924 | 20 | #define __DRV_GLCD_H |
frank26080115 | 0:bf7b9fba3924 | 21 | |
frank26080115 | 0:bf7b9fba3924 | 22 | #define DEF_X_LEFT 0 |
frank26080115 | 0:bf7b9fba3924 | 23 | #define DEF_Y_UP 0 |
frank26080115 | 0:bf7b9fba3924 | 24 | #define DEF_X_RIGHT GLCD_HORIZONTAL_SIZE |
frank26080115 | 0:bf7b9fba3924 | 25 | #define DEF_Y_DOWN GLCD_VERTICAL_SIZE |
frank26080115 | 0:bf7b9fba3924 | 26 | #define DEF_FONT_COLOUR 0x000000 |
frank26080115 | 0:bf7b9fba3924 | 27 | #define DEF_BACKGND_COLOUR 0x00FF0 |
frank26080115 | 0:bf7b9fba3924 | 28 | #define TEXT_DEF_TAB_SIZE 4 |
frank26080115 | 0:bf7b9fba3924 | 29 | |
frank26080115 | 0:bf7b9fba3924 | 30 | #define MAX_GLCD_STR_SIZE 256 |
frank26080115 | 0:bf7b9fba3924 | 31 | // External function |
frank26080115 | 0:bf7b9fba3924 | 32 | #define TEXT_BEL1_FUNC() // generate BEL signal |
frank26080115 | 0:bf7b9fba3924 | 33 | |
frank26080115 | 0:bf7b9fba3924 | 34 | // Set window |
frank26080115 | 0:bf7b9fba3924 | 35 | #define LCD_SET_WINDOW(xl,xr,yu,yd) \ |
frank26080115 | 0:bf7b9fba3924 | 36 | {\ |
frank26080115 | 0:bf7b9fba3924 | 37 | uint32_t Temp;\ |
frank26080115 | 0:bf7b9fba3924 | 38 | Temp = xl | (xr<<8);\ |
frank26080115 | 0:bf7b9fba3924 | 39 | GLCD_SendCmd(CASET,(unsigned char*)&Temp,0);\ |
frank26080115 | 0:bf7b9fba3924 | 40 | Temp = (yu+2) | ((yd+2)<<8);\ |
frank26080115 | 0:bf7b9fba3924 | 41 | GLCD_SendCmd(RASET,(unsigned char*)&Temp,0);\ |
frank26080115 | 0:bf7b9fba3924 | 42 | } |
frank26080115 | 0:bf7b9fba3924 | 43 | |
frank26080115 | 0:bf7b9fba3924 | 44 | // Send pixel |
frank26080115 | 0:bf7b9fba3924 | 45 | #define LCD_WRITE_PIXEL(c) GLCD_SendCmd(RAMWR,(unsigned char*)&c,2) |
frank26080115 | 0:bf7b9fba3924 | 46 | |
frank26080115 | 0:bf7b9fba3924 | 47 | // Flush pixels |
frank26080115 | 0:bf7b9fba3924 | 48 | #define LCD_FLUSH_PIXELS() GLCD_SendCmd(NOP,NULL,0) |
frank26080115 | 0:bf7b9fba3924 | 49 | |
frank26080115 | 0:bf7b9fba3924 | 50 | #define GLCD_MANF_ID 0x45 |
frank26080115 | 0:bf7b9fba3924 | 51 | #define GLCD_MOD_ID 0x03 |
frank26080115 | 0:bf7b9fba3924 | 52 | |
frank26080115 | 0:bf7b9fba3924 | 53 | #define WAITED_PIXEL 0x80000000 |
frank26080115 | 0:bf7b9fba3924 | 54 | |
frank26080115 | 0:bf7b9fba3924 | 55 | #define PIXEL_CONV(Pixel,Order) (!Order)?(((Pixel >> 4) & 0xFF) | ((Pixel << 12) & 0xF000)):(((Pixel << 16) & 0xFF0000) | ((Pixel) & 0xF00)) |
frank26080115 | 0:bf7b9fba3924 | 56 | // PCF8833 status register |
frank26080115 | 0:bf7b9fba3924 | 57 | #define PCF8833_ST_BOOSTER_ON (1UL << 7) |
frank26080115 | 0:bf7b9fba3924 | 58 | #define PCF8833_ST_Y_ADDR_ODR (1UL << 6) |
frank26080115 | 0:bf7b9fba3924 | 59 | #define PCF8833_ST_X_ADDR_ODR (1UL << 5) |
frank26080115 | 0:bf7b9fba3924 | 60 | #define PCF8833_ST_ADDR_MODE (1UL << 4) |
frank26080115 | 0:bf7b9fba3924 | 61 | #define PCF8833_ST_LINE_ADDR_ORD (1UL << 3) |
frank26080115 | 0:bf7b9fba3924 | 62 | #define PCF8833_ST_RGB_ORD (1UL << 2) |
frank26080115 | 0:bf7b9fba3924 | 63 | #define PCF8833_ST_PIXEL_FORM (7UL << 12) |
frank26080115 | 0:bf7b9fba3924 | 64 | #define PCF8833_ST_IDLE_MODE (1UL << 11) |
frank26080115 | 0:bf7b9fba3924 | 65 | #define PCF8833_ST_PARTIAL_MODE (1UL << 10) |
frank26080115 | 0:bf7b9fba3924 | 66 | #define PCF8833_ST_SLEEP_MODE (1UL << 9) |
frank26080115 | 0:bf7b9fba3924 | 67 | #define PCF8833_ST_NORM_MODE (1UL << 8) |
frank26080115 | 0:bf7b9fba3924 | 68 | #define PCF8833_ST_V_SCROLL_MODE (1UL << 23) |
frank26080115 | 0:bf7b9fba3924 | 69 | #define PCF8833_ST_INV_MODE (1UL << 21) |
frank26080115 | 0:bf7b9fba3924 | 70 | #define PCF8833_ST_ALL_PIXELS_ON (1UL << 20) |
frank26080115 | 0:bf7b9fba3924 | 71 | #define PCF8833_ST_ALL_PIXELS_OFF (1UL << 19) |
frank26080115 | 0:bf7b9fba3924 | 72 | #define PCF8833_ST_DISPLAY_MODE (1UL << 18) |
frank26080115 | 0:bf7b9fba3924 | 73 | #define PCF8833_ST_TEARING_MODE (1UL << 17) |
frank26080115 | 0:bf7b9fba3924 | 74 | |
frank26080115 | 0:bf7b9fba3924 | 75 | // GLCD command interpreter type |
frank26080115 | 0:bf7b9fba3924 | 76 | typedef enum _GLCD_ISS_t { |
frank26080115 | 0:bf7b9fba3924 | 77 | GLCD_ISS_0 = 0, GLCD_ISS_1 |
frank26080115 | 0:bf7b9fba3924 | 78 | } GLCD_ISS_t; |
frank26080115 | 0:bf7b9fba3924 | 79 | |
frank26080115 | 0:bf7b9fba3924 | 80 | // execution status |
frank26080115 | 0:bf7b9fba3924 | 81 | typedef enum _GLCD_Status_t { |
frank26080115 | 0:bf7b9fba3924 | 82 | GLCD_OK = 0, GLCD_ID_ERROR, GLCD_UNSUPPORTED, GLCD_ERROR |
frank26080115 | 0:bf7b9fba3924 | 83 | } GLCD_Status_t; |
frank26080115 | 0:bf7b9fba3924 | 84 | |
frank26080115 | 0:bf7b9fba3924 | 85 | // GCLD command set |
frank26080115 | 0:bf7b9fba3924 | 86 | typedef enum _GLCD_Cmd_t { |
frank26080115 | 0:bf7b9fba3924 | 87 | // Equal commands |
frank26080115 | 0:bf7b9fba3924 | 88 | NOP, SLPIN, SLPOUT, PTLOUT, INVOFF, INVON, |
frank26080115 | 0:bf7b9fba3924 | 89 | DISPOFF, DISPON, CASET, RASET, RAMWR, RGBSET, VSCSAD, |
frank26080115 | 0:bf7b9fba3924 | 90 | IDMOFF, IDMON, RDID1, RDID2, RDID3, FRMSEL, FRM8SEL, TMPRNG, |
frank26080115 | 0:bf7b9fba3924 | 91 | TMPHIS, TMPREAD, EPWRIN, EPWROUT, RDEV, RDRR, |
frank26080115 | 0:bf7b9fba3924 | 92 | // Adapted commands |
frank26080115 | 0:bf7b9fba3924 | 93 | PTIN, // ISS=0 equal on PTLAR + PTIN |
frank26080115 | 0:bf7b9fba3924 | 94 | SCRLAR, // ISS=1 ASCSET mode 0 |
frank26080115 | 0:bf7b9fba3924 | 95 | DATCTR, // ISS=0 equal on MADCTR + COLMOD |
frank26080115 | 0:bf7b9fba3924 | 96 | SETCON, // |
frank26080115 | 0:bf7b9fba3924 | 97 | // Commands applicable only when ISS=1 |
frank26080115 | 0:bf7b9fba3924 | 98 | OSCON, OSCOFF, RMWIN, RMWOUT, VOLUP, VOLDOWN, ASCSET, DISCTR, |
frank26080115 | 0:bf7b9fba3924 | 99 | PWRCTR, VOLCTR, |
frank26080115 | 0:bf7b9fba3924 | 100 | // Commands applicable only when ISS=0 |
frank26080115 | 0:bf7b9fba3924 | 101 | CLKINT, CLKEXT, RDDST, SWRESET, RDDID, PTLAR, PTLON, MADCTR, |
frank26080115 | 0:bf7b9fba3924 | 102 | COLMOD, APOFF, APON, BSTROFF, BSTRON, |
frank26080115 | 0:bf7b9fba3924 | 103 | GLCD_CMD_NUMB |
frank26080115 | 0:bf7b9fba3924 | 104 | } GLCD_Cmd_t; |
frank26080115 | 0:bf7b9fba3924 | 105 | |
frank26080115 | 0:bf7b9fba3924 | 106 | // Command direction |
frank26080115 | 0:bf7b9fba3924 | 107 | typedef enum _GLCD_CmdDir_t { |
frank26080115 | 0:bf7b9fba3924 | 108 | GLCD_WRITE = 0, GLCD_READ |
frank26080115 | 0:bf7b9fba3924 | 109 | } GLCD_CmdDir_t; |
frank26080115 | 0:bf7b9fba3924 | 110 | |
frank26080115 | 0:bf7b9fba3924 | 111 | // Data flag |
frank26080115 | 0:bf7b9fba3924 | 112 | #define GLCD_DATA 0x100 |
frank26080115 | 0:bf7b9fba3924 | 113 | |
frank26080115 | 0:bf7b9fba3924 | 114 | // Invalid command (some commands don't have analog in other |
frank26080115 | 0:bf7b9fba3924 | 115 | // command mode interpreter) |
frank26080115 | 0:bf7b9fba3924 | 116 | #define GLCD_INV_CMD ((uint32_t)(-1)) |
frank26080115 | 0:bf7b9fba3924 | 117 | |
frank26080115 | 0:bf7b9fba3924 | 118 | #define GLCD_MAX_COTRAST 63 |
frank26080115 | 0:bf7b9fba3924 | 119 | #define GLCD_MIN_COTRAST -64 |
frank26080115 | 0:bf7b9fba3924 | 120 | |
frank26080115 | 0:bf7b9fba3924 | 121 | typedef struct _GLCD_CmdCtrl_t { |
frank26080115 | 0:bf7b9fba3924 | 122 | uint32_t Cmd; |
frank26080115 | 0:bf7b9fba3924 | 123 | GLCD_CmdDir_t Dir; |
frank26080115 | 0:bf7b9fba3924 | 124 | Bool Pulse; |
frank26080115 | 0:bf7b9fba3924 | 125 | uint32_t Param; |
frank26080115 | 0:bf7b9fba3924 | 126 | } GLCD_CmdCtrl_t, *pGLCD_CmdCtrl_t; |
frank26080115 | 0:bf7b9fba3924 | 127 | |
frank26080115 | 0:bf7b9fba3924 | 128 | #pragma pack(1) |
frank26080115 | 0:bf7b9fba3924 | 129 | typedef struct _ASCSET_Data_t { |
frank26080115 | 0:bf7b9fba3924 | 130 | uint8_t Ssl; |
frank26080115 | 0:bf7b9fba3924 | 131 | uint8_t Sel; |
frank26080115 | 0:bf7b9fba3924 | 132 | uint8_t Sfl; |
frank26080115 | 0:bf7b9fba3924 | 133 | uint8_t Smd; |
frank26080115 | 0:bf7b9fba3924 | 134 | } ASCSET_Data_t, *pASCSET_Data_t; |
frank26080115 | 0:bf7b9fba3924 | 135 | |
frank26080115 | 0:bf7b9fba3924 | 136 | #if defined ( __CC_ARM ) |
frank26080115 | 0:bf7b9fba3924 | 137 | #pragma anon_unions |
frank26080115 | 0:bf7b9fba3924 | 138 | #endif |
frank26080115 | 0:bf7b9fba3924 | 139 | |
frank26080115 | 0:bf7b9fba3924 | 140 | typedef struct _DATCTR_Data_t { |
frank26080115 | 0:bf7b9fba3924 | 141 | union |
frank26080115 | 0:bf7b9fba3924 | 142 | { |
frank26080115 | 0:bf7b9fba3924 | 143 | uint8_t RC_AddMode; |
frank26080115 | 0:bf7b9fba3924 | 144 | struct |
frank26080115 | 0:bf7b9fba3924 | 145 | { |
frank26080115 | 0:bf7b9fba3924 | 146 | uint8_t MY : 1; |
frank26080115 | 0:bf7b9fba3924 | 147 | uint8_t MX : 1; |
frank26080115 | 0:bf7b9fba3924 | 148 | uint8_t MV : 1; |
frank26080115 | 0:bf7b9fba3924 | 149 | uint8_t ML : 1; |
frank26080115 | 0:bf7b9fba3924 | 150 | uint8_t : 4; |
frank26080115 | 0:bf7b9fba3924 | 151 | }; |
frank26080115 | 0:bf7b9fba3924 | 152 | }; |
frank26080115 | 0:bf7b9fba3924 | 153 | union |
frank26080115 | 0:bf7b9fba3924 | 154 | { |
frank26080115 | 0:bf7b9fba3924 | 155 | uint8_t RGB_Mode; |
frank26080115 | 0:bf7b9fba3924 | 156 | struct |
frank26080115 | 0:bf7b9fba3924 | 157 | { |
frank26080115 | 0:bf7b9fba3924 | 158 | uint8_t RGB : 1; |
frank26080115 | 0:bf7b9fba3924 | 159 | uint8_t : 7; |
frank26080115 | 0:bf7b9fba3924 | 160 | }; |
frank26080115 | 0:bf7b9fba3924 | 161 | }; |
frank26080115 | 0:bf7b9fba3924 | 162 | union |
frank26080115 | 0:bf7b9fba3924 | 163 | { |
frank26080115 | 0:bf7b9fba3924 | 164 | uint8_t GrayScale; |
frank26080115 | 0:bf7b9fba3924 | 165 | struct |
frank26080115 | 0:bf7b9fba3924 | 166 | { |
frank26080115 | 0:bf7b9fba3924 | 167 | uint8_t GS : 3; |
frank26080115 | 0:bf7b9fba3924 | 168 | uint8_t Reversed: 5; |
frank26080115 | 0:bf7b9fba3924 | 169 | }; |
frank26080115 | 0:bf7b9fba3924 | 170 | }; |
frank26080115 | 0:bf7b9fba3924 | 171 | } DATCTR_Data_t, *pDATCTR_Data_t; |
frank26080115 | 0:bf7b9fba3924 | 172 | |
frank26080115 | 0:bf7b9fba3924 | 173 | typedef struct _MADCTR_Data_t { |
frank26080115 | 0:bf7b9fba3924 | 174 | union |
frank26080115 | 0:bf7b9fba3924 | 175 | { |
frank26080115 | 0:bf7b9fba3924 | 176 | uint8_t MemDataAccCtrl; |
frank26080115 | 0:bf7b9fba3924 | 177 | struct |
frank26080115 | 0:bf7b9fba3924 | 178 | { |
frank26080115 | 0:bf7b9fba3924 | 179 | uint8_t Reversed: 3; |
frank26080115 | 0:bf7b9fba3924 | 180 | uint8_t RGB : 1; |
frank26080115 | 0:bf7b9fba3924 | 181 | uint8_t ML : 1; |
frank26080115 | 0:bf7b9fba3924 | 182 | uint8_t MV : 1; |
frank26080115 | 0:bf7b9fba3924 | 183 | uint8_t MX : 1; |
frank26080115 | 0:bf7b9fba3924 | 184 | uint8_t MY : 1; |
frank26080115 | 0:bf7b9fba3924 | 185 | }; |
frank26080115 | 0:bf7b9fba3924 | 186 | }; |
frank26080115 | 0:bf7b9fba3924 | 187 | } MADCTR_Data_t, *pMADCTR_Data_t; |
frank26080115 | 0:bf7b9fba3924 | 188 | |
frank26080115 | 0:bf7b9fba3924 | 189 | |
frank26080115 | 0:bf7b9fba3924 | 190 | typedef struct _COLMOD_Data_t { |
frank26080115 | 0:bf7b9fba3924 | 191 | union |
frank26080115 | 0:bf7b9fba3924 | 192 | { |
frank26080115 | 0:bf7b9fba3924 | 193 | uint8_t ColourMode; |
frank26080115 | 0:bf7b9fba3924 | 194 | struct |
frank26080115 | 0:bf7b9fba3924 | 195 | { |
frank26080115 | 0:bf7b9fba3924 | 196 | uint8_t Mode : 3; |
frank26080115 | 0:bf7b9fba3924 | 197 | uint8_t Reversed : 5; |
frank26080115 | 0:bf7b9fba3924 | 198 | }; |
frank26080115 | 0:bf7b9fba3924 | 199 | }; |
frank26080115 | 0:bf7b9fba3924 | 200 | } COLMOD_Data_t, *pCOLMOD_Data_t; |
frank26080115 | 0:bf7b9fba3924 | 201 | #pragma pack() |
frank26080115 | 0:bf7b9fba3924 | 202 | |
frank26080115 | 0:bf7b9fba3924 | 203 | typedef uint32_t LdcPixel_t, *pLdcPixel_t; |
frank26080115 | 0:bf7b9fba3924 | 204 | |
frank26080115 | 0:bf7b9fba3924 | 205 | typedef struct _FontType_t { |
frank26080115 | 0:bf7b9fba3924 | 206 | uint32_t H_Size; |
frank26080115 | 0:bf7b9fba3924 | 207 | uint32_t V_Size; |
frank26080115 | 0:bf7b9fba3924 | 208 | uint32_t CharacterOffset; |
frank26080115 | 0:bf7b9fba3924 | 209 | uint32_t CharactersNuber; |
frank26080115 | 0:bf7b9fba3924 | 210 | unsigned char *pFontStream; |
frank26080115 | 0:bf7b9fba3924 | 211 | unsigned char *pFontDesc; |
frank26080115 | 0:bf7b9fba3924 | 212 | } FontType_t, *pFontType_t; |
frank26080115 | 0:bf7b9fba3924 | 213 | |
frank26080115 | 0:bf7b9fba3924 | 214 | typedef struct _Bmp_t { |
frank26080115 | 0:bf7b9fba3924 | 215 | uint32_t H_Size; |
frank26080115 | 0:bf7b9fba3924 | 216 | uint32_t V_Size; |
frank26080115 | 0:bf7b9fba3924 | 217 | uint32_t BitsPP; |
frank26080115 | 0:bf7b9fba3924 | 218 | uint32_t BytesPP; |
frank26080115 | 0:bf7b9fba3924 | 219 | unsigned int *pPalette; |
frank26080115 | 0:bf7b9fba3924 | 220 | unsigned int *pPicStream; |
frank26080115 | 0:bf7b9fba3924 | 221 | unsigned char *pPicDesc; |
frank26080115 | 0:bf7b9fba3924 | 222 | } Bmp_t, *pBmp_t; |
frank26080115 | 0:bf7b9fba3924 | 223 | |
frank26080115 | 0:bf7b9fba3924 | 224 | extern void Dly100us(void *arg); |
frank26080115 | 0:bf7b9fba3924 | 225 | |
frank26080115 | 0:bf7b9fba3924 | 226 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 227 | * Function Name: GLCD_SendCmd |
frank26080115 | 0:bf7b9fba3924 | 228 | * Parameters: GLCD_Cmd_t Cmd, unsigned char* pData, uint32_t Size |
frank26080115 | 0:bf7b9fba3924 | 229 | * Return: GLCD_Status_t |
frank26080115 | 0:bf7b9fba3924 | 230 | * |
frank26080115 | 0:bf7b9fba3924 | 231 | * Description: Send command to the Graphic LCD |
frank26080115 | 0:bf7b9fba3924 | 232 | * |
frank26080115 | 0:bf7b9fba3924 | 233 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 234 | GLCD_Status_t GLCD_SendCmd (GLCD_Cmd_t Cmd, unsigned char *pData, uint32_t Size); |
frank26080115 | 0:bf7b9fba3924 | 235 | |
frank26080115 | 0:bf7b9fba3924 | 236 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 237 | * Function Name: GLCD_PowerUpInit |
frank26080115 | 0:bf7b9fba3924 | 238 | * Parameters: unsigned char* pInitData |
frank26080115 | 0:bf7b9fba3924 | 239 | * Return: GLCD_Status_t |
frank26080115 | 0:bf7b9fba3924 | 240 | * GLCD_OK - init pass |
frank26080115 | 0:bf7b9fba3924 | 241 | * GLCD_ID_ERROR - unsupported driver type |
frank26080115 | 0:bf7b9fba3924 | 242 | * Description: Power-up initialization of Graphic LCD |
frank26080115 | 0:bf7b9fba3924 | 243 | * |
frank26080115 | 0:bf7b9fba3924 | 244 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 245 | //GLCD_Status_t GLCD_PowerUpInit (unsigned char *pInitData); |
frank26080115 | 0:bf7b9fba3924 | 246 | GLCD_Status_t GLCD_PowerUpInit (unsigned char *pInitData); |
frank26080115 | 0:bf7b9fba3924 | 247 | |
frank26080115 | 0:bf7b9fba3924 | 248 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 249 | * Function Name: GLCD_SetFont |
frank26080115 | 0:bf7b9fba3924 | 250 | * Parameters: pFontType_t pFont, LdcPixel_t Color |
frank26080115 | 0:bf7b9fba3924 | 251 | * LdcPixel_t BackgndColor |
frank26080115 | 0:bf7b9fba3924 | 252 | * |
frank26080115 | 0:bf7b9fba3924 | 253 | * Return: none |
frank26080115 | 0:bf7b9fba3924 | 254 | * |
frank26080115 | 0:bf7b9fba3924 | 255 | * Description: Set current font, font color and background color |
frank26080115 | 0:bf7b9fba3924 | 256 | * |
frank26080115 | 0:bf7b9fba3924 | 257 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 258 | void GLCD_SetFont(pFontType_t pFont, |
frank26080115 | 0:bf7b9fba3924 | 259 | LdcPixel_t Color, LdcPixel_t BackgndColor); |
frank26080115 | 0:bf7b9fba3924 | 260 | |
frank26080115 | 0:bf7b9fba3924 | 261 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 262 | * Function Name: GLCD_SetWindow |
frank26080115 | 0:bf7b9fba3924 | 263 | * Parameters: uint32_t X_Left, uint32_t Y_Up, |
frank26080115 | 0:bf7b9fba3924 | 264 | * uint32_t X_Right, uint32_t Y_Down |
frank26080115 | 0:bf7b9fba3924 | 265 | * |
frank26080115 | 0:bf7b9fba3924 | 266 | * Return: none |
frank26080115 | 0:bf7b9fba3924 | 267 | * |
frank26080115 | 0:bf7b9fba3924 | 268 | * Description: Set draw window XY coordinate in pixels |
frank26080115 | 0:bf7b9fba3924 | 269 | * |
frank26080115 | 0:bf7b9fba3924 | 270 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 271 | void GLCD_SetWindow(uint32_t X_Left, uint32_t Y_Up, |
frank26080115 | 0:bf7b9fba3924 | 272 | uint32_t X_Right, uint32_t Y_Down); |
frank26080115 | 0:bf7b9fba3924 | 273 | |
frank26080115 | 0:bf7b9fba3924 | 274 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 275 | * Function Name: GLCD_TextSetPos |
frank26080115 | 0:bf7b9fba3924 | 276 | * Parameters: uint32_t X_UpLeft, uint32_t Y_UpLeft, |
frank26080115 | 0:bf7b9fba3924 | 277 | * uint32_t X_DownLeft, uint32_t Y_DownLeft |
frank26080115 | 0:bf7b9fba3924 | 278 | * |
frank26080115 | 0:bf7b9fba3924 | 279 | * Return: none |
frank26080115 | 0:bf7b9fba3924 | 280 | * |
frank26080115 | 0:bf7b9fba3924 | 281 | * Description: Set text X,Y coordinate in characters |
frank26080115 | 0:bf7b9fba3924 | 282 | * |
frank26080115 | 0:bf7b9fba3924 | 283 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 284 | void GLCD_TextSetPos(uint32_t X, uint32_t Y); |
frank26080115 | 0:bf7b9fba3924 | 285 | |
frank26080115 | 0:bf7b9fba3924 | 286 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 287 | * Function Name: GLCD_TextSetTabSize |
frank26080115 | 0:bf7b9fba3924 | 288 | * Parameters: uint32_t Size |
frank26080115 | 0:bf7b9fba3924 | 289 | * |
frank26080115 | 0:bf7b9fba3924 | 290 | * Return: none |
frank26080115 | 0:bf7b9fba3924 | 291 | * |
frank26080115 | 0:bf7b9fba3924 | 292 | * Description: Set text tab size in characters |
frank26080115 | 0:bf7b9fba3924 | 293 | * |
frank26080115 | 0:bf7b9fba3924 | 294 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 295 | void GLCD_TextSetTabSize(uint32_t Size); |
frank26080115 | 0:bf7b9fba3924 | 296 | |
frank26080115 | 0:bf7b9fba3924 | 297 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 298 | * Function Name: GLCD_TextCalcWindow |
frank26080115 | 0:bf7b9fba3924 | 299 | * Parameters: pInt32U pXL, pInt32U pXR, |
frank26080115 | 0:bf7b9fba3924 | 300 | * pInt32U pYU, pInt32U pYD, |
frank26080115 | 0:bf7b9fba3924 | 301 | * pInt32U pH_Size, pInt32U pV_Size |
frank26080115 | 0:bf7b9fba3924 | 302 | * |
frank26080115 | 0:bf7b9fba3924 | 303 | * Return: Boolean |
frank26080115 | 0:bf7b9fba3924 | 304 | * FALSE - out of window coordinate aren't valid |
frank26080115 | 0:bf7b9fba3924 | 305 | * TRUE - the returned coordinate are valid |
frank26080115 | 0:bf7b9fba3924 | 306 | * |
frank26080115 | 0:bf7b9fba3924 | 307 | * Description: Calculate character window |
frank26080115 | 0:bf7b9fba3924 | 308 | * |
frank26080115 | 0:bf7b9fba3924 | 309 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 310 | static Bool GLCD_TextCalcWindow (unsigned int *pXL, unsigned int *pXR, |
frank26080115 | 0:bf7b9fba3924 | 311 | unsigned int *pYU, unsigned int *pYD, |
frank26080115 | 0:bf7b9fba3924 | 312 | unsigned int *pH_Size, unsigned int *pV_Size); |
frank26080115 | 0:bf7b9fba3924 | 313 | |
frank26080115 | 0:bf7b9fba3924 | 314 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 315 | * Function Name: GLCD_putchar |
frank26080115 | 0:bf7b9fba3924 | 316 | * Parameters: int c |
frank26080115 | 0:bf7b9fba3924 | 317 | * |
frank26080115 | 0:bf7b9fba3924 | 318 | * Return: none |
frank26080115 | 0:bf7b9fba3924 | 319 | * |
frank26080115 | 0:bf7b9fba3924 | 320 | * Description: Put char function |
frank26080115 | 0:bf7b9fba3924 | 321 | * |
frank26080115 | 0:bf7b9fba3924 | 322 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 323 | int GLCD_putchar (int c); |
frank26080115 | 0:bf7b9fba3924 | 324 | |
frank26080115 | 0:bf7b9fba3924 | 325 | /************************************************************************* |
frank26080115 | 0:bf7b9fba3924 | 326 | * Function Name: GLCD_print |
frank26080115 | 0:bf7b9fba3924 | 327 | * Parameters: int c |
frank26080115 | 0:bf7b9fba3924 | 328 | * |
frank26080115 | 0:bf7b9fba3924 | 329 | * Return: none |
frank26080115 | 0:bf7b9fba3924 | 330 | * |
frank26080115 | 0:bf7b9fba3924 | 331 | * Description: Put char function |
frank26080115 | 0:bf7b9fba3924 | 332 | * |
frank26080115 | 0:bf7b9fba3924 | 333 | *************************************************************************/ |
frank26080115 | 0:bf7b9fba3924 | 334 | void GLCD_print (const char *fmt); |
frank26080115 | 0:bf7b9fba3924 | 335 | |
frank26080115 | 0:bf7b9fba3924 | 336 | #endif /* __DRV_GLCD_H */ |