Browse Source

Simple UI layer -- responsible for clearing screen and setting basics

master
Adam Pippin 4 years ago
parent
commit
8f493308e9
  1. 22
      UI.cpp
  2. 2
      UI.h

22
UI.cpp

@ -0,0 +1,22 @@
#include <M5StickC.h>
#include "Kernel.h"
int UI(int pid, unsigned int signal)
{
if (signal & SIGNAL_START)
{
Kernel_signal_mask(pid, SIGNAL_START | SIGNAL_STOP | SIGNAL_REDRAW);
}
if (signal & SIGNAL_STOP)
{
return 255;
}
if (signal & SIGNAL_REDRAW)
{
M5.Lcd.fillScreen(TFT_DARKGREY);
M5.Lcd.setRotation(3);
M5.Lcd.setTextColor(TFT_WHITE, TFT_DARKGREY);
}
return 0;
}

2
UI.h

@ -0,0 +1,2 @@
int UI(int pid, unsigned int signal);
Loading…
Cancel
Save