config.h 611 B

123456789101112131415161718192021222324252627282930
  1. #include <stdint.h>
  2. #ifndef CONFIG_H_
  3. #define CONFIG_H_
  4. #define I2C_TX_MAX_PACKET_SIZE (10)
  5. #define I2C_RX_MAX_PACKET_SIZE (10)
  6. #define NUM_SLOTS (4)
  7. #define BATTERY_THRESHOLD (50)
  8. #define TEMPERATURE_MAX_C (60)
  9. #define MAX_CYCLES (2)
  10. #define TARGET_MCU_ADDRESS (0x48)
  11. typedef struct{
  12. uint8_t txBuffer[I2C_TX_MAX_PACKET_SIZE];
  13. uint8_t txLen;
  14. uint8_t txCount;
  15. }txPacket;
  16. typedef struct{
  17. uint8_t rxBuffer[I2C_RX_MAX_PACKET_SIZE];
  18. uint8_t rxLen;
  19. uint8_t rxCount;
  20. }rxPacket;
  21. // Global variables declared in i2c_hal.c
  22. extern txPacket tx_packet;
  23. extern rxPacket rx_packet;
  24. #endif