| 1234567891011121314151617181920212223242526272829303132 |
- #include <stdint.h>
- #include <stdbool.h>
- #ifndef CONFIG_H_
- #define CONFIG_H_
- #define I2C_TX_MAX_PACKET_SIZE (8)
- #define I2C_RX_MAX_PACKET_SIZE (12)
- #define BATTERY_THRESHOLD (20)
- #define TEMPERATURE_MAX_C (60)
- #define MAX_CYCLES (2)
- #define TARGET_BASE_ADDRESS (0x48)
- #define MEASUREMENT_CHECK_INTERVAL 320000 //Do not know yet the exact timing
- #define HEALTHY_BATTERY_VALUE (3800)
- typedef struct{
- uint8_t txBuffer[I2C_TX_MAX_PACKET_SIZE];
- uint8_t txLen;
- uint8_t txCount;
- bool txComplete;
- }tx_Packet;
- typedef struct{
- uint8_t rxBuffer[I2C_RX_MAX_PACKET_SIZE];
- uint8_t rxLen;
- uint8_t rxCount;
- bool rxComplete;
- }rx_Packet;
- // Global variables declared in i2c_hal.c
- extern tx_Packet txPacket;
- extern rx_Packet rxPacket;
- #endif
|