![](/media/cache/profiles/eaa6b3305e7ecaf165c780ff4c56708d.jpg.50x50_q85.jpg)
Demo to control 4 LEDs
Dependencies: BSP_DISCO_F469NI mbed
Diff: Widgets/Widget.h
- Revision:
- 1:a6d179a9ffbb
- Parent:
- 0:e06404fdff2f
- Child:
- 2:e6fc24fbd86c
--- a/Widgets/Widget.h Wed Oct 11 22:26:45 2017 +0000 +++ b/Widgets/Widget.h Tue Oct 31 14:39:54 2017 +0000 @@ -20,27 +20,30 @@ #include "LCD_F469.h" #include "TS_F469.h" +#include "WidgetTimer.h" class Widget { private: protected: - Widget(uint16_t x, uint16_t y, uint16_t width, uint16_t height, - color_t backClr, color_t textClr = LCD_COLOR_WHITE) : + Widget(const uint16_t x, const uint16_t y, const uint16_t width, + const uint16_t height, const color_t backClr, + const color_t textClr = LCD_COLOR_WHITE) : xPos(x), yPos(y), xDim(width), yDim(height), backColor(backClr), textColor(textClr) {} - uint16_t xPos; - uint16_t yPos; - uint16_t xDim; - uint16_t yDim; + const uint16_t xPos; + const uint16_t yPos; + const uint16_t xDim; + const uint16_t yDim; - color_t backColor; - color_t textColor; + const color_t backColor; + const color_t textColor; static Display LCD; static TouchScreen TS; + static WidgetTimer timer; public: virtual ~Widget() = 0;