From 8e0cbe0992619a36bf34a660cfdd75f083f19730 Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期三, 11 十二月 2024 10:43:28 +0800 Subject: [PATCH] PCA驱动完成,读写功能正常,PCA的INT中断未配置 --- keil/include/main/main.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/keil/include/main/main.c b/keil/include/main/main.c index 563373b..c8809d6 100644 --- a/keil/include/main/main.c +++ b/keil/include/main/main.c @@ -368,7 +368,7 @@ 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; @@ -384,7 +384,7 @@ } if(enbale_blink_flag) { - delay_us(5000); + //delay_us(5000); green_charge_state=0; charge_red_off(); } @@ -531,7 +531,7 @@ board_clock_run(); boot_deinit(); board_pins_config(); - board_debug_console_open(TRACE_PORT_UART1); + board_debug_console_open(TRACE_PORT_UART1); // Reset reason reset_cause_get(); reset_cause_clear(); @@ -574,17 +574,17 @@ 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); + 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); Program_Init(); //uart_open(UART_ID1, &test_uart_cfg); - // uart1_change_from_gps_to_debug(); //Uart1GpsRecDebugSend(); uart_receive(UART_ID1,m_EUART_DMA_RXBuf,EUART_RX_BUF_SIZE,uart_receive_callback); @@ -594,7 +594,7 @@ //AIR780E_Reset(); //4G模块重启,耗时1.5秒,这个是无法同步的关键 sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback); sleep_timer_start(__MS_TO_32K_CNT(g_com_map[COM_INTERVAL]));//测试 - sleep_timer_start(__MS_TO_32K_CNT(SLEEP_TIMER_NUM));//测试 + //sleep_timer_start(__MS_TO_32K_CNT(SLEEP_TIMER_NUM));//测试 // board_5V_input_init(voltage_input_handler); adc_get(&sample[0], NUM_SAMPLES, adc_callback);//adc采样 board_acceleration_detection_init(move_handler); @@ -602,7 +602,7 @@ 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()) -- Gitblit v1.9.3