#ifndef _MODULE_PRIMARY_COMM_H_
#define _MODULE_PRIMARY_COMM_H_

//------------------------------------------------------------------------------
#include <stdint.h>

//------------------------------------------------------------------------------
//#define log_info(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
//#define log_warn(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
//#define log_error(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)

//------------------------------------------------------------------------------
typedef struct StChillerInfo {
    uint8_t ChillerSwitch;
    uint32_t ChillerOnTime;
    uint8_t Reserved[3];
} ChillerInfo;

typedef struct StLedConfig {
    //OutputDrvValue[0]
    uint8_t LeftButtonLed: 1;                   //bit 0,    H: ON,      L:OFF
    uint8_t RightButtonLed: 1;                  //bit 1,    H: ON,      L:OFF
    uint8_t GreenLED: 1;                          //bit 2,    H: ON,      L:OFF
    uint8_t YellowLED: 1;                       //bit 3,    H: ON,      L:OFF
    uint8_t RedLED: 1;                        //bit 4,    H: ON,      L:OFF
    uint8_t SystemLed4: 1;                      //bit 5,    H: ON,      L:OFF
    uint8_t AcContactor: 1;                     //bit 6,    H: ON,      L:OFF
    uint8_t Reserved: 1;                        //bit 7 reserved
} LedConfig;

//------------------------------------------------------------------------------
//int StoreLogMsg(const char *fmt, ...);
#define SensorTrigCount 3
#define TILTSENSORDET		2
#endif /* _MODULE_PRIMARY_COMM_H_ */