Skip to content
Snippets Groups Projects

Add display module

Merged Gerd requested to merge gerd/firmware:gerd/module/display into master
Compare and
10 files
+ 343
1
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 76
0
#include "tmr_utils.h"
#include "gpio.h"
#include "GUI_DEV/GUI_Paint.h"
#include "Fonts/fonts.h"
#include "tmr.h"
enum locktype {
LOCK_NONE = 0,
LOCK_EPICARDIUM,
LOCK_PYCARDIUM
};
enum locktype lock = LOCK_NONE;
void epic_disp_print_string(
uint16_t posx, uint16_t posy, char *pString, uint16_t fg, uint16_t bg
) {
Paint_DrawString_EN(posx, posy, pString, &Font20, bg, fg);
}
void epic_disp_clear(uint16_t color)
{
LCD_Clear(color);
}
void epic_disp_line(
uint16_t xstart,
uint16_t ystart,
uint16_t xend,
uint16_t yend,
uint16_t color,
uint16_t linestyle,
uint16_t pixelsize
) {
Paint_DrawLine(xstart, ystart, xend, yend, color, linestyle, pixelsize);
}
void epic_disp_rect(
uint16_t xstart,
uint16_t ystart,
uint16_t xend,
uint16_t yend,
uint16_t color,
uint16_t fillstyle,
uint16_t pixelsize
) {
Paint_DrawRectangle(
xstart, ystart, xend, yend, color, fillstyle, pixelsize
);
}
void epic_disp_circ(
uint16_t x,
uint16_t y,
uint16_t rad,
uint16_t color,
uint16_t fillstyle,
uint16_t pixelsize
) {
Paint_DrawCircle(x, y, rad, color, fillstyle, pixelsize);
}
void epic_disp_update()
{
LCD_Update();
}
int epic_disp_open()
{
if(lock != LOCK_NONE) {
return 28; // ERNOSPC
} else {
lock = LOCK_PYCARDIUM;
return 0;
}
}
\ No newline at end of file
Loading