keil/include/main/main.c
@@ -136,7 +136,7 @@
    .flow = UART_FLOW_CONTROL_NONE,
    .rx_level = UART_RXFIFO_CHAR_1,
    .tx_level = UART_TXFIFO_EMPTY,
    .baud = BAUD_9600,
    .baud = BAUD_115200,
#if (TEST_UART_MODE == TEST_UART_POLL_MODE)
    .dma_en = false,
    .int_rx = false,
@@ -435,9 +435,13 @@
    ip3 = (g_com_map[TCP_IP_3]>>12&0xf)*1000+(g_com_map[TCP_IP_3]>>8&0xf)*100+(g_com_map[TCP_IP_3]>>4&0xf)*10+(g_com_map[TCP_IP_3]&0xf);
    port = g_com_map[TCP_PORT];
    g_com_map[VERSION] = (1<<8)|0;
       gpio_pin_set(CHANGE_UART_PIN);//;拉高打印输出
    LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id);
    LOG_INFO(TRACE_MODULE_APP,"固件版本:MK_无感闸机 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff);
    LOG_INFO(TRACE_MODULE_APP,"服务器地址: %d.%d.%d.%d:%d.\r\n",ip0,ip1,ip2,ip3,port);
      while(uart_tx_in_progress(UART_ID0));
      gpio_pin_clr(CHANGE_UART_PIN);//;拉低输入
}
@@ -546,15 +550,18 @@
    // open system timer
    //sys_timer_open();
    gpio_open();
      LED_output_init();//配置彩色灯引脚
      LED_output_init();//配置串口控制脚
   
    adc_open(&usr_adc_cfg);
         Program_Init();
    //uart_open(UART_ID1, &test_uart_cfg);
    uart_open(UART_ID1, &test_uart_cfg);
   // uart1_change_from_gps_to_debug();   
    //Uart1GpsRecDebugSend();   
    uart_receive(UART_ID0,m_EUART0_DMA_RXBuf,EUART0_RX_BUF_SIZE,uart0_receive_callback);
    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
    power_init();
    sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback);