Une horloge à afficheurs 7 segments

Dependencies:   BSP_DISCO_F746NG

Committer:
sol427
Date:
Mon Jun 22 16:33:43 2020 +0000
Revision:
4:06a5a25319d5
Horloge fonctionnelle

Who changed what in which revision?

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