Arkadiusz Binder 5 سال پیش
والد
کامیت
54ea6bcc1a

+ 18 - 24
SE/stuff/P5_Automation_can-dev-res-working-1930/P5_Automation_can-dev-res-working-1930.ino

@@ -136,30 +136,6 @@ etc. To deactivate the Serial printing, define the macro empty:
 
 */
 
-#include <EEPROM.h>
-
-    
-    int EEPROM_Active_ControllerID_addr = 0 ;
-
-typedef int EEPROM_Active_ControllerID_read_T ;
-
-//    EEPROM.get( EEPROM_Active_ControllerID_addr, EEPROM_Active_ControllerID_read );
-  EEPROM_Active_ControllerID_read_T  EEPROM_Active_ControllerID_read = EEPROM.read( EEPROM_Active_ControllerID_addr  );
-
-   
-if(EEPROM_Active_ControllerID_read) {
-
-}
- //  if(EEPROM_Active_ControllerID_read > 0 ) {
-        //const ing Active_ControllerID_E  = 0x13 ;
-      //  Serial.println("EER[OK]");
- //   } else {
-       // Serial.println("EER[EMPT]");
-     //    const ing Active_ControllerID_E  = 0x13 ;
-  //      EEPROM.update(EEPROM_Active_ControllerID_addr, 0x13);
-   // }
-    
-
 
 
 #include "___CONFIG/config_Active_ControllerID.h" //there kleep id of device
@@ -456,7 +432,25 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     Serial.begin(115200);
     
     
+    
+    int EEPROM_Active_ControllerID_addr = 0 ;
+
+    int EEPROM_Active_ControllerID_read ;
+
+//    EEPROM.get( EEPROM_Active_ControllerID_addr, EEPROM_Active_ControllerID_read );
+    EEPROM_Active_ControllerID_read = EEPROM.read( EEPROM_Active_ControllerID_addr  );
 
+   
+
+    if(EEPROM_Active_ControllerID_read > 0 ) {
+        //const ing Active_ControllerID_E  = 0x13 ;
+        Serial.println("EER[OK]");
+    } else {
+        Serial.println("EER[EMPT]");
+     //    const ing Active_ControllerID_E  = 0x13 ;
+        EEPROM.update(EEPROM_Active_ControllerID_addr, 0x13);
+    }
+    
     
 #if defined(DEBUG) || defined(DEBUG_QUEUE)
          Serial.println("#329 Serial.begin(115200)");

+ 15 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/_TFT_ILI9163C_config.h

@@ -1,12 +1,26 @@
  #define TFT_ILI9163C_CSpin Port7 // 7 // __CSpin // 53 // 10 //  chip select
 
+
+#if ! defined(TFT_ILI9163C_DCpin)
   #define TFT_ILI9163C_DCpin Port8 //8 // A0   data/command pin.   sometimes called DC, RS, ...
+#endif
+
+#if ! defined(TFT_ILI9163C__RSTpin)
 
   #define TFT_ILI9163C__RSTpin Port9 //9 //reset pin.   you must connect.   (or pullup)
   //#define __SDA 51 //11 //+ bidirectional data pin.   Connect to MOSI
   //#define __SCK 52 //13 //+ clock.   sometimes called SCLK, SCL, ...
   
-  
+#endif
+
+
+#define __22_RED_PCB__//240x320
+
   #include <SPI.h>
   #include <Adafruit_GFX.h>
   #include <TFT_ILI9163C.h>
+
+
+#if defined(__144_RED_PCB__)
+    #error should be defined __22_RED_PCB__ only
+#endif

+ 3 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x13/config_Active_ControllerID_0x13.h

@@ -14,6 +14,7 @@
 #define DISABLE_TASK_TYPE_T_DISPLAY_queue_pop________
 
 
-#define TFT_ILI9163C_DCpin Port9 //8 // A0   data/command pin.   sometimes called DC, RS, ...
+    #define TFT_ILI9163C__RSTpin Port8 //9 //reset pin.   you must connect.   (or pullup)
+
 
-#define TFT_ILI9163C__RSTpin Port8 //9 //reset pin.   you must connect.   (or pullup)
+#define TFT_ILI9163C_DCpin Port9 //8 // A0   data/command pin.   sometimes called DC, RS, ...