#ifndef __parameter_h__ #define __parameter_h__ //****************************************************************************** //#include "GlobeTypeDef.h" //#include "ConstDefine.h" //#include "StorageType.h" //****************************************************************************** //Display Language #define CHINESE 0 #define ENGLISH 1 #define CHN_ENG 2 #define LANGUAGE CHN_ENG #define LANGUAGE_MAX ENGLISH #define LANGUAGE_MIN CHINESE //------------------------------------------------------------------------------ //响应时间定义 #define RESP_125MS 0 #define RESP_250MS 1 #define RESP_500MS 2 #define RESP_1000MS 3 #define RESP_2000MS 4 #define RESP_4000MS 5 #define RESP_MAX 6 #define TIMING_BASE 125 // 125MS #define BASE_125MS TIMING_BASE #define BASE_250MS (BASE_125MS * 2) #define BASE_500MS (BASE_250MS * 2) #define BASE_1000MS (BASE_500MS * 2) #define BASE_2000MS (BASE_1000MS * 2) #define BASE_4000MS (BASE_2000MS * 2) #define TIMEBASE_MAX BASE_4000MS #define TIMING_500mS 64 #define ONE_SECOND_TIME (TIMING_500mS*2) // FOR 1S=16384 (16384/128) #define ONE_SECOND_TIME_SHIFT 7 #define TWO_SECOND_TIME (ONE_SECOND_TIME*2) #define THREE_SECOND_TIME (ONE_SECOND_TIME*3) #define FOUR_SECOND_TIME (ONE_SECOND_TIME*4) //------------------------------------------------------------------------------ #define EXIT_3S (ONE_SECOND_TIME*3) #define EXIT_5S (ONE_SECOND_TIME*5) #define EXIT_10S (ONE_SECOND_TIME*10) //16384*10/128 #define EXIT_20S (ONE_SECOND_TIME*20) #define EXIT_25S (ONE_SECOND_TIME*25) #define EXIT_27S (ONE_SECOND_TIME*27) #define EXIT_30S (ONE_SECOND_TIME*30) //16384*30/128 #define EXIT_50S (ONE_SECOND_TIME*50) //16384*30/128 #define EXIT_60S (ONE_SECOND_TIME*60) //16384*30/128 #define EXIT_70S (ONE_SECOND_TIME*70) //16384*70/128 #define EXIT_5400S (u32)5400*ONE_SECOND_TIME //16384*70/128 #define EXIT_7200S (u32)7200*ONE_SECOND_TIME //16384*70/128 #define ID_VALID_TIME EXIT_60S #define COUNTDOWN_3S (ID_VALID_TIME - EXIT_3S) #define COM_RESET_TIME (ID_VALID_TIME - EXIT_30S) //============================================================================== #define UPGRADE_APP_CMD 0xAA55 #define END_UPGRADE_APP_CMD 0xBB66 //****************************************************************************** //****************************************************************************** #define YEAR 0 #define MONTH 1 #define DATE 2 #define HOUR 3 #define MINUTE 4 #define SECOND 5 //****************************************************************************** #define CHK_CRYSTAL 0 #define CHK_PARA 1 #define CHK_DATA 2 #define CHK_ACC 3 #define CHK_RTC 4 #define CHK_TEMP 5 //****************************************************************************** #define MAINTAEX0 TA0EX0 #define MAINTACTL TA0CTL #define MAINTAR TA0R #define MAINTACCTL0 TA0CCTL0 #define MAINTACCR0 TA0CCR0 #define MAINTACCTL1 TA0CCTL1 #define MAINTACCR1 TA0CCR1 #define MAINTACCTL2 TA0CCTL2 #define MAINTACCR2 TA0CCR2 #define MAINTAIV TA0IV #define MAINTACCR0_VECTOR TIMER0_A0_VECTOR #define MAINTACCR1_VECTOR TIMER0_A1_VECTOR //****************************************************************************** // Battery voltage definition #define VOLTAGE_315 315 #define VOLTAGE_310 310 #define VOLTAGE_305 305 #define VOLTAGE_300 300 #define VOLTAGE_295 295 #define TURN_OFF_BATTERY 285 //2.9V //****************************************************************************** //#define CPU_F ((double)FREQ) //#define delay_us(x) __delay_cycles((long)(CPU_F*(double)x/1000000.0)) //#define delay_ms(x) __delay_cycles((long)(CPU_F*(double)x/1000.0)) //****************************************************************************** #define INSTRUMENT_FACTOR 1 #define ERROR_CORRECT 0 //****************************************************************************** //****************************************************************************** #endif