Merge branch 'sdk602patch0626' of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230... 951/1 951/head 952/target/1 953/target/1 954/target/1
authorSnickerSun <snickersun@163.com>
Thu, 12 Sep 2024 11:48:43 +0000 (19:48 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 12 Sep 2024 11:48:43 +0000 (19:48 +0800)
1  2 
code/sdk/drivers/peripheral/utils/custom_utils.c
code/sdk/drivers/peripheral/utils/custom_utils.h

@@@ -3410,22 -3431,17 +3435,36 @@@ errcode_t change_mac_from_chipinfo_map(
  #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;
++}
+ #define SLEEP_FLAG_PATH "/user/userdata/sleep_flag.bin"
+ 
+ void uapi_save_sleep_flag(uint8_t *data,uint16_t len)
+ {
+     if(access(SLEEP_FLAG_PATH, F_OK) == -1)
+         uapi_save_file_data(SLEEP_FLAG_PATH,data,len,"wb");
+     else
+         uapi_save_file_data(SLEEP_FLAG_PATH,data,len,"ab");
+ }
+ 
+ void uapi_clean_sleep_flag(void)
+ {
+     uapi_delete_files(SLEEP_FLAG_PATH);
+ }