#ifdef FT_SINGLE_UART
void log_factory_at_callback(const void *buffer, uint16_t length, bool remaining)
{
+#ifndef SUPPORT_RECOVERY_DISPLAY //判定是否是在编译RECOVERY image,本参数不支持RECOVERY
+ if (uapi_custom_uart_rx_enable_flag() == false)
+ {
+ return ;
+ }
+#endif
log_uart_rx_callback(buffer, length, remaining);
if (zdiag_is_enable() == false) {
at_cmd_msg_receive_handler((uint8_t *)buffer, length);
{
errcode_t ret = 0;
void *tcp_thread_id = NULL;
-
if(isopen)
{
power_on_cat1();
{
uapi_dev_runtime_set_cat1_powerstat(1);
}
+ /*4G 开电有时有干扰进日志串口,因此关闭日志串口*/
+ uapi_custom_set_uart_rx_enable_flag(false);
+
#ifdef SUPPORT_TCPIP
tcp_thread_id = tcp_get_thread_id();
ret = uapi_resume_thread(tcp_thread_id);
{
uapi_dev_runtime_set_cat1_powerstat(0);
}
+ /*4G 开电有时有干扰进日志串口,因此关闭4G才开启日志串口*/
+ uapi_custom_set_uart_rx_enable_flag(true);
#ifdef SUPPORT_TCPIP
tcp_thread_id = tcp_get_thread_id();
printf(" chipinfo 0x%08X not found !\n",chipinfo_num);
return ERRCODE_FAIL;
}
-#endif
\ No newline at end of file
+#endif
+
+
+static bool g_enable_uart_rx = true;
+/**
+ * return uart enable flag
+ * true 代表 接收缓存
+ * false 代表 不接收缓存
+*/
+bool uapi_custom_uart_rx_enable_flag(void)
+{
+ return g_enable_uart_rx;
+}
+
+
+/**
+ * 设置 uart rx enable flag
+*/
+void uapi_custom_set_uart_rx_enable_flag(bool enable_uart)
+{
+ g_enable_uart_rx = enable_uart;
+}
\ No newline at end of file
*/
bool check_file(char* buffer,int inputlen,char* outputfile,int max_outputsize);
+/**
+ * return uart enable flag
+ * true 代表 接收缓存
+ * false 代表 不接收缓存
+*/
+bool uapi_custom_uart_rx_enable_flag(void);
+
+
+/**
+ * 设置 uart rx enable flag
+*/
+void uapi_custom_set_uart_rx_enable_flag(bool enable_uart);
+
#include "custom_utilscpp.h"