Ver código fonte

contains global variables and buffers

namrota ghosh 7 meses atrás
pai
commit
80e925e9fe
1 arquivos alterados com 28 adições e 0 exclusões
  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