Browse Source

chore:原有的打印替换为ulog打印

dev-rebuild
jujihjuji 3 months ago
parent
commit
de72b636d9
  1. 10
      applications/VK_Client.c
  2. 17
      applications/drv_ec800k.c
  3. 2
      applications/drv_ec800k.h

10
applications/VK_Client.c

@ -4,12 +4,17 @@
#include "VK_Com.h"
#include "drv_ec800k.h"
#include "VK_Log.h"
#include "rtdef.h"
#include "rtthread.h"
#include "rttypes.h"
#include "VKFly/mavlink.h"
#include "mavlink_helpers.h"
#define DBG_TAG "LINK_LOG"
#define DBG_LVL DBG_INFO
#include "rtdbg.h"
char cmd_cmd[100] = {0};
char cmd_str[100] = {0};
@ -274,7 +279,7 @@ int16_t client_tcp_connect(Cclient_t *client) {
rt_device_write(lte_dev.com_dev, 0, buf, sizeof(buf));
hw_printf(buf);
//hw_printf(buf);
#endif
return rtn;
@ -322,8 +327,7 @@ int16_t client_yield(CLte_dev_t *pLte_dev) {
if (_no_carrier_t.match_flag == HALF_MATCH) {
no_carrier_match(pLte_dev->at_buf, len);
if (_no_carrier_t.match_flag == COMPLETE_MATCH) {
rt_kprintf("disconnect!!!\n");
hw_printf("disconnect!!!\n");
LOG_I("disconnect!!!\n");
pLte_dev->client1->connect_sta = false;
_no_carrier_t.match_flag = NO_MATCH;
break;

17
applications/drv_ec800k.c

@ -8,10 +8,16 @@
#include "drv_ec800k.h"
#include <stdint.h>
#include "VK_Com.h"
#include "VK_Log.h"
#include "rtdef.h"
#include "rtthread.h"
#include "rttypes.h"
#define DBG_TAG "DTU_LOG"
#define DBG_LVL DBG_INFO
#include "rtdbg.h"
Cclient_t client1 = {
.valid = true,
.mode = "TCP",
@ -74,8 +80,7 @@ int16_t BSP_LTE_CipSend(uint8_t *pdata, uint32_t length, uint32_t waittime) {
int16_t BSP_LTE_SendCmd(const char *cmd, const char *expect, const char *error,
uint32_t waittime) {
rt_kprintf("%s\n", cmd);
hw_printf("%s\n", cmd);
LOG_I("%s\n", cmd);
BSP_LTE_SendData((uint8_t *)cmd, rt_strlen(cmd));
rt_err_t ret = rt_sem_take(lte_dev.com_dev_rx_sem, waittime);
@ -86,8 +91,7 @@ int16_t BSP_LTE_SendCmd(const char *cmd, const char *expect, const char *error,
rt_device_read(lte_dev.com_dev, 0, lte_dev.at_buf, sizeof(lte_dev.at_buf));
rt_kprintf("%s\n", lte_dev.at_buf);
hw_printf("%s\n", lte_dev.at_buf);
LOG_I("%s\n", lte_dev.at_buf);
/* 清空缓存 */
uint8_t c;
while (rt_device_read(lte_dev.com_dev, 0, &c, 1) == 1) {
@ -179,7 +183,7 @@ int16_t BSP_LTE_GetCGATT(int16_t retry) {
}
retry--;
} while (retry);
rt_kprintf("PS detached:[%s]", lte_dev.at_buf);
//rt_kprintf("PS detached:[%s]", lte_dev.at_buf);
return -1;
}
@ -293,8 +297,7 @@ void BSP_LTE_Config(void) {
while (0 != BSP_LTE_SendATE(3)) {
rt_thread_mdelay(500);
rt_kprintf("BSP_LTE_SendATE error\n");
hw_printf("BSP_LTE_SendATE error\n");
LOG_I("BSP_LTE_SendATE error\n");
}
/*查询模块信息*/

2
applications/drv_ec800k.h

@ -314,8 +314,6 @@ int16_t BSP_LTE_Send_Cmd_FileRead(const char *cmd, uint16_t len,
void tcp_connect_test(void);
void hw_printf(const char *fmt, ...);
// void test_ec800k_ota(void);
#ifdef __cplusplus
}

Loading…
Cancel
Save