| | |
| | | uint8_t flag_sleeptimer,flag_secondtask,secondtask_count; |
| | | static void sleep_timer_callback(void *dev, uint32_t time) |
| | | { |
| | | g_start_send_flag=1; |
| | | // IO_control_init(); |
| | | // UWBPoll(); |
| | | // |
| | |
| | | //// Initialize low power mode |
| | | // power_init(); |
| | | // AIR780E_Reset(); //4G模块重启,耗时1.5秒,这个是无法同步的关键 |
| | | // sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback); |
| | | sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback); |
| | | |
| | | // sleep_timer_start(__MS_TO_32K_CNT(SLEEP_TIMER_NUM));//测试 |
| | | sleep_timer_start(__MS_TO_32K_CNT(1000));//测试 |
| | | |
| | | // board_acceleration_detection_init(move_handler); |
| | | Uwbinit(); |
| | | while (1) |
| | | { |
| | | UwbRange(); |
| | | if(g_start_send_flag) |
| | | { |
| | | g_start_send_flag=0; |
| | | |
| | | } |
| | | |
| | | // UwbRange(); |
| | | // rf_irq_process(); |
| | | // if(rf_get_transmit_flag() == RADIO_FLAG_TXDONE) |
| | | // { |