Go to the source code of this file.
Macros | |
| #define | PIN_EN (1 << 19) |
| LCD Controller PINs are connected to the GPIO0 port (same as the LEDs). Hence, they're controlled using the FIOSET and FIOCLR registers. | |
| #define | PIN_LE (1 << 20) |
| #define | PIN_DIR (1 << 21) |
| #define | PIN_CS (1 << 22) |
| #define | PIN_RS (1 << 23) |
| #define | PIN_WR (1 << 24) |
| #define | PIN_RD (1 << 25) |
| #define | LCD_EN(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_EN) : (LPC_GPIO0->FIOCLR = PIN_EN)) |
| #define | LCD_LE(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_LE) : (LPC_GPIO0->FIOCLR = PIN_LE)) |
| #define | LCD_DIR(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_DIR) : (LPC_GPIO0->FIOCLR = PIN_DIR)) |
| #define | LCD_CS(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_CS) : (LPC_GPIO0->FIOCLR = PIN_CS)) |
| #define | LCD_RS(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_RS) : (LPC_GPIO0->FIOCLR = PIN_RS)) |
| #define | LCD_WR(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_WR) : (LPC_GPIO0->FIOCLR = PIN_WR)) |
| #define | LCD_RD(x) ((x) ? (LPC_GPIO0->FIOSET = PIN_RD) : (LPC_GPIO0->FIOCLR = PIN_RD)) |
| #define | DELAY_COUNT(count) |
| #define | DELAY_MS(ms) |
Enumerations | |
| enum | LCDModel { ILI9320 , ILI9325 , ILI9328 , ILI9331 , SSD1298 , SSD1289 , ST7781 , LGDP4531 , SPFD5408B , R61505U , HX8346A , HX8347D , HX8347A , LGDP4535 , SSD2119 } |
| Models. More... | |
Functions | |
| _PRIVATE void | send (u16 halfw) |
| Writes an half-word (16 bits) into the LCD's DB port. | |
| _PRIVATE u16 | recv (void) |
| Reads an half-word (16 bits) from the LCD's DB port. | |
| _PRIVATE void | init_rw_operation_at (u16 index) |
| Tells the LCD controller to initiate a R/W operation with the register at the index specified. | |
| _PRIVATE void | do_write (u16 data) |
| Writes an half-word (16 bits) into the LCD's DB port, destined to the register at the index selected with the previous call to init_ro_operation_at. | |
| _PRIVATE u16 | do_read (void) |
| Reads an half-word (16 bits) from the LCD's DB port, from the register at the index selected with the previous call to init_ro_operation_at. | |
| _PRIVATE void | write_to (u16 reg, u16 data) |
| Writes a 16-bit value to the LCD controller, at the specified register. | |
| _PRIVATE u16 | read_from (u16 reg) |
| Reads an HW from the LCD controller, at the specified register. | |
| _PRIVATE void | set_gram_cursor (u16 x, u16 y) |
| Sets the GRAM cursor to the specified coordinates, for writing data into the appropriate pixel in the display. | |
| void | __LCD_LL_Init (u16 orientation) |
| u16 | __LCD_LL_GetPointColor (u16 x, u16 y) |
| void | __LCD_LL_SetPointColor (u16 rgb565, u16 x, u16 y) |
| void | __LCD_LL_FillScreen (u16 color) |
Variables | |
| _PRIVATE u8 | s_model_code |
| The model code of the LCD controller. | |
| _PRIVATE u16 | s_orientation |
| The current orientation of the screen. | |
| _DECL_EXTERNALLY u16 | LCDMaxX |
| The maximum X and Y coordinates of the screen. | |
| _DECL_EXTERNALLY u16 | LCDMaxY |
| #define DELAY_COUNT | ( | count | ) |
Definition at line 40 of file glcd_lowlevel.c.
| #define DELAY_MS | ( | ms | ) |
Definition at line 41 of file glcd_lowlevel.c.
Definition at line 28 of file glcd_lowlevel.c.
Definition at line 27 of file glcd_lowlevel.c.
Definition at line 25 of file glcd_lowlevel.c.
Definition at line 26 of file glcd_lowlevel.c.
Definition at line 31 of file glcd_lowlevel.c.
Definition at line 29 of file glcd_lowlevel.c.
Definition at line 30 of file glcd_lowlevel.c.
| #define PIN_CS (1 << 22) |
Definition at line 20 of file glcd_lowlevel.c.
| #define PIN_DIR (1 << 21) |
Definition at line 19 of file glcd_lowlevel.c.
| #define PIN_EN (1 << 19) |
LCD Controller PINs are connected to the GPIO0 port (same as the LEDs). Hence, they're controlled using the FIOSET and FIOCLR registers.
EN = Enable (19)
LE = Latch Enable (20)
DIR = Bus Direction (21) (0 = Write, 1 = Read)
CS = Chip Select (22)
RS = Register Select (23) (0 = Command, 1 = Data)
WR = Write Operation (24)
RD = Read Operation (25)
Definition at line 17 of file glcd_lowlevel.c.
| #define PIN_LE (1 << 20) |
Definition at line 18 of file glcd_lowlevel.c.
| #define PIN_RD (1 << 25) |
Definition at line 23 of file glcd_lowlevel.c.
| #define PIN_RS (1 << 23) |
Definition at line 21 of file glcd_lowlevel.c.
| #define PIN_WR (1 << 24) |
Definition at line 22 of file glcd_lowlevel.c.
| enum LCDModel |
Models.
| Enumerator | |
|---|---|
| ILI9320 | |
| ILI9325 | |
| ILI9328 | |
| ILI9331 | |
| SSD1298 | |
| SSD1289 | |
| ST7781 | |
| LGDP4531 | |
| SPFD5408B | |
| R61505U | |
| HX8346A | |
| HX8347D | |
| HX8347A | |
| LGDP4535 | |
| SSD2119 | |
Definition at line 47 of file glcd_lowlevel.c.
| void __LCD_LL_FillScreen | ( | u16 | color | ) |
Definition at line 374 of file glcd_lowlevel.c.
Definition at line 334 of file glcd_lowlevel.c.
| void __LCD_LL_Init | ( | u16 | orientation | ) |
Definition at line 228 of file glcd_lowlevel.c.
Definition at line 368 of file glcd_lowlevel.c.
Reads an half-word (16 bits) from the LCD's DB port, from the register at the index selected with the previous call to init_ro_operation_at.
Definition at line 154 of file glcd_lowlevel.c.
Writes an half-word (16 bits) into the LCD's DB port, destined to the register at the index selected with the previous call to init_ro_operation_at.
| data | The HW to write. |
Definition at line 137 of file glcd_lowlevel.c.
Tells the LCD controller to initiate a R/W operation with the register at the index specified.
| index | The index of the register to read/write. |
Definition at line 118 of file glcd_lowlevel.c.
Reads an HW from the LCD controller, at the specified register.
| reg | The register to read from. |
Definition at line 178 of file glcd_lowlevel.c.
Reads an half-word (16 bits) from the LCD's DB port.
Definition at line 98 of file glcd_lowlevel.c.
Writes an half-word (16 bits) into the LCD's DB port.
| byte | The HW to write. |
Definition at line 85 of file glcd_lowlevel.c.
Sets the GRAM cursor to the specified coordinates, for writing data into the appropriate pixel in the display.
| x | The X coordinate (column). |
| y | The Y coordinate (row). |
Definition at line 188 of file glcd_lowlevel.c.
Writes a 16-bit value to the LCD controller, at the specified register.
| reg | The register to write to. |
| data | The value to write. |
Definition at line 169 of file glcd_lowlevel.c.
| _DECL_EXTERNALLY u16 LCDMaxX |
The maximum X and Y coordinates of the screen.
Definition at line 75 of file glcd_lowlevel.c.
| _DECL_EXTERNALLY u16 LCDMaxY |
Definition at line 75 of file glcd_lowlevel.c.
The model code of the LCD controller.
Definition at line 69 of file glcd_lowlevel.c.
The current orientation of the screen.
Definition at line 72 of file glcd_lowlevel.c.