Interfaçage NeoPixel Ring 12, LPRO MECSE, Arnaud A.

Committer:
Rhamao
Date:
Mon Jun 15 03:21:35 2020 +0000
Revision:
4:b4c30f6f526e
Parent:
2:fd11fb4d51f8
Child:
5:c4038609e806
Change led color on interface working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhamao 0:eccd33c01946 1 #ifndef BUTTON_H
Rhamao 0:eccd33c01946 2 #define BUTTON_H
Rhamao 0:eccd33c01946 3 #include "stm32746g_discovery_lcd.h"
Rhamao 0:eccd33c01946 4 class Button
Rhamao 0:eccd33c01946 5 {
Rhamao 0:eccd33c01946 6
Rhamao 0:eccd33c01946 7 public:
Rhamao 0:eccd33c01946 8 Button(int x = 50, int y = 50, int width = 50, int height = 30, uint32_t bgColor = LCD_COLOR_LIGHTGRAY, uint32_t borderWidth = 1);
Rhamao 0:eccd33c01946 9 void setText(const char *str, uint32_t textColor = LCD_COLOR_BLACK);
Rhamao 0:eccd33c01946 10 bool contain(int x, int y);
Rhamao 0:eccd33c01946 11 void draw();
Rhamao 0:eccd33c01946 12 int strlen(uint8_t *str);
Rhamao 0:eccd33c01946 13 bool etat(){return m_etat;}
Rhamao 1:3ce68d55dfb8 14 uint8_t* getText();
Rhamao 2:fd11fb4d51f8 15 void setBackgroundColor(uint32_t color);
Rhamao 4:b4c30f6f526e 16 void setBorderWidth(uint32_t borderWidth);
Rhamao 0:eccd33c01946 17
Rhamao 0:eccd33c01946 18 private :
Rhamao 0:eccd33c01946 19 bool m_etat = false;
Rhamao 0:eccd33c01946 20 int16_t m_x = 0;
Rhamao 0:eccd33c01946 21 int16_t m_y = 0;
Rhamao 0:eccd33c01946 22 int16_t m_width = 50;
Rhamao 0:eccd33c01946 23 int16_t m_height = 30;
Rhamao 0:eccd33c01946 24 uint32_t m_bgColor = LCD_COLOR_LIGHTGRAY;
Rhamao 0:eccd33c01946 25 uint32_t m_borderColor = LCD_COLOR_GRAY;
Rhamao 0:eccd33c01946 26 uint32_t m_textColor = LCD_COLOR_BLACK;
Rhamao 0:eccd33c01946 27 uint32_t m_borderWidth = 1;
Rhamao 0:eccd33c01946 28 uint8_t m_text[30];
Rhamao 0:eccd33c01946 29 };
Rhamao 0:eccd33c01946 30 #endif