Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which are per-display and are the only part needed to be adapted to diff hw.

Dependents:   testUniGraphic_150217 maze_TFT_MMA8451Q TFT_test_frdm-kl25z TFT_test_NUCLEO-F411RE ... more

Files at this revision

API Documentation at this revision

Comitter:
Geremia
Date:
Tue Jan 25 17:57:55 2022 +0000
Parent:
33:f87f06292637
Commit message:
align attribute fixed to gcc style, updated to OS6 then got bored

Changed in this revision

Font/Arial12x12.h Show annotated file Show diff for this revision Revisions of this file
Font/Arial24x23.h Show annotated file Show diff for this revision Revisions of this file
Font/Arial28x28.h Show annotated file Show diff for this revision Revisions of this file
Font/Arial43x48_numb.h Show annotated file Show diff for this revision Revisions of this file
Font/Terminal6x8.h Show annotated file Show diff for this revision Revisions of this file
Inits/ILI9327.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/ILI932x.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/ILI9341.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/ILI9486.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/IST3020.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/S6D04D1.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/SEPS225.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/SSD1306.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/ST7565.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/TFT_MIPI.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/UC1608.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/BUS16.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/BUS8.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/PAR16.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/PAR8.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/SPI16.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/SPI8.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f87f06292637 -r c66986d80f72 Font/Arial12x12.h
--- a/Font/Arial12x12.h	Mon Feb 06 12:29:33 2017 +0000
+++ b/Font/Arial12x12.h	Tue Jan 25 17:57:55 2022 +0000
@@ -5,12 +5,12 @@
 
 /** Arial Font with 12*12 matrix to use with SPI_TFT lib
  */ 
