| 123456789101112131415161718192021222324252627282930 |
- #include <stdint.h>
- #ifndef CONFIG_H_
- #define CONFIG_H_
- #define I2C_TX_MAX_PACKET_SIZE (10)
- #define I2C_RX_MAX_PACKET_SIZE (10)
- #define NUM_SLOTS (4)
- #define BATTERY_THRESHOLD (50)
- #define TEMPERATURE_MAX_C (60)
- #define MAX_CYCLES (2)
- #define TARGET_MCU_ADDRESS (0x48)
- 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;
- // Global variables declared in i2c_hal.c
- extern txPacket tx_packet;
- extern rxPacket rx_packet;
- #endif
|