23#define DISPLAY_WIDTH 0x00F0
26#define DISPLAY_HEIGHT 0x0140
65void 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);
79#define RDD_MADCTL 0x0B
80#define RDD_COLMOD 0x0C
142#define CMD2EN { 0xDF, 0x5A, 0x69, 0x02 }
143#define PVGAMCTRL 0xE0
144#define NVGAMCTRL 0xE1
163static const uint8_t madctl_init[] = { 0xC0 };
164static const uint8_t colmod_init[] = { 0x05 };
165static const uint8_t caset_init[] = { 0x00, 0x01, 0x00, 0x3F };
166static const uint8_t raset_init[] = { 0x00, 0x00, 0x00, 0xEF };
167static const uint8_t porctrl_init[] = { 0x0C, 0x0C, 0x00, 0x33, 0x33 };
168static const uint8_t gctrl_init[] = { 0x35 };
169static const uint8_t vcoms_init[] = { 0x1F };
170static const uint8_t lcmctrl_init[] = { 0x2C };
171static const uint8_t vdvvrhen_init[] = { 0x01 };
172static const uint8_t vrhs_init[] = { 0x12 };
173static const uint8_t vdvset_init[] = { 0x20 };
174static const uint8_t frctrl2_init[] = { 0x0F };
175static const uint8_t pwctrl1_init[] = { 0xA4, 0xA1 };
176static const uint8_t pvgamctrl_init[] = { 0xD0, 0x08, 0x11, 0x08, 0x0C, 0x15, 0x39, 0x33, 0x50, 0x36, 0x13, 0x14, 0x29, 0x2D };
177static const uint8_t nvgamctrl_init[] = { 0xD0, 0x08, 0x10, 0x08, 0x06, 0x06, 0x39, 0x44, 0x51, 0x0B, 0x16, 0x14, 0x2F, 0x31, 0x21 };
HAL interface for GPIO of SAM3X8E.
HAL interface for SPI peripheral of SAM3X8E.
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.
HAL interface for timer counter of SAM3X8E.