55#define ST7789V3_backlight
57#define Sleep_Out 0x11U
60#define Display_On_Register 0x29U
61#define Display_Off_Register 0x28U
69#define INVOFF_REG 0x20U
70#define INVON_REG 0x21U
79#define BLACK 0x000000U
80#define WHITE 0xFFFFFFU
82#define GREEN 0x00FF00U
84#define YELLOW 0xFFFF00U
86#define MAGENTA 0xFF00FFU
87#define ORANGE 0xFF6A00U
89#define PURPLE 0x800080U
92#define DARK_GREEN 0x006400U
93#define MAROON 0x800000U
94#define OLIVE 0x808000U
96#define SILVER 0xC0C0C0U
98#define DARK_GRAY 0x404040U
99#define LIGHT_GRAY 0xD3D3D3U
100#define GOLD 0xFFD700U
101#define SKY_BLUE 0x87CEEBU
201 const uint8_t *pData);
256 uint16_t Y_Start, uint16_t Y_End);
339 uint32_t hexcolor,
const FontDef *font);
374 const char *str, uint32_t hexcolor,
const FontDef *font);
387 uint16_t y1, uint32_t hexcolor);
400 uint16_t width, uint16_t height, uint32_t hexcolor);
413 uint16_t width, uint16_t height, uint32_t hexcolor);
425 uint16_t radius, uint32_t hexcolor);
437 uint16_t y_center, uint16_t radius, uint32_t hexcolor);
460 const uint8_t *buf, uint16_t len);
Bitmap font definitions used by the ST7789V3 text drawing API.
void DrawChar(ST7789V3_Config *config, uint16_t x, uint16_t y, char user_char, uint32_t hexcolor, const FontDef *font)
Draw a single printable ASCII character.
Definition ST7789V3.c:263
void InvertDisplay(ST7789V3_Config *config, Inversion_Mode Inversion)
Enable or disable display inversion.
Definition ST7789V3.c:107
Sleep_State
Sleep state selection for the display.
Definition ST7789V3.h:146
void FillScreen(ST7789V3_Config *config, uint32_t hexcolor)
Fill the entire display with a single color.
Definition ST7789V3.c:228
void ST7789V3_init(ST7789V3_Config *config)
Initialize the display and apply the default startup sequence.
Definition ST7789V3.c:32
int8_t SetWindow(ST7789V3_Config *config, uint16_t X_Start, uint16_t X_End, uint16_t Y_Start, uint16_t Y_End)
Set the active drawing window on the display.
Definition ST7789V3.c:123
void ST7789V3_DMA_Complete(ST7789V3_Config *config)
Finish a successful DMA transfer and run the completion callback.
Definition ST7789V3.c:559
GPIO_Pinstate
Logical output level used by GPIO control callbacks.
Definition ST7789V3.h:113
Trans_State
Select whether the current SPI byte stream is command or pixel/data content.
Definition ST7789V3.h:121
int8_t DrawPixel(ST7789V3_Config *config, uint16_t x, uint16_t y, uint32_t hexcolor)
Draw a single pixel using a 24-bit RGB888 input color.
Definition ST7789V3.c:239
void DrawString(ST7789V3_Config *config, uint16_t x, uint16_t y, const char *str, uint32_t hexcolor, const FontDef *font)
Draw a null-terminated string.
Definition ST7789V3.c:340
void SleepMode(ST7789V3_Config *config, Sleep_State sleepstate)
Put the display into sleep mode or wake it up.
Definition ST7789V3.c:169
Orientation
Logical display orientation used by SetRotation.
Definition ST7789V3.h:154
Inversion_Mode
Display inversion mode selection.
Definition ST7789V3.h:138
void SetRotation(ST7789V3_Config *config, Orientation orientation)
Change the logical display rotation.
Definition ST7789V3.c:295
void(* ST7789V3_Callback)(ST7789V3_Config *config, void *user_data)
Callback signature used for DMA completion and error notifications.
Definition ST7789V3.h:182
void DrawFilledRectangle(ST7789V3_Config *config, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint32_t hexcolor)
Draw a filled rectangle.
Definition ST7789V3.c:458
void HardReset(ST7789V3_Config *config)
Toggle the hardware reset line using the driver's reset sequence.
Definition ST7789V3.c:98
int8_t SetColorMode(ST7789V3_Config *config, Color_Mode bitdepth)
Set the controller pixel format.
Definition ST7789V3.c:79
void ST7789V3_DMA_Error(ST7789V3_Config *config)
Finish a failed DMA transfer and run the error callback.
Definition ST7789V3.c:568
Color_Mode
Pixel format written to the display controller.
Definition ST7789V3.h:129
void DrawCircle(ST7789V3_Config *config, uint16_t x_center, uint16_t y_center, uint16_t radius, uint32_t hexcolor)
Draw a circle outline using the midpoint circle algorithm.
Definition ST7789V3.c:476
void DISPLAYON(ST7789V3_Config *config)
Enable display output.
Definition ST7789V3.c:87
void DrawLine(ST7789V3_Config *config, uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint32_t hexcolor)
Draw a line between two points using Bresenham's algorithm.
Definition ST7789V3.c:404
ST7789V3_State
Driver transfer state used for DMA operations.
Definition ST7789V3.h:164
int8_t ST7789V3_WriteBuffer_DMA(ST7789V3_Config *config, const uint8_t *buf, uint16_t len)
Start a non-blocking DMA write of pixel data to the display.
Definition ST7789V3.c:532
void DrawRectangle(ST7789V3_Config *config, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint32_t hexcolor)
Draw an unfilled rectangle outline.
Definition ST7789V3.c:440
void DISPLAYOFF(ST7789V3_Config *config)
Disable display output.
Definition ST7789V3.c:91
void DrawFilledCircle(ST7789V3_Config *config, uint16_t x_center, uint16_t y_center, uint16_t radius, uint32_t hexcolor)
Draw a filled circle using the midpoint circle algorithm.
Definition ST7789V3.c:505
@ Asleep
Definition ST7789V3.h:147
@ Awake
Definition ST7789V3.h:148
@ HIGH
Definition ST7789V3.h:114
@ LOW
Definition ST7789V3.h:115
@ CMD
Definition ST7789V3.h:123
@ DATA
Definition ST7789V3.h:122
@ Landscape_Inverted
Definition ST7789V3.h:158
@ Portrait
Definition ST7789V3.h:155
@ Portrait_Inverted
Definition ST7789V3.h:157
@ Landscape
Definition ST7789V3.h:156
@ INVON
Definition ST7789V3.h:139
@ INVOFF
Definition ST7789V3.h:140
@ bit_16
Definition ST7789V3.h:131
@ bit_12
Definition ST7789V3.h:130
@ bit_18
Definition ST7789V3.h:132
@ ST7789_STATE_ERROR
Definition ST7789V3.h:167
@ ST7789_STATE_BUSY
Definition ST7789V3.h:166
@ ST7789_STATE_READY
Definition ST7789V3.h:165
Describes one monochrome bitmap font.
Definition fonts.h:17
Runtime configuration and hardware binding for one display instance.
Definition ST7789V3.h:199
uint16_t LCD_Height
Definition ST7789V3.h:211
uint8_t Row_Offset
Definition ST7789V3.h:214
int8_t(* set_rst)(GPIO_Pinstate state)
Definition ST7789V3.h:207
int8_t(* set_backlight)(GPIO_Pinstate state)
Definition ST7789V3.h:208
void * callback_user_data
Definition ST7789V3.h:222
uint16_t LCD_Width
Definition ST7789V3.h:210
Color_Mode Bit_Depth
Definition ST7789V3.h:216
void(* delay_ms)(uint32_t milliseconds)
Definition ST7789V3.h:203
volatile ST7789V3_State State
Definition ST7789V3.h:218
int8_t(* set_dc)(Trans_State state)
Definition ST7789V3.h:206
Inversion_Mode Inversion_Mode
Definition ST7789V3.h:217
int8_t(* set_cs)(GPIO_Pinstate state)
Definition ST7789V3.h:205
ST7789V3_Callback tx_complete_callback
Definition ST7789V3.h:220
uint8_t Col_Offset
Definition ST7789V3.h:213
ST7789V3_Callback tx_error_callback
Definition ST7789V3.h:221
int8_t(* spi_write_dma)(uint16_t len, const uint8_t *pData)
Definition ST7789V3.h:202
int8_t(* spi_write)(uint16_t len, const uint8_t *pData)
Definition ST7789V3.h:200