#ifndef _MAIN_H_ #define _MAIN_H_ //------------------------------------------------------------------------------ #include //------------------------------------------------------------------------------ #define MODELNAME_FAIL 0 #define BUFFER_SIZE 128 #define BTN_RELEASE 0 #define BTN_PRESS 1 #define MAX_BUF 64 #define MtdBlockSize 0x600000 #define SYSFS_GPIO_DIR "/sys/class/gpio" #define UPGRADE_FAN 0x02 #if defined DD360 ||defined DD360Audi || defined DD360ComBox #define UPGRADE_RB 0x09 //0x09 for DD360 dispenser #else #define UPGRADE_RB 0x03 //other module use #endif //defined DD360 || defined DD360Audi #define UPGRADE_PRI 0x04 #define UPGRADE_AC 0x05 #define UPGRADE_LED 0x06 #define SYSTEM_MIN_VOL 80 //150 #define MIN_OUTPUT_CUR 0 #define AC_OUTPUT_VOL 220 #define DEFAULT_AC_INDEX 2 #define PSU_MIN_CUR 100 #define DB_FILE "/Storage/ChargeLog/localCgargingRecord.db" #define uSEC_VAL 1000000 #define SELFTEST_TIMEOUT 60//45 #define AUTHORIZE_TIMEOUT 15//30 #define AUTHORIZE_COMP_TIMEOUT 3 #define AUTHORIZE_FAIL_TIMEOUT 3 #define AUTHORIZE_STOP_TIMEOUT 30 #define RETURN_TO_CHARGING_PAGE 30 #define GUN_PREPARE_TIMEOUT 30 #define GUN_EV_WAIT_TIMEOUT 120 #define GUN_EVSE_WAIT_TIMEOUT 60 #define GUN_COMP_WAIT_TIMEOUT 10 #define GUN_PRECHARGING_TIMEOUT 60 #define log_info(format, args...) StoreLogMsg_1("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args) #define log_warn(format, args...) StoreLogMsg_1("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args) #define log_error(format, args...) StoreLogMsg_1("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args) //------------------------------------------------------------------------------ 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; #endif /* _MAIN_H_ */