| | |
| | | second_count = 0; |
| | | MinuteTask(); |
| | | } |
| | | poll_flag=1; |
| | | |
| | | // if(bind_flag) |
| | | // { |
| | | // if(bind_count--<=0) |
| | |
| | | |
| | | } |
| | | // } |
| | | HIDO_TimerTick(); |
| | | HIDO_TimerTick(); |
| | | if(nomove_count<=g_com_map[NOMOVESLEEP_TIME])//防止溢出 |
| | | nomove_count++; |
| | | else{ |
| | |
| | | |
| | | static void sleep_timer_callback(void *dev, uint32_t time) |
| | | { |
| | | poll_flag=1; |
| | | |
| | | if(secondtask_count++%2==0) |
| | | { |
| | |
| | | int tt2; |
| | | int test1,test3; |
| | | uint32_t test4; |
| | | #define SLEEP_TIMER_NUM 1000 |
| | | //uint16_t count_tag; |
| | | #define SLEEP_TIMER_NUM 500 |
| | | int main(void) |
| | | { |
| | | board_clock_run(); |
| | |
| | | Program_Init(); |
| | | |
| | | uart_open(UART_ID1, &test_uart_cfg); |
| | | // uart1_change_from_gps_to_debug(); |
| | | //Uart1GpsRecDebugSend(); |
| | | |
| | | uart_receive(UART_ID1,m_EUART1_DMA_RXBuf,EUART1_RX_BUF_SIZE,uart1_receive_callback); |
| | | uart_receive(UART_ID0,m_EUART0_DMA_RXBuf,EUART0_RX_BUF_SIZE,uart0_receive_callback); |
| | | // Initialize low power mode |
| | |
| | | sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback); |
| | | sleep_timer_start(__MS_TO_32K_CNT(SLEEP_TIMER_NUM));//测试 |
| | | adc_get(&sample[0], NUM_SAMPLES, adc_callback);//adc采样 |
| | | //board_acceleration_detection_init(move_handler); |
| | | // pca_input_detection_init(pca_handler);//pca检测输入 |
| | | //board_4GUsart_detection_init(_4gUsart_handler); |
| | | //Uwb_init(); |
| | | uwb_open(); |
| | | Anchor_uwb_aoa_square_init(); |
| | | |
| | |
| | | uwb_app_poll(); |
| | | if(poll_flag) |
| | | { |
| | | // count_tag++; |
| | | CloseUWB();//关闭接收 |
| | | Tag_uwb_aoa_square_init(); |
| | | TagRange(); //做标签 |