From: SnickerSun Date: Thu, 12 Sep 2024 11:48:43 +0000 (+0800) Subject: Merge branch 'sdk602patch0626' of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230... X-Git-Tag: release_V1.2.70_20241020_135402~485^2~7 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F951%2F1;p=mirrors%2FFD230.git Merge branch 'sdk602patch0626' of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230 into sdk602patch0626 --- 6c16a59744e2ee0c2ec73b4002a584eefe018732 diff --cc code/sdk/drivers/peripheral/utils/custom_utils.c index 39914563c,483161c80..2d8584248 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@@ -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); + }