123456789101112131415161718192021222324252627 |
- #include "includes.h"
- //进入低功耗会死机,暂时使用以下操作模拟。20mA~30mA左右
- void Sleeping(void)
- {
- SlwTrace(INF, "Sleeping",1);
- MODEM_LED1_LOW;
- MODEM_LED2_LOW;
- SpeakerDisable();
- MicDisable();
- MODEM_RESET_HIGH;
- MODEM_PWRKEY_LOW;
- GPS_PWR_OFF;
- IWDG_Configuration(3000);
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC, DISABLE);
- RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2 | RCC_APB1Periph_USART3, DISABLE);
- ADC_Cmd (ADC1,DISABLE);//使能或者失能指定的ADC
- RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, DISABLE);
- os_tsk_delete(idModemUartTask);
- os_tsk_delete(idModemTask);
- os_tsk_delete(idTTSTask);
- while(1)
- {
- os_dly_wait(1000);
- IWDG_ReloadCounter();
- }
- }
|