Move to Native SPI implementations of ILI9341 and STMPE610

This commit is contained in:
Pim van Pelt
2017-12-01 13:57:43 +01:00
parent 5b80d88b86
commit eab5f31a92
36 changed files with 71 additions and 10325 deletions

View File

@ -1,16 +1,18 @@
#include "mgos.h"
#include "tft.h"
#include "mongoose-touch.h"
static void widget_default_draw(struct widget_t *w, color_t color) {
static void widget_default_draw(struct widget_t *w, uint16_t color) {
if (!w)
return;
mgos_ili9341_setclipwin(w->x, w->y, w->x+w->w, w->y+w->h);
mgos_ili9341_set_window(w->x, w->y, w->x+w->w, w->y+w->h);
mgos_ili9341_drawRoundRect(0, 0, w->w, w->h, 8, color);
mgos_ili9341_set_fgcolor565(color);
mgos_ili9341_drawRoundRect(0, 0, w->w, w->h, 8);
/*
if (w->img)
mgos_ili9341_png(0, 0, w->img);
*/
}
void widget_default_ev(int ev, struct widget_t *w, void *ev_data) {