54 lines
1.9 KiB
C
54 lines
1.9 KiB
C
#ifndef __LCD_H__
|
|
#define __LCD_H__
|
|
|
|
#include "../App/config.h"
|
|
#include "stc32g.h"
|
|
|
|
// Color Constants (RGB565)
|
|
#define COLOR_BLACK 0x0000
|
|
#define COLOR_WHITE 0xFFFF
|
|
#define COLOR_CYAN 0x073F
|
|
#define COLOR_RED 0xF800
|
|
#define COLOR_GREEN 0x07E0
|
|
#define COLOR_BLUE 0x001F
|
|
#define COLOR_GRAY 0x5AEB
|
|
#define COLOR_AMBER 0xFDC0
|
|
|
|
// Public screen functions
|
|
void SGM_SendPulse(u8 pulse_cnt);
|
|
void LCD_Reset(void);
|
|
void LCD_Init(void);
|
|
void LCD_SetWindow(u16 x_start, u16 x_end, u16 y_start, u16 y_end);
|
|
void LCD_Clear(u16 color);
|
|
|
|
// Drawing Primitives
|
|
void LCD_FillRect(u16 x, u16 y, u16 w, u16 h, u16 color);
|
|
void LCD_DrawRectBorder(u16 x, u16 y, u16 w, u16 h, u16 color);
|
|
void LCD_DrawMonoBitmap(u16 x, u16 y, u16 w, u16 h, unsigned char code *bmp, u16 color, u16 bg_color);
|
|
void LCD_ShowChar8x16(u16 x, u16 y, char ch, u16 color, u16 bg_color);
|
|
void LCD_ShowString(u16 x, u16 y, char *str, u16 color, u16 bg_color);
|
|
void LCD_ShowStringCentered(u16 y, char *str, u16 color, u16 bg_color);
|
|
void LCD_ShowChar16x32(u16 x, u16 y, char ch, u16 color, u16 bg_color);
|
|
void LCD_ShowString16x32(u16 x, u16 y, char *str, u16 color, u16 bg_color);
|
|
void LCD_ShowString16x32Centered(u16 y, char *str, u16 color, u16 bg_color);
|
|
|
|
|
|
|
|
// Font and Bitmap externs (defined in lcd_font.h via lcd.c)
|
|
extern unsigned char code FONT_8x16[95][16];
|
|
extern unsigned char code bmp_battery_20x10[];
|
|
extern unsigned char code bmp_lock_16x16[];
|
|
extern unsigned char code bmp_unlock_16x16[];
|
|
extern unsigned char code bmp_radar_32x32_f1[];
|
|
extern unsigned char code bmp_radar_32x32_f2[];
|
|
extern unsigned char code bmp_radar_32x32_f3[];
|
|
extern unsigned char code bmp_confirm_lock_32x32[];
|
|
extern unsigned char code bmp_checkmark_32x32[];
|
|
extern unsigned char code bmp_cross_32x32[];
|
|
extern unsigned char code bmp_door_32x32[];
|
|
extern unsigned char code bmp_siren_32x32[];
|
|
|
|
#endif
|
|
|
|
// Touched to align with doc updates V3
|