Procházet zdrojové kódy

configuration file update

namrota ghosh před 7 měsíci
rodič
revize
a195a670ca
1 změnil soubory, kde provedl 15 přidání a 2 odebrání
  1. 15 2
      src/config.h

+ 15 - 2
src/config.h

@@ -7,8 +7,8 @@
 #define BATTERY_THRESHOLD (50)
 #define TEMPERATURE_MAX_C (60)
 #define MAX_CYCLES (2)
-#define TARGET_BASE_ADDRESS (0x48)
-#define MEASUREMENT_CHECK_INTERVAL 3200 //Do not know yet the exact timing
+#define TARGET_BASE_ADDRESS (0x49)
+#define MEASUREMENT_CHECK_INTERVAL 3200000 //Do not know yet the exact timing
 
 typedef struct{
      uint8_t txBuffer[I2C_TX_MAX_PACKET_SIZE];
@@ -24,7 +24,20 @@ typedef struct{
      bool rxComplete;
 }rx_Packet;
 
+/* Indicates status of I2C */
+enum I2cControllerStatus {
+    I2C_STATUS_IDLE = 0,
+    I2C_STATUS_TX_STARTED,
+    I2C_STATUS_TX_INPROGRESS,
+    I2C_STATUS_TX_COMPLETE,
+    I2C_STATUS_RX_STARTED,
+    I2C_STATUS_RX_INPROGRESS,
+    I2C_STATUS_RX_COMPLETE,
+    I2C_STATUS_ERROR,
+} gI2cControllerStatus;
+
 // Global variables declared in i2c_hal.c
 extern tx_Packet txPacket;
 extern rx_Packet rxPacket;
+
 #endif