Jelajahi Sumber

更新源代码(修改广播数据的参数以及部分细节修改)

TangRuiyang 2 bulan lalu
induk
melakukan
0c54ee2490

+ 0 - 7
src/hlw2025141/app/functions/func_bt.c

@@ -255,13 +255,6 @@ void func_bt_disp_status_do(void)
 #if WARNING_BT_PAIR
             if(f_bt.need_pairing && f_bt.disp_status == BT_STA_IDLE) {
                 f_bt.need_pairing = 0;
-                #if TRY_PAIRING_WARNING
-                delay_5ms(100);
-                if(bt_nor_is_connected())
-                {
-                    break;
-                }
-                #endif // TRY_PAIRING_WARNING
                 if(xcfg_cb.warning_bt_pair && xcfg_cb.bt_tws_en) {
                     f_bt.warning_status |= BT_WARN_PAIRING;
                 }

+ 10 - 6
src/hlw2025141/app/modules/bluetooth/app/ab_mate/ab_mate_profile.c

@@ -42,7 +42,9 @@ static const uint8_t scan_data_const[] = {
 
 u32 ble_get_scan_data(u8 *scan_buf, u32 buf_size)
 {
-/*
+#if TRY_APP_ADV_DATA
+    return com_adv_fill_scan_data(scan_buf);
+#else
     memset(scan_buf, 0, buf_size);
     u32 data_len = sizeof(scan_data_const);
     memcpy(scan_buf, scan_data_const, data_len);
@@ -58,13 +60,14 @@ u32 ble_get_scan_data(u8 *scan_buf, u32 buf_size)
     }
 
     return data_len;
-*/
-    return com_adv_fill_scan_data(scan_buf);
+#endif // TRY_APP_ADV_DATA
 }
 
 u32 ble_get_adv_data(u8 *adv_buf, u32 buf_size)
 {
-/*
+#if TRY_APP_ADV_DATA
+    return com_adv_fill_adv_data(adv_buf);
+#else
     u8 edr_addr[6];
     u32 data_len = sizeof(adv_data_const);
     u32 bid = AB_MATE_BID;
@@ -101,8 +104,7 @@ u32 ble_get_adv_data(u8 *adv_buf, u32 buf_size)
     adv_data_len = data_len;
 
     return data_len;
-*/
-    return com_adv_fill_adv_data(adv_buf);
+#endif // TRY_APP_ADV_DATA
 }
 
 void ble_adv_data_update_byte(u8 pos, u8* val, u8 len, u8 proc)
@@ -379,7 +381,9 @@ void ble_app_gatts_service_init(void)
                                        &ab_mate_ctkd_base_cb_info);      //characteristic
 #endif
 
+#if TRY_APP_GATTS_SERVICE_FUNC
     ret = com_ble_init();
+#endif // TRY_APP_GATTS_SERVICE_FUNC
 
     if(ret != BLE_GATTS_SUCCESS){
         printf("gatt err: %d\n", ret);

+ 16 - 10
src/hlw2025141/app/modules/bluetooth/bsp_bt.c

@@ -396,18 +396,12 @@ void bt_emit_notice(uint evt, void *params)
 		if(!bt_is_connected()){
         	msg_enqueue(EVT_AUTO_PWFOFF_EN);
 		}
+#if TRY_PAIRING_WARNING
+        sys_cb.pairing_warning_flag = false;
+        sys_cb.pairing_warning_delay = 0;
+#endif // TRY_PAIRING_WARNING
         break;
     case BT_NOTICE_TWS_CONNECTED:
-        #if TRY_IDLE_LED
-        if(!bt_tws_is_slave())
-        {
-            led_bt_idle();
-        }
-        else
-        {
-            led_bt_connected();
-        }
-        #endif // TRY_IDLE_LED
         if(bt_tws_is_slave()){
             ble_adv_dis();          //副机关闭BLE广播
             tws_res_cleanup();      //播tws提示音前先清一下单耳的提示音。不清会导致rpos慢主耳一步,导致一直w4
@@ -436,6 +430,18 @@ void bt_emit_notice(uint evt, void *params)
                 msg_enqueue(EVT_AUTO_PWFOFF_EN);
             }
         }
+#if TRY_GET_LR_VABT_FUNC
+        if(!bt_tws_is_slave())
+        {
+            printf("master : hfp_get_bat_level_ex()%d \n", hfp_get_bat_level_ex());
+            bt_tws_user_key((0xA000 | hfp_get_bat_level_ex()));
+        }
+        else
+        {
+            printf("slave : hfp_get_bat_level_ex()%d \n", hfp_get_bat_level_ex());
+            bt_tws_user_key((0xE000 | hfp_get_bat_level_ex()));
+        }
+#endif // TRY_GET_LR_VABT_FUNC
         break;
 //    case BT_NOTICE_TWS_CONNECT_FAIL:
 //        break;

+ 12 - 0
src/hlw2025141/app/modules/bluetooth/tws/tws.c

@@ -291,6 +291,18 @@ void bt_tws_role_change(u32 param)
 
 void tws_user_key_process(uint32_t *opcode)
 {
+#if TRY_GET_LR_VABT_FUNC
+    if(((*opcode) & 0xA000) == 0xE000) //过滤电量信息
+    {
+        sys_cb.rem_100_level_vbat = (u16)((*opcode)&0x1FFF);
+        return;
+    }
+    else if(((*opcode) & 0xE000) == 0xA000) //过滤电量信息
+    {
+        sys_cb.rem_100_level_vbat = (u16)((*opcode)&0x1FFF);
+        return;
+    }
+#endif // TRY_GET_LR_VABT_FUNC
 //*opcode
     app_tws_user_key_process(opcode);
 }

+ 4 - 0
src/hlw2025141/app/modules/charge/charge.c

@@ -183,6 +183,10 @@ void charge_process(void)
 AT(.text.charge)
 void charge_enter(u8 out_auto_pwron)
 {
+#if TRY_PAIRING_WARNING
+    sys_cb.pairing_warning_flag = false;
+    sys_cb.pairing_warning_delay = 0;
+#endif // TRY_PAIRING_WARNING
     printf("charge_enter\n");
 #if CHARGE_BOX_EN
     charge_box_enter(out_auto_pwron);

+ 18 - 0
src/hlw2025141/app/modules/music/bsp_music.c

@@ -459,6 +459,24 @@ void wsbc_res_play(u32 addr, u32 len)
 //提示音播报完毕,设置状态
 void bsp_res_play_exit_cb(uint8_t res_idx)
 {
+#if TRY_PAIRING_WARNING
+    if(TWS_RES_PAIRING == res_idx)
+    {
+        sys_cb.pairing_warning_flag = true;
+        sys_cb.pairing_warning_delay = 0;
+    }
+    else if(TWS_RES_CONNECTED == res_idx)
+    {
+        sys_cb.pairing_warning_flag = true;
+        sys_cb.pairing_warning_delay = 0;
+    }
+    else if(TWS_RES_DISCONNECT == res_idx)
+    {
+        sys_cb.pairing_warning_flag = false;
+        sys_cb.pairing_warning_delay = 0;
+    }
+#endif // TRY_PAIRING_WARNING
+
 #if BT_LOW_LATENCY_EN
     if (TWS_RES_MUSIC_MODE == res_idx) {
         printf("music mode\n");

+ 63 - 43
src/hlw2025141/app/projects/earphone/app.layout

@@ -2,114 +2,134 @@
 <CodeBlocks_layout_file>
 	<FileVersion major="1" minor="0" />
 	<ActiveTarget name="Debug" />
-	<File name="port\port_led.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="xcfg.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="5749" topLine="193" />
+			<Cursor1 position="2865" topLine="4" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\charge\charge.c" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="port\port_tkey.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="4913" topLine="192" />
+			<Cursor1 position="90" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\charge\charge_box.c" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\functions\func_bt_dut.c" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="5024" topLine="149" />
+			<Cursor1 position="2198" topLine="50" />
 		</Cursor>
 	</File>
-	<File name="..\..\functions\func_bt_dut.c" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\charge\charge.c" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2198" topLine="50" />
+			<Cursor1 position="4878" topLine="177" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\bluetooth\bt\profile.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="com\com_adv.c" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="4711" topLine="126" />
+			<Cursor1 position="0" topLine="116" />
 		</Cursor>
 	</File>
-	<File name="..\..\functions\func_bt.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\system\system.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="7021" topLine="235" />
+			<Cursor1 position="5551" topLine="178" />
 		</Cursor>
 	</File>
-	<File name="port\port_tkey.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\functions\func_bt.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="90" topLine="0" />
+			<Cursor1 position="6791" topLine="235" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\bluetooth\tws\tws_res_tbl.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\bluetooth\bt\hfhs.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="588" topLine="15" />
+			<Cursor1 position="2577" topLine="97" />
 		</Cursor>
 	</File>
-	<File name="..\..\libs\bt8930\api_music.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="port\port_led.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1224" topLine="43" />
+			<Cursor1 position="5749" topLine="193" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\gui\led\led.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="message\msg_bt.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="926" topLine="15" />
+			<Cursor1 position="17731" topLine="623" />
 		</Cursor>
 	</File>
-	<File name="..\..\system\system.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\charge\charge_box.c" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="5211" topLine="140" />
+			<Cursor1 position="5024" topLine="149" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\gui\led\led.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\music\bsp_music.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="4067" topLine="202" />
+			<Cursor1 position="11115" topLine="448" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\bluetooth\tws\tws_res_tbl.c" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\bluetooth\bt\profile.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="3072" topLine="90" />
+			<Cursor1 position="4711" topLine="126" />
 		</Cursor>
 	</File>
-	<File name="xcfg.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\bsp\bsp_huart.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2865" topLine="4" />
+			<Cursor1 position="1911" topLine="46" />
 		</Cursor>
 	</File>
-	<File name="..\..\system\system.c" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\libs\bt8930\api_music.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="9807" topLine="369" />
+			<Cursor1 position="1224" topLine="43" />
 		</Cursor>
 	</File>
-	<File name="..\..\functions\func.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\bluetooth\bsp_bt.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="15999" topLine="663" />
+			<Cursor1 position="13388" topLine="417" />
 		</Cursor>
 	</File>
-	<File name="message\msg_bt.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\bluetooth\tws\tws_res_tbl.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="10408" topLine="260" />
+			<Cursor1 position="588" topLine="15" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\bluetooth\bsp_bt.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\system\system.c" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="12162" topLine="393" />
+			<Cursor1 position="2565" topLine="66" />
 		</Cursor>
 	</File>
-	<File name="..\..\bsp\bsp_huart.c" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\functions\func.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1911" topLine="46" />
+			<Cursor1 position="15999" topLine="663" />
 		</Cursor>
 	</File>
-	<File name="..\..\modules\bluetooth\bt\hfhs.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\bluetooth\app\ab_mate\ab_mate_profile.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2577" topLine="97" />
+			<Cursor1 position="13661" topLine="366" />
 		</Cursor>
 	</File>
-	<File name="config.h" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\modules\gui\led\led.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="53854" topLine="697" />
+			<Cursor1 position="926" topLine="15" />
 		</Cursor>
 	</File>
-	<File name="..\..\functions\func_lowpwr.c" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\functions\func_lowpwr.c" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
 			<Cursor1 position="15555" topLine="580" />
 		</Cursor>
 	</File>
+	<File name="..\..\modules\gui\led\led.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="4067" topLine="202" />
+		</Cursor>
+	</File>
+	<File name="..\..\modules\bluetooth\tws\tws_res_tbl.c" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="3072" topLine="90" />
+		</Cursor>
+	</File>
+	<File name="..\..\modules\bluetooth\tws\tws.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="8825" topLine="274" />
+		</Cursor>
+	</File>
+	<File name="config.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="56714" topLine="714" />
+		</Cursor>
+	</File>
 </CodeBlocks_layout_file>

+ 12 - 0
src/hlw2025141/app/projects/earphone/message/msg_bt.c

@@ -372,9 +372,15 @@ void func_bt_message_do(u16 msg)
 #endif
 
     case MSG_SYS_1S:
+        #if TRY_PAIRING_WARNING
+        pairing_warning_process();
+        #endif // TRY_PAIRING_WARNING
         #if TRY_LOWBAT_WARNING_SWITCH
         lowbat_warning_process();
         #endif // TRY_LOWBAT_WARNING_SWITCH
+        #if TRY_GET_LR_VABT_FUNC
+        send_lr_vbat_process();
+        #endif // TRY_GET_LR_VABT_FUNC
         bt_hfp_report_bat();
 #if BT_TWS_DBG_EN
         bt_tws_report_dgb();
@@ -489,6 +495,9 @@ void sfunc_bt_ring_message_do(u16 msg)
         #if TRY_LOWBAT_WARNING_SWITCH
         lowbat_warning_process();
         #endif // TRY_LOWBAT_WARNING_SWITCH
+        #if TRY_GET_LR_VABT_FUNC
+        send_lr_vbat_process();
+        #endif // TRY_GET_LR_VABT_FUNC
         bt_hfp_report_bat();
         break;
 
@@ -629,6 +638,9 @@ void sfunc_bt_call_message_do(u16 msg)
         #if TRY_LOWBAT_WARNING_SWITCH
         lowbat_warning_process();
         #endif // TRY_LOWBAT_WARNING_SWITCH
+        #if TRY_GET_LR_VABT_FUNC
+        send_lr_vbat_process();
+        #endif // TRY_GET_LR_VABT_FUNC
         bt_hfp_report_bat();
         break;
 

+ 55 - 0
src/hlw2025141/app/system/system.c

@@ -14,6 +14,31 @@ bool exspiflash_init(void);
 void ledseg_6c6s_clr(void);
 u8 getcfg_buck_mode_en(void);
 
+#if TRY_PAIRING_WARNING
+void pairing_warning_process(void)
+{
+    if(!bt_nor_is_connected())
+    {
+        if(!sys_cb.pairing_warning_flag)
+        {
+            sys_cb.pairing_warning_delay++;
+            if(sys_cb.pairing_warning_delay >= 6)
+            {
+                bsp_res_play(TWS_RES_PAIRING);
+            }
+        }
+        else
+        {
+            sys_cb.pairing_warning_delay = 0;
+        }
+    }
+    else
+    {
+        sys_cb.pairing_warning_delay = 0;
+    }
+}
+#endif // TRY_PAIRING_WARNING
+
 #if TRY_LOWBAT_WARNING_SWITCH
 void lowbat_warning_process(void)
 {
@@ -45,6 +70,32 @@ void lowbat_warning_process(void)
 }
 #endif // TRY_LOWBAT_WARNING_SWITCH
 
+#if TRY_GET_LR_VABT_FUNC
+void send_lr_vbat_process(void)
+{
+    if(bt_tws_is_connected() && f_bt.disp_status >= BT_STA_PLAYING)
+    {
+        sys_cb.send_vbat_delay++;
+        if(!bt_tws_is_slave())
+        {
+            if(sys_cb.send_vbat_delay >= 10)
+            {
+                sys_cb.send_vbat_delay = 0;
+                bt_tws_user_key((0xA000 | hfp_get_bat_level_ex()));
+            }
+        }
+        else
+        {
+            if(sys_cb.send_vbat_delay >= 13)
+            {
+                sys_cb.send_vbat_delay = 0;
+                bt_tws_user_key((0xE000 | hfp_get_bat_level_ex()));
+            }
+        }
+    }
+}
+#endif // TRY_GET_LR_VABT_FUNC
+
 #if BT_PWRKEY_5S_DISCOVER_EN
 AT(.com_text.detect)
 void pwrkey_5s_on_check(void)
@@ -434,6 +485,10 @@ static void sys_var_init(void)
     anc_var_init();
 #endif
 
+#if TRY_PAIRING_WARNING
+    sys_cb.pairing_warning_flag = false;
+    sys_cb.pairing_warning_delay = 0;
+#endif // TRY_PAIRING_WARNING
 #if TRY_LOWBAT_WARNING_SWITCH
     sys_cb.lowbat_time = 0;
     sys_cb.vbat_level = 0;

+ 14 - 0
src/hlw2025141/app/system/system.h

@@ -161,10 +161,18 @@ volatile u8  dc_in_filter;      //DC IN filter
 #endif // BT_TWS_EN
 #endif // ANC_ALG_DYVOL_FF_EN
 
+#if TRY_PAIRING_WARNING
+    bool pairing_warning_flag;
+    u8 pairing_warning_delay;
+#endif // TRY_PAIRING_WARNING
 #if TRY_LOWBAT_WARNING_SWITCH
     u16 lowbat_time;
     u8 vbat_level;
 #endif // TRY_LOWBAT_WARNING_SWITCH
+#if TRY_GET_LR_VABT_FUNC
+    u8 send_vbat_delay;
+    u8 rem_100_level_vbat;
+#endif // TRY_GET_LR_VABT_FUNC
 } sys_cb_t;
 extern sys_cb_t sys_cb;
 
@@ -192,8 +200,14 @@ void get_usb_chk_sta_convert(void);
 uint bsp_get_bat_level(void);
 void sd_soft_cmd_detect(u32 check_ms);
 
+#if TRY_PAIRING_WARNING
+void pairing_warning_process(void);
+#endif // TRY_PAIRING_WARNING
 #if TRY_LOWBAT_WARNING_SWITCH
 void lowbat_warning_process(void);
 #endif // TRY_LOWBAT_WARNING_SWITCH
+#if TRY_GET_LR_VABT_FUNC
+void send_lr_vbat_process(void);
+#endif // TRY_GET_LR_VABT_FUNC
 
 #endif // __SYSTEM_H