소스 검색

contains global variables and buffers

namrota ghosh 7 달 전
부모
커밋
80e925e9fe
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  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