| | |
| | | //board_led_on(BOARD_LED_1); |
| | | #endif |
| | | Board_LORA_NVIC_Init(Lora_irq_handler); |
| | | // board_configure(); |
| | | board_configure(); |
| | | } |
| | | |
| | | void app_process_handle(uint8_t msg_id, const void *param) |
| | |
| | | // Disable watchdog timer |
| | | wdt_close(WDT_ID0); |
| | | LOG_INFO(TRACE_MODULE_APP, "UCI FiRa example\r\n"); |
| | | |
| | | // delay_ms(500); |
| | | // lora_in_sleep(); |
| | | // power_init(); |
| | | // mcu_deep_sleep(); |
| | | if(gpio_pin_get_val(SLEEP_PIN)) |
| | | { |
| | | if(gpio_pin_get_val(MODE_CHANGE_PIN))//记得改回来与正式的相反 |
| | |
| | | } |
| | | } |
| | | }else{ |
| | | //delay_ms(300); |
| | | LOG_INFO(TRACE_MODULE_APP, "进入休眠模式\r\n"); |
| | | delay_ms(300); |
| | | //LOG_INFO(TRACE_MODULE_APP, "进入休眠模式\r\n");//会打断休眠 |
| | | //gpio_pin_clr(LORA_NRST);//lora休眠 |
| | | // spi_close(SPI_ID0); |
| | | //spi_close(SPI_ID0); |
| | | lora_in_sleep(); |
| | | power_init(); |
| | | mcu_deep_sleep(); |