|
Plant Monitor SAM3X8E
|
Interface for ST7789 driver. More...
Go to the source code of this file.
Macros | |
| #define | DISPLAY_WIDTH 0x00F0 |
| #define | DISPLAY_HEIGHT 0x0140 |
| #define | CS_PIN 17 |
| #define | DC_PIN 18 |
| #define | RST_PIN 19 |
| #define | NOP 0x00 |
| #define | SWRESET 0x01 |
| #define | RDDID 0x04 |
| #define | RDDST 0x09 |
| #define | RDDPM 0x0A |
| #define | RDD_MADCTL 0x0B |
| #define | RDD_COLMOD 0x0C |
| #define | RDDIM 0x0D |
| #define | RDDSM 0x0E |
| #define | RDDSDR 0x0F |
| #define | SLPIN 0x10 |
| #define | SLPOUT 0x11 |
| #define | PTLON 0x12 |
| #define | NORON 0x13 |
| #define | INVOFF 0x20 |
| #define | INVON 0x21 |
| #define | GAMSET 0x26 |
| #define | DISPOFF 0x28 |
| #define | DISPON 0x29 |
| #define | CASET 0x2A |
| #define | RASET 0x2B |
| #define | RAMWR 0x2C |
| #define | RAMRD 0x2E |
| #define | PTLAR 0x30 |
| #define | VSCRDEF 0x33 |
| #define | TEOFF 0x34 |
| #define | TEON 0x35 |
| #define | MADCTL 0x36 |
| #define | VSCRSADD 0x37 |
| #define | IDMOFF 0x38 |
| #define | IDMON 0x39 |
| #define | COLMOD 0x3A |
| #define | RAMWRC 0x3C |
| #define | RAMRDC 0x3E |
| #define | TESCAN 0x44 |
| #define | RDTESCAN 0x45 |
| #define | WRDISBV 0x51 |
| #define | RDDISBV 0x52 |
| #define | WRCTRLD 0x53 |
| #define | RDCTRLD 0x54 |
| #define | WRCACE 0x55 |
| #define | RDCABC 0x56 |
| #define | WRCABCMB 0x5E |
| #define | RDCABCMB 0x5F |
| #define | RDABCSDR 0x68 |
| #define | RDID1 0xDA |
| #define | RDID2 0xDB |
| #define | RDID3 0xDC |
| #define | RAMCTRL 0xB0 |
| #define | RGBCTRL 0xB1 |
| #define | PORCTRL 0xB2 |
| #define | FRCTRL1 0xB3 |
| #define | GCTRL 0xB7 |
| #define | DGMEN 0xBA |
| #define | VCOMS 0xBB |
| #define | LCMCTRL 0xC0 |
| #define | IDSET 0xC1 |
| #define | VDVVRHEN 0xC2 |
| #define | VRHS 0xC3 |
| #define | VDVSET 0xC4 |
| #define | VCMOFSET 0xC5 |
| #define | FRCTRL2 0xC6 |
| #define | CABCCTRL 0xC7 |
| #define | REGSEL1 0xC8 |
| #define | REGSEL2 0xCA |
| #define | PWMFRSEL 0xCC |
| #define | PWCTRL1 0xD0 |
| #define | VAPVANEN 0xD2 |
| #define | CMD2EN { 0xDF, 0x5A, 0x69, 0x02 } |
| #define | PVGAMCTRL 0xE0 |
| #define | NVGAMCTRL 0xE1 |
| #define | DGMLUTR 0xE2 |
| #define | DGMLUTB 0xE3 |
| #define | GATECTRL 0xE4 |
| #define | PWCTRL2 0xE8 |
| #define | EQCTRL 0xE9 |
| #define | PROMCTRL 0xEC |
| #define | PROMEN 0xFA |
| #define | NVMSET 0xFC |
| #define | PROMACT 0xFE |
Functions | |
| void | st7789_init (void) |
| ST7789 initialization. | |
| void | st7789_clear (const uint16_t color) |
| Clears display. | |
| void | st7789_draw_glyph (const uint16_t xs, const uint16_t ys, const uint16_t glyph_width, const uint16_t glyph_height, const uint16_t fg_color, const uint16_t bg_color, const uint8_t *bitmap_data) |
| Draws a character glyph to the display. | |
Interface for ST7789 driver.
Contains functions for initializing the display, clearing, and rendering glyphs.
Definition in file st7789.h.
| void st7789_clear | ( | const uint16_t | color | ) |
Clears display.
Fills display with a single color, which can be thought of as "clearing" the scren.
| color | Color to fill display with upon clear. |
Definition at line 190 of file st7789.c.
| void st7789_draw_glyph | ( | const uint16_t | xs, |
| const uint16_t | ys, | ||
| const uint16_t | glyph_width, | ||
| const uint16_t | glyph_height, | ||
| const uint16_t | fg_color, | ||
| const uint16_t | bg_color, | ||
| const uint8_t * | bitmap_data ) |
Draws a character glyph to the display.
Takes coordinates, glyph dimensions, and bitmap data to display a character glyph on the screen.
| xs | Column to start drawing glyph. |
| ys | Row to start drawing glyph. |
| glyph_width | Width of passed glyph. |
| glyph_height | Height of passed glyph. |
| fg_color | Color |
| bg_color | |
| bitmap_data | Byte array containing glyph data. Each row is a single byte. |
Definition at line 206 of file st7789.c.
| void st7789_init | ( | void | ) |
ST7789 initialization.
Configures and initializes ST7789 for drawing.
Definition at line 108 of file st7789.c.