SWO+USB Serial+TouchScreen Demo

Dependencies:   BSP_DISCO_F429ZI LCD_DISCO_F429ZI SWO TS_DISCO_F429ZI USBDEVICE mbed storage_on_flash

Fork of DISCO-F429ZI_LCDTS_demo by ST

Files at this revision

API Documentation at this revision

Comitter:
pierrebizouard
Date:
Tue Mar 20 16:51:40 2018 +0000
Parent:
9:62df0b9df08d
Commit message:
updated arrays to const

Changed in this revision

logo_fastlite.c Show annotated file Show diff for this revision Revisions of this file
logos.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
ubuntu_font.c Show annotated file Show diff for this revision Revisions of this file
diff -r 62df0b9df08d -r 1e21661f4e04 logo_fastlite.c
--- a/logo_fastlite.c	Tue Mar 20 16:41:14 2018 +0000
+++ b/logo_fastlite.c	Tue Mar 20 16:51:40 2018 +0000
@@ -1,6 +1,6 @@
 #include "logos.h"
 
-const uint8_t big_fastlite_logo_68_302[] = {0x42,0x4d,0xde,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x44,
+uint8_t const big_fastlite_logo_68_302[] = {0x42,0x4d,0xde,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x44,
 0x00,0x00,0x00,0x2e,0x01,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0xa8,0xf0,0x00,0x00,0xc3,0x0e,0x00,0x00,0xc3,
 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
@@ -2571,7 +2571,7 @@
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00};
 
-const uint8_t fastlite_logo_90_20[] = {0x42,0x4d,0x76,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5a,
+uint8_t const fastlite_logo_90_20[] = {0x42,0x4d,0x76,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5a,
 0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0x00,0x00,0xc3,0x0e,0x00,0x00,0xc3,
 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
@@ -2802,7 +2802,7 @@
 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,
 0x00,0x00,0x00};
 
-const uint8_t fastlite_logo_landscape_90_20[] =  {0x42,0x4d,0xb6,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x15,
+uint8_t const fastlite_logo_landscape_90_20[] =  {0x42,0x4d,0xb6,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x15,
 0x00,0x00,0x00,0x5a,0x00,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x80,0x16,0x00,0x00,0xc3,0x0e,0x00,0x00,0xc3,
 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
@@ -3046,7 +3046,7 @@
 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,
 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00};
 
-const uint8_t fringeezz_logo_landscape_124_49[] = {0x42,0x4d,0xe6,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x31,
+uint8_t const fringeezz_logo_landscape_124_49[] = {0x42,0x4d,0xe6,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x31,
 0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0xb0,0x47,0x00,0x00,0xc3,0x0e,0x00,0x00,0xc3,
 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
@@ -3815,7 +3815,7 @@
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0x00};
 
-const uint8_t big_fringezz_logo_91_233[] = {0x42,0x4d,0x6a,0xfb,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5b,
+uint8_t const big_fringezz_logo_91_233[] = {0x42,0x4d,0x6a,0xfb,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5b,
 0x00,0x00,0x00,0xe9,0x00,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x34,0xfb,0x00,0x00,0xc3,0x0e,0x00,0x00,0xc3,
 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
 0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
diff -r 62df0b9df08d -r 1e21661f4e04 logos.h
--- a/logos.h	Tue Mar 20 16:41:14 2018 +0000
+++ b/logos.h	Tue Mar 20 16:51:40 2018 +0000
@@ -8,15 +8,15 @@
 /* Includes ------------------------------------------------------------------*/
 #include <stdint.h>
 
-extern const uint8_t big_fastlite_logo_68_302[];
+extern uint8_t const big_fastlite_logo_68_302[];
 
-extern const uint8_t fastlite_logo_90_20[];
+extern uint8_t const fastlite_logo_90_20[];
 
-extern const uint8_t fastlite_logo_landscape_90_20[];
+extern uint8_t const fastlite_logo_landscape_90_20[];
 
-extern const uint8_t fringeezz_logo_landscape_124_49[];
+extern uint8_t const fringeezz_logo_landscape_124_49[];
 
-extern const uint8_t big_fringezz_logo_91_233[];
+extern uint8_t const big_fringezz_logo_91_233[];
 
 #ifdef __cplusplus
 }
diff -r 62df0b9df08d -r 1e21661f4e04 main.cpp
--- a/main.cpp	Tue Mar 20 16:41:14 2018 +0000
+++ b/main.cpp	Tue Mar 20 16:51:40 2018 +0000
@@ -239,7 +239,7 @@
     BSP_LCD_SetLayerVisible_NoReload(layer, ENABLE);
     LCD_Reload_Safe();
     lcd.Clear(LCD_COLOR_BLUE);
-    uint8_t* pBmp = (uint8_t*)big_fastlite_logo_68_302;
+    uint8_t* pBmp = const_cast<uint8_t*>(big_fastlite_logo_68_302);
     lcd.DrawBitmap((lcd.GetYSize()-302)/2, (lcd.GetXSize()-68)/2, pBmp);
 }
 
@@ -253,7 +253,7 @@
     BSP_LCD_SetFont(&UbuntuFont23);
     
     lcd.Clear(LCD_COLOR_BLUE);
-    uint8_t* pBmp = (uint8_t*)big_fastlite_logo_68_302;
+    uint8_t* pBmp = (uint8_t*)(big_fastlite_logo_68_302);
     lcd.DrawBitmap((lcd.GetYSize()-302)/2, 0, pBmp);
     
     sprintf((char*)text, "TEC interface");
@@ -469,16 +469,16 @@
     
     //FASTLITE LOGO + LINE
     DrawRectCentered(lcd.GetYSize()/2, lcd.GetXSize()-6, lcd.GetYSize(), 2);
-    uint8_t* pBmp = (uint8_t*)fastlite_logo_landscape_90_20;
+    uint8_t* pBmp = (uint8_t*)(fastlite_logo_landscape_90_20);
     lcd.DrawBitmap(lcd.GetYSize()-90, lcd.GetXSize()-20, pBmp);
     
     
     //FRINGEEZZ LOGO
     #ifdef DEBUG
-        pBmp = (uint8_t*)fringeezz_logo_landscape_124_49;
+        pBmp = (uint8_t*)(fringeezz_logo_landscape_124_49);
         lcd.DrawBitmap(0, lcd.GetXSize()-20-49-40, pBmp);
     #else
-        pBmp = (uint8_t*)big_fringezz_logo_91_233;
+        pBmp = (uint8_t*)(big_fringezz_logo_91_233);
         lcd.DrawBitmap(5, 5, pBmp);    
     #endif
     
@@ -501,7 +501,7 @@
     lcd.SetTextColor(LCD_COLOR_WHITE);
     lcd.Clear(LCD_COLOR_BLUE);
     
-    uint8_t* pBmp = (uint8_t*)fringeezz_logo_landscape_124_49;
+    uint8_t* pBmp = (uint8_t*)(fringeezz_logo_landscape_124_49);
     lcd.DrawBitmap(1, 1, pBmp);
    
     lcd.SetBackColor(LCD_COLOR_BLUE);
@@ -568,7 +568,7 @@
     
     //FASTLITE LOGO + LINE
     DrawRectCentered(lcd.GetYSize()/2, lcd.GetXSize()-6, lcd.GetYSize(), 2);
-    pBmp = (uint8_t*)fastlite_logo_landscape_90_20;
+    pBmp = (uint8_t*)(fastlite_logo_landscape_90_20);
     lcd.DrawBitmap(lcd.GetYSize()-90, lcd.GetXSize()-20, pBmp);
 }
 
@@ -832,7 +832,7 @@
         accel = 0;   
       }
       
-      if (start_swipe && ((selected_screen == 1) && (swipe_dir == +1)) || ((selected_screen == -2) && (swipe_dir == -1)))
+      if (start_swipe && (((selected_screen == 1) && (swipe_dir == +1)) || ((selected_screen == -2) && (swipe_dir == -1))))
       {
           start_swipe = false;
       } 
diff -r 62df0b9df08d -r 1e21661f4e04 ubuntu_font.c
--- a/ubuntu_font.c	Tue Mar 20 16:41:14 2018 +0000
+++ b/ubuntu_font.c	Tue Mar 20 16:51:40 2018 +0000
@@ -12,7 +12,7 @@
 
 //char size h23 x w13 x count 145.0 chars
 //char size h23 x w13 x count 145.0 chars
-const uint8_t font23x13_Table[] = {
+uint8_t const font23x13_Table[] = {
 //char  
 0x00,0x00, //             //
 0x00,0x00, //             //