-#ifdef TOOLCHAIN_GCC
+//#ifdef TOOLCHAIN_GCC
 const unsigned char Arial12x12[] __attribute__((aligned (2))) = {
-#else     
-__align(2) 
-const unsigned char Arial12x12[] = {
-#endif        
+//#else     
+//__align(2) 
+//const unsigned char Arial12x12[] = {
+//#endif        
         0xFF/*unused*/,12,12,0xFF/*unused*/,                                                                           // Length,horz,vert,byte/vert
         0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char  
         0x02, 0x00, 0x00, 0x7F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char !
diff -r f87f06292637 -r c66986d80f72 Font/Arial24x23.h
--- a/Font/Arial24x23.h	Mon Feb 06 12:29:33 2017 +0000
+++ b/Font/Arial24x23.h	Tue Jan 25 17:57:55 2022 +0000
@@ -7,12 +7,12 @@
 
 /** Arial Font with 24x23 pixel matrix for uas with the SPI_TFT lib
 */
-#ifdef TOOLCHAIN_GCC
+//#ifdef TOOLCHAIN_GCC
 const unsigned char Arial24x23[] __attribute__((aligned (2))) = {
-#else
-__align(2)
-const unsigned char Arial24x23[] = {
-#endif     
+//#else
+//__align(2)
+//const unsigned char Arial24x23[] = {
+//#endif     
         0xFF/*unused*/,24,23,0xFF/*unused*/,
         0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char  
         0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x30, 0x01, 0x00, 0x0F, 0x00, 0xE0, 0x03, 0x00, 0x7C, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char !
diff -r f87f06292637 -r c66986d80f72 Font/Arial28x28.h
--- a/Font/Arial28x28.h	Mon Feb 06 12:29:33 2017 +0000
+++ b/Font/Arial28x28.h	Tue Jan 25 17:57:55 2022 +0000
@@ -7,11 +7,11 @@
 
 /** Arial Font italic with 27*28 pixel matrix for use with SPI_TFT lib
 */
-#ifdef TOOLCHAIN_GCC
+//#ifdef TOOLCHAIN_GCC
 const unsigned char Arial28x28[] __attribute__((aligned (2))) = {
-#else
-__align(2)
-const unsigned char Arial28x28[] = {
+//#else
+//__align(2)
+//const unsigned char Arial28x28[] = {
 #endif
 0xFF/*unused*/,28,28,0xFF/*unused*/,
 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
diff -r f87f06292637 -r c66986d80f72 Font/Arial43x48_numb.h
--- a/Font/Arial43x48_numb.h	Mon Feb 06 12:29:33 2017 +0000
+++ b/Font/Arial43x48_numb.h	Tue Jan 25 17:57:55 2022 +0000
@@ -6,12 +6,12 @@
 //GLCD FontSize : 43 x 48
 
 // big font but only numbers (ascii 46-58)
-#ifdef TOOLCHAIN_GCC
+//#ifdef TOOLCHAIN_GCC
 const unsigned char Arial43x48_numb[] __attribute__((aligned (2))) = {
-#else
-__align(2)
-const unsigned char Arial43x48_numb[] = {
-#endif     
+//#else
+//__align(2)
+//const unsigned char Arial43x48_numb[] = {
+//#endif     
         0xFF/*unused*/, 43, 48, 0xFF/*unused*/,
         0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char .
         0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char /
diff -r f87f06292637 -r c66986d80f72 Font/Terminal6x8.h
--- a/Font/Terminal6x8.h	Mon Feb 06 12:29:33 2017 +0000
+++ b/Font/Terminal6x8.h	Tue Jan 25 17:57:55 2022 +0000
@@ -4,12 +4,13 @@
 
 //GLCD FontName : Terminal6x8
 //GLCD FontSize : 6 x 8
-#ifdef TOOLCHAIN_GCC
+
+//#ifdef TOOLCHAIN_GCC
 const unsigned char Terminal6x8[] __attribute__((aligned (2))) = {
-#else
-__align(2)
-const unsigned char Terminal6x8[] = {
-#endif		
+//#else
+//__align(2)
+//const unsigned char Terminal6x8[] = {
+//#endif		
 		0xFF/*unused*/,6,8,0xFF/*unused*/,
         0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char  
         0x05, 0x00, 0x00, 0x06, 0x5F, 0x06, 0x00,  // Code for char !
diff -r f87f06292637 -r c66986d80f72 Inits/ILI9327.cpp
--- a/Inits/ILI9327.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/ILI9327.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -68,7 +68,7 @@
 void ILI9327::init()
 {
     wr_cmd8(0x11);
-    wait_ms(150);
+    thread_sleep_for(150);
     
     wr_cmd8(0xF3); //Set EQ 
     wr_data8(0x08);    
@@ -148,6 +148,6 @@
     wr_data8(0x80);  // enable
     
     wr_cmd8(0x29);  // Set_display_on  
-    wait_ms(150);
+    thread_sleep_for(150);
     
 }
\ No newline at end of file
diff -r f87f06292637 -r c66986d80f72 Inits/ILI932x.cpp
--- a/Inits/ILI932x.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/ILI932x.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -77,21 +77,21 @@
  reg_write(0x0012,0x0000);  
  reg_write(0x0013,0x0000); 
  reg_write(0x0007,0x0001);
-wait_ms(200);
+thread_sleep_for(200);
 //vgh 
  reg_write(0x0010,0x1290);   
  reg_write(0x0011,0x0227);
-wait_ms(50);
+thread_sleep_for(50);
  //vregiout 
  reg_write(0x0012,0x001d); //0x001b
- wait_ms(50);
+ thread_sleep_for(50);
  //vom amplitude
  reg_write(0x0013,0x1500);
- wait_ms(50); 
+ thread_sleep_for(50); 
  //vom H
  reg_write(0x0029,0x0018); 
  reg_write(0x002B,0x000D); 
-wait_ms(50);
+thread_sleep_for(50);
 //gamma
  reg_write(0x0030,0x0004);
  reg_write(0x0031,0x0307);
@@ -151,21 +151,21 @@
  reg_write(0x0012,0x0000);  
  reg_write(0x0013,0x0000); 
  reg_write(0x0007,0x0001);
-wait_ms(200);
+thread_sleep_for(200);
 
  reg_write(0x0010,0x10C0);   
  reg_write(0x0011,0x0007);
-wait_ms(50);
+thread_sleep_for(50);
 
  reg_write(0x0012,0x0110);
- wait_ms(50);
+ thread_sleep_for(50);
 
  reg_write(0x0013,0x0b00);
- wait_ms(50); 
+ thread_sleep_for(50); 
 
  reg_write(0x0029,0x0000); 
  reg_write(0x002B,0x4010); // bit 14???
-wait_ms(50);
+thread_sleep_for(50);
 //gamma
 /*
  reg_write(0x0030,0x0004);
diff -r f87f06292637 -r c66986d80f72 Inits/ILI9341.cpp
--- a/Inits/ILI9341.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/ILI9341.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -171,9 +171,9 @@
     wr_cmd8(0x13); // Nomal Displaymode
     
      wr_cmd8(0x11);                     // sleep out
-     wait_ms(150);
+     thread_sleep_for(150);
      
      wr_cmd8(0x29);                     // display on
-     wait_ms(150);
+     thread_sleep_for(150);
 
 }
\ No newline at end of file
diff -r f87f06292637 -r c66986d80f72 Inits/ILI9486.cpp
--- a/Inits/ILI9486.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/ILI9486.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -146,8 +146,8 @@
     wr_cmd8(0x13); // Nomal Displaymode
     
     wr_cmd8(0x11);                     // sleep out
-    wait_ms(150);
+    thread_sleep_for(150);
      
     wr_cmd8(0x29);                     // display on
-    wait_ms(150);
+    thread_sleep_for(150);
 }
\ No newline at end of file
diff -r f87f06292637 -r c66986d80f72 Inits/IST3020.cpp
--- a/Inits/IST3020.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/IST3020.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -45,7 +45,7 @@
     /* Start Initial Sequence ----------------------------------------------------*/
     
     wr_cmd8(0xE2);   //  sw reset
-    wait_ms(10);
+    thread_sleep_for(10);
     
     wr_cmd8(0xAE);   //  display off
     wr_cmd8(0xAB);   //  built-in OSC on
@@ -58,11 +58,11 @@
     //wr_cmd8(0xC0);   // SHL select com0-com63
 
     wr_cmd8(0x2C);   //  Internal Voltage Converter ON
-    wait_ms(10);
+    thread_sleep_for(10);
     wr_cmd8(0x2E);   //  Internal Voltage Regulator ON
-    wait_ms(10);
+    thread_sleep_for(10);
     wr_cmd8(0x2F);   //  Internal Voltage Follower ON
-    wait_ms(10);
+    thread_sleep_for(10);
     wr_cmd8(0x20);   //  Regulor_Resistor_Select resistor ratio 20-27 20=4.5(default) 27=8.0, 0.5 steps
     set_contrast(46);
     //wr_cmd8(0x81);   //  set contrast (reference voltage register set)
diff -r f87f06292637 -r c66986d80f72 Inits/S6D04D1.cpp
--- a/Inits/S6D04D1.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/S6D04D1.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -72,7 +72,7 @@
 wr_data8(0x01); 
 
 wr_cmd8(0x11); 
-wait_ms(150); 
+thread_sleep_for(150); 
 
 wr_cmd8(0xF3); 
 wr_data8(0x01); 
@@ -98,23 +98,23 @@
 wr_data8(0xF0); 
 wr_data8(0x70); 
 wr_data8(0x1F); 
-wait_ms(30); 
+thread_sleep_for(30); 
 
 wr_cmd8(0xF3); 
 wr_data8(0x03); 
-wait_ms(30); 
+thread_sleep_for(30); 
 wr_cmd8(0xF3); 
 wr_data8(0x07); 
-wait_ms(30); 
+thread_sleep_for(30); 
 wr_cmd8(0xF3); 
 wr_data8(0x0F); 
-wait_ms(30); 
+thread_sleep_for(30); 
 wr_cmd8(0xF3); 
 wr_data8(0x1F); 
-wait_ms(30); 
+thread_sleep_for(30); 
 wr_cmd8(0xF3); 
 wr_data8(0x7F); 
-wait_ms(30); 
+thread_sleep_for(30); 
 
 
 wr_cmd8(0xF7); 
@@ -253,8 +253,8 @@
 wr_data8(0x02); 
 wr_data8(0x01);//240*400 
  
-wait_ms(20); 
+thread_sleep_for(20); 
 wr_cmd8(0x29); // display on
-wait_ms(20); 
+thread_sleep_for(20); 
     
 }
diff -r f87f06292637 -r c66986d80f72 Inits/SEPS225.cpp
--- a/Inits/SEPS225.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/SEPS225.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -134,8 +134,10 @@
     oled->frequency(1000000) ;
 #endif 
      
-    reg_write(CMD_REDUCE_CURRENT, 0x01) ;  wait(0.01) ; //    oled_delay(100000) ;
-    reg_write(CMD_REDUCE_CURRENT, 0x00) ;  wait(0.01) ; //    oled_delay(100000) ;
+    reg_write(CMD_REDUCE_CURRENT, 0x01) ;
+    thread_sleep_for(100) ; //    oled_delay(100000) ;
+    reg_write(CMD_REDUCE_CURRENT, 0x00) ;
+    thread_sleep_for(100) ; //    oled_delay(100000) ;
     
     reg_write(CMD_OSC_CTL, 0x01) ;
     reg_write(CMD_CLOCK_DIV, 0x30) ;
@@ -245,24 +247,24 @@
 
 void SEPS225::rect(int x0, int y0, int x1, int y1, unsigned short color)
 {
-    float interval = 0.01 ;
+    int interval = 10 ;
 //    window(x0, y0, x1-x0+1, y1-y0+1) ;
     *_cs = 0 ;
-    wait(interval) ;
+    thread_sleep_for(interval) ;
     line(x0, y0, x1, y0, color) ;
     *_cs = 1 ;
-    wait(interval) ;  
+    thread_sleep_for(interval) ;  
     *_cs = 0 ;
     line(x1, y0, x1, y1, color) ;
     *_cs = 1 ;
-    wait(interval) ;
+    thread_sleep_for(interval) ;
     *_cs = 0 ;
     line(x0, y0, x0, y1, color) ;
     *_cs = 1 ;
-    wait(interval) ;
+    thread_sleep_for(interval) ;
     *_cs = 0 ;
     line(x0, y1, x1, y1, color) ;
-    wait(interval) ;
+    thread_sleep_for(interval) ;
     *_cs = 1 ;
 //    *_cs = 1 ;
 }
diff -r f87f06292637 -r c66986d80f72 Inits/SSD1306.cpp
--- a/Inits/SSD1306.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/SSD1306.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -73,7 +73,7 @@
     /* Start Initial Sequence ----------------------------------------------------*/
     
   //  wr_cmd8(0xE2);   //  sw reset
-    wait_ms(15);
+    thread_sleep_for(15);
     
     wr_cmd8(SSD1306_DISPLAYOFF);    // no problem in SPI_16 for single byte cmds
     wr_cmd16((SSD1306_SETDISPLAYCLOCKDIV<<8)|0x80);   // wr_cmd16 for multibyte cmds issue in SPI16 mode
diff -r f87f06292637 -r c66986d80f72 Inits/ST7565.cpp
--- a/Inits/ST7565.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/ST7565.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -55,7 +55,7 @@
     /* Start Initial Sequence ----------------------------------------------------*/
     
     wr_cmd8(0xE2);   //  sw reset
-    wait_ms(10);
+    thread_sleep_for(10);
     
     wr_cmd8(0xAE);   //  display off
     
@@ -68,11 +68,11 @@
     wr_cmd8(0xC0);   // SHL select com0-com63
 
     wr_cmd8(0x2C);   //   Boost ON
-    wait_ms(10);
+    thread_sleep_for(10);
     wr_cmd8(0x2E);   //   Voltage Regulator ON
-    wait_ms(10);
+    thread_sleep_for(10);
     wr_cmd8(0x2F);   //   Voltage Follower ON
-    wait_ms(10);
+    thread_sleep_for(10);
     wr_cmd8(0x20|0x05);   //  Regulor_Resistor_Select resistor ratio 20-27, look at your display specific init code
     set_contrast(0x20);
     //wr_cmd8(0x81);   //  set contrast (reference voltage register set)
diff -r f87f06292637 -r c66986d80f72 Inits/TFT_MIPI.cpp
--- a/Inits/TFT_MIPI.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/TFT_MIPI.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -101,9 +101,9 @@
     wr_cmd8(0x13); // Nomal Displaymode
     
     wr_cmd8(0x11);                     // sleep out
-    wait_ms(150);
+    thread_sleep_for(150);
      
     wr_cmd8(0x29);                     // display on
-    wait_ms(150);
+    thread_sleep_for(150);
 
 }
\ No newline at end of file
diff -r f87f06292637 -r c66986d80f72 Inits/UC1608.cpp
--- a/Inits/UC1608.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Inits/UC1608.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -41,7 +41,7 @@
     /* Start Initial Sequence ----------------------------------------------------*/
     
   //  wr_cmd8(0xE2);   //  sw reset
-    wait_ms(15);
+    thread_sleep_for(15);
     
     wr_cmd8(0x27);   // Multiplex rate :128   set temperature consenpation 0%
     wr_cmd8(0xEA);   //set bias:1/12bias
@@ -53,7 +53,7 @@
     //wr_cmd8(0xC0);   // SHL select com0-com63
 
     wr_cmd8(0x2F);   //  //Power Control:internal, LCD capacitance 60nf-90nf
-    wait_ms(10);
+    thread_sleep_for(10);
     
    // wr_cmd8(0x81);//Set Gain and Potentiometer
   //  wr_cmd8(0x40|26);//Set Gain and Potentiometer  xx xxxxxx
diff -r f87f06292637 -r c66986d80f72 Protocols/BUS16.cpp
--- a/Protocols/BUS16.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Protocols/BUS16.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -211,15 +211,15 @@
 }
 void BUS16::hw_reset()
 {
-    wait_ms(15);
+    thread_sleep_for(15);
     _DC = 1;
     _CS = 1;
     _WR = 1;
     _RD = 1;
     _reset = 0;                        // display reset
-    wait_ms(2);
+    thread_sleep_for(2);
     _reset = 1;                       // end reset
-    wait_ms(100);
+    thread_sleep_for(100);
 }
 void BUS16::BusEnable(bool enable)
 {
diff -r f87f06292637 -r c66986d80f72 Protocols/BUS8.cpp
--- a/Protocols/BUS8.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Protocols/BUS8.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -259,15 +259,15 @@
 }
 void BUS8::hw_reset()
 {
-    wait_ms(15);
+    thread_sleep_for(15);
     _DC = 1;
     _CS = 1;
     _WR = 1;
     _RD = 1;
     _reset = 0;                        // display reset
-    wait_ms(2);
+    thread_sleep_for(2);
     _reset = 1;                       // end reset
-    wait_ms(100);
+    thread_sleep_for(100);
 }
 void BUS8::BusEnable(bool enable)
 {
diff -r f87f06292637 -r c66986d80f72 Protocols/PAR16.cpp
--- a/Protocols/PAR16.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Protocols/PAR16.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -214,15 +214,15 @@
 }
 void PAR16::hw_reset()
 {
-    wait_ms(15);
+    thread_sleep_for(15);
     _DC = 1;
     _CS = 1;
     _WR = 1;
     _RD = 1;
     _reset = 0;                        // display reset
-    wait_ms(2);
+    thread_sleep_for(2);
     _reset = 1;                       // end reset
-    wait_ms(100);
+    thread_sleep_for(100);
 }
 void PAR16::BusEnable(bool enable)
 {
diff -r f87f06292637 -r c66986d80f72 Protocols/PAR8.cpp
--- a/Protocols/PAR8.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Protocols/PAR8.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -261,15 +261,15 @@
 }
 void PAR8::hw_reset()
 {
-    wait_ms(15);
+    thread_sleep_for(15);
     _DC = 1;
     _CS = 1;
     _WR = 1;
     _RD = 1;
     _reset = 0;                        // display reset
-    wait_ms(2);
+    thread_sleep_for(2);
     _reset = 1;                       // end reset
-    wait_ms(100);
+    thread_sleep_for(100);
 }
 void PAR8::BusEnable(bool enable)
 {
diff -r f87f06292637 -r c66986d80f72 Protocols/SPI16.cpp
--- a/Protocols/SPI16.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Protocols/SPI16.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -174,13 +174,13 @@
 }
 void SPI16::hw_reset()
 {
-    wait_ms(15);
+    thread_sleep_for(15);
     _DC = 1;
     _CS = 1;
     _reset = 0;                        // display reset
-    wait_ms(2);
+    thread_sleep_for(2);
     _reset = 1;                       // end reset
-    wait_ms(100);
+    thread_sleep_for(100);
 }
 void SPI16::BusEnable(bool enable)
 {
diff -r f87f06292637 -r c66986d80f72 Protocols/SPI8.cpp
--- a/Protocols/SPI8.cpp	Mon Feb 06 12:29:33 2017 +0000
+++ b/Protocols/SPI8.cpp	Tue Jan 25 17:57:55 2022 +0000
@@ -194,13 +194,13 @@
 }
 void SPI8::hw_reset()
 {
-    wait_ms(15);
+    thread_sleep_for(15);
     _DC = 1;
     _CS = 1;
     _reset = 0;                        // display reset
-    wait_ms(2);
+    thread_sleep_for(2);
     _reset = 1;                       // end reset
-    wait_ms(100);
+    thread_sleep_for(100);
 }
 void SPI8::BusEnable(bool enable)
 {