Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TS_DISCO_F746NG LCD_DISCO_F746NG BSP_DISCO_F746NG BUTTON_GROUP
Revision 5:0bc53196fbf4, committed 2019-01-28
- Comitter:
- gscuttari
- Date:
- Mon Jan 28 10:08:04 2019 +0000
- Parent:
- 4:b412dc13a88e
- Commit message:
- 3
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jan 28 09:43:52 2019 +0000
+++ b/main.cpp Mon Jan 28 10:08:04 2019 +0000
@@ -21,30 +21,6 @@
const uint32_t BACK_COLOR = 0xFF006A6C;
-void screen_setup_menu(void);
-
-void init_lcd(void)
-{
- lcd_.Clear(LCD_COLOR_WHITE);
- printf("********** start INIT_LCD *********\n");
- lcd_.SetBackColor(LCD_COLOR_WHITE);
- lcd_.SetTextColor(LCD_COLOR_BLACK);
- lcd_.DisplayStringAt(0, LINE(1), (uint8_t *)"LEZIONE 1", CENTER_MODE);
-
- wait(1.5);
-
- lcd_.Clear(LCD_COLOR_BLACK);
- lcd_.SetBackColor(LCD_COLOR_BLACK);
- lcd_.SetTextColor(LCD_COLOR_WHITE);
- lcd_.SetFont(&Font16);
- lcd_.DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN INIT OK", CENTER_MODE);
-
- wait(0.5);
- lcd_.SetFont(&Font16);
- screen_setup_menu();
-}
-
-
void screen_setup_menu(void)
{
using namespace Mikami;
@@ -61,7 +37,7 @@
bool exitFromLoop = false;
while (!exitFromLoop) {
if (menu.Touched(8, LCD_COLOR_GREEN)) {
- wait(200);
+ wait(0.2);
lcd_.Clear(BACK_COLOR);
//writeFlash();
@@ -85,21 +61,45 @@
- wait(100);
+ wait(0.2);
}
return;
}
+void init_lcd(void)
+{
+ lcd_.Clear(LCD_COLOR_WHITE);
+ pc.printf("********** start INIT_LCD *********\n");
+ lcd_.SetBackColor(LCD_COLOR_WHITE);
+ lcd_.SetTextColor(LCD_COLOR_BLACK);
+ lcd_.DisplayStringAt(0, LINE(1), (uint8_t *)"LEZIONE 1", CENTER_MODE);
+
+ wait(1.5);
+
+ lcd_.Clear(LCD_COLOR_BLACK);
+ lcd_.SetBackColor(LCD_COLOR_BLACK);
+ lcd_.SetTextColor(LCD_COLOR_WHITE);
+ lcd_.SetFont(&Font16);
+ lcd_.DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN INIT OK", CENTER_MODE);
+
+ wait(0.5);
+ lcd_.SetFont(&Font16);
+ screen_setup_menu();
+}
+
+
+
int main()
{
pc.baud(115200);
- printf("START...\n");
- wait(2000);
+ pc.printf("START...\n");
+ //wait(2000);
init_lcd(); // inizializzazione lcd e touch screen
lcd_.SetFont(&Font16);
- wait(2000);
+ //wait(2000);
+ screen_setup_menu();
}