| | |
| | | uint8_t uwb_enable_flag=0; |
| | | static void sleep_timer_callback(void *dev, uint32_t time) |
| | | { |
| | | IO_control_init(); |
| | | //IO_control_init(); |
| | | if(enbale_blink_flag) |
| | | { |
| | | green_charge_state=0; |
| | |
| | | // battery_monitor_close(); |
| | | adc_open(&usr_adc_cfg); |
| | | |
| | | IIC2_Init(); |
| | | Accelerometer_Init(); |
| | | IO_control_init(); |
| | | io_pin_mux_set(SCL_PIN, IO_FUNC0);//测试测距波形 |
| | | gpio_pin_set_dir(SCL_PIN , GPIO_DIR_IN, 0); |
| | | io_pull_set(SCL_PIN , IO_PULL_UP, IO_PULL_UP_LEVEL4); |
| | | // IIC2_Init(); |
| | | // Accelerometer_Init(); |
| | | PCA9555_init(); |
| | | //IO_control_init(); |
| | | // io_pin_mux_set(SCL_PIN, IO_FUNC0);//测试测距波形 |
| | | // gpio_pin_set_dir(SCL_PIN , GPIO_DIR_IN, 0); |
| | | // io_pull_set(SCL_PIN , IO_PULL_UP, IO_PULL_UP_LEVEL4); |
| | | //gps_air780_power_change(0,1);//开启gps,4G |
| | | //加速度计初始化必须在IO_control_init之前因为复用SDA引脚 |
| | | gpio_pin_clr(ADC_GND_ENABLE); |
| | |
| | | board_4GUsart_detection_init(_4gUsart_handler); |
| | | while (1) |
| | | { test4=gpio_pin_get_val(SCL_PIN); |
| | | UWBPoll(); |
| | | //UWBPoll(); |
| | | // if(!power_low_flag)//确认是否休眠下才开启功能 |
| | | // { |
| | | // if(flag_TCP_reconnectting||IfTCPConnected()) |