Kaynağa Gözat

contains global variables and buffers

namrota ghosh 7 ay önce
ebeveyn
işleme
80e925e9fe
1 değiştirilmiş dosya ile 28 ekleme ve 0 silme
  1. 28 0
      src/config.h

+ 28 - 0
src/config.h

@@ -0,0 +1,28 @@
+#include <stdint.h>
+
+#ifndef CONFIG_H_
+#define CONFIG_H_
+#define I2C_TX_MAX_PACKET_SIZE  (8)
+#define I2C_RX_MAX_PACKET_SIZE  (8)
+#define NUM_SLOTS (4)
+#define BATTERY_THRESHOLD (50)
+#define TEMPERATURE_MAX_C (60)
+#define MAX_CYCLES (2)
+
+typedef struct{
+     uint8_t txBuffer[I2C_TX_MAX_PACKET_SIZE];
+     uint8_t txLen;
+     uint8_t txCount;
+
+}txPacket;
+
+typedef struct{
+     uint8_t rxBuffer[I2C_RX_MAX_PACKET_SIZE];
+     uint8_t rxLen;
+     uint8_t rxCount;
+
+}rxPacket;
+
+extern txPacket tx_packet;
+extern rxPacket rx_packet;
+#endif