diff --git a/UI.cpp b/UI.cpp new file mode 100644 index 0000000..454e034 --- /dev/null +++ b/UI.cpp @@ -0,0 +1,22 @@ +#include +#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; +} diff --git a/UI.h b/UI.h new file mode 100644 index 0000000..fb3fa97 --- /dev/null +++ b/UI.h @@ -0,0 +1,2 @@ + +int UI(int pid, unsigned int signal);