void main(void) { InitVoice(); InitUART(BAUD1200); #ifdef F2 InitUART(BAUD9600); #endif // �����жϳ�ʼ�� press_open_button = 1; press_close_button = 1; #ifdef WX KBLS1 |= 0x03; KBLS0 |= 0x03; KBIF &= 0xfc; KBIE |= 0x03; EKB = 1; #endif EA = 1; // Moto_EN = 1; //��ʼ�����ر���� voice_EN = 0; //����ʱ�������Źر� P10 = 1; // ADC_check_result = 0x3ff; stolen_alarm_count = 0; //�屨�������� stolen_alarm_flag = 0; //�屨����־ // transmit_wire = 0; transmiter_EN = 0; // turn off the transmitter receiver_EN = 0; // turn on the receiver transceiver_power_enable = 0; // �ϵ�ʱ����ģ���Դ�ر� while(1) { #ifdef Z2 if(idle_EN == 1) { idle_EN = 0; PCON |= 0x02; } #endif sEOS_Go_To_Sleep(); } }
void main(void) { //P1=0xFF; //P2=0xFF; //P3=0xFF; // Inits watch set to clock mode by default watch_Init(clock_state); time_Init(); //prepare for elapsed time measurement Elapsed_Time_Init(); // Set up simple EOS (10 ms ticks) sEOS_Init_Timer2(10); while(1) // Super Loop { // Enter idle mode to save power sEOS_Go_To_Sleep(); } }