stm32f767 stm32l010 oled hal

Dependents:   HAL_oled_16x24_767_1 HAL_oled_16x24_010_2 HAL_oled_16x24_031_1

Files at this revision

API Documentation at this revision

Comitter:
caa45040
Date:
Thu Aug 11 00:15:50 2022 +0000
Parent:
1:4ec114ea55dc
Commit message:
stm32l010 stm32f767 stm32g031 oled wait_ms not

Changed in this revision

SSD1308.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 4ec114ea55dc -r 9b41b26677a2 SSD1308.cpp
--- a/SSD1308.cpp	Sat Aug 06 22:37:41 2022 +0000
+++ b/SSD1308.cpp	Thu Aug 11 00:15:50 2022 +0000
@@ -16,17 +16,25 @@
     initialize();
 }//SSD1308
 
+int ran1;
+#define WAIT2()   for(int ii=0;ii<1000;ii++){ran1=ran1+(int)(rand()*10);}
+
+
 //イニシャライズ
 void SSD1308::initialize()
 {
     //リセット対策
-    wait_ms(100);
+    //wait_ms(100);
+    WAIT2();
     HAL_I2C_Master_Transmit(_hi2c,_writeOpcode,(uint8_t*)"\200\215\200\024\200\257", 6, 3000);
-    wait_ms(100);
+    //wait_ms(100);
+    WAIT2();
     HAL_I2C_Master_Transmit(_hi2c,_writeOpcode,(uint8_t*)"\200\215\200\024\200\257", 6, 3000);
-    wait_ms(100);
+    //wait_ms(100);
+    WAIT2();
     HAL_I2C_Master_Transmit(_hi2c,_writeOpcode,(uint8_t*)"\200\215\200\024\200\257", 6, 3000);
-    wait_ms(100);
+    //wait_ms(100);
+    WAIT2();
 
     setHorizontalAddressingMode(); //メモリーアクセスモード