Index: format/rom.format
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/format/rom.format	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/format/rom.format	(working copy)
@@ -9778,7 +9778,7 @@
 1 mem_rgb_led_on_continue_1min_timeout_flag
 1 mem_mbutton_function_disable
 1 mem_mouse_rgb_ctrl_gpio
-
+1 mem_mouse_rgb_adc_no_power_flag
 )
 
 
Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/output/eeprom.dat	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/output/eeprom.dat	(working copy)
@@ -902,8 +902,8 @@
 42
 20
 20
-3f
-1d
+02
+38
 6f
 e0
 cc
@@ -6600,8 +6600,8 @@
 20
 26
 f6
-f1
-51
+9d
+8a
 aa
 55
 40
Index: output/flash.dat
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/output/flash.dat	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/output/flash.dat	(working copy)
@@ -902,8 +902,8 @@
 42
 20
 20
-3f
-1d
+02
+38
 6f
 e0
 cc
@@ -6600,8 +6600,8 @@
 20
 26
 f6
-f1
-51
+9d
+8a
 aa
 55
 40
Index: output/memmap.format
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/output/memmap.format	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/output/memmap.format	(working copy)
@@ -2292,6 +2292,7 @@
 0x4cb2 mem_rgb_led_on_continue_1min_timeout_flag
 0x4cb3 mem_mbutton_function_disable
 0x4cb4 mem_mouse_rgb_ctrl_gpio
+0x4cb5 mem_mouse_rgb_adc_no_power_flag
 0x48d0 mem_remote_car_hard_soft_switch
 0x48d1 mem_remote_car_queue_each_size
 0x48d2 mem_remote_car_queue_length
Index: output/otp.dat
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/output/otp.dat	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/output/otp.dat	(working copy)
@@ -902,8 +902,8 @@
 42
 20
 20
-3f
-1d
+02
+38
 6f
 e0
 cc
@@ -6600,8 +6600,8 @@
 20
 26
 f6
-f1
-51
+9d
+8a
 aa
 55
 40
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/output/program.lis	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/output/program.lis	(working copy)
@@ -288,7 +288,7 @@
 00dd 6fe0cc40 fetch 1 ,mem_mouse_led_new_interface_config 
 00de c3003f1c bbit0 mouse_enable_1io2led ,mouse_power_down 
 00df 20400442 call p_mouse_device_multi_led_all_off 
-00e0 20203f1d branch mouse_power_down + 1 
+00e0 20200238 branch p_mouse_app_enter_hibernate 
 
 p_mouse_adc_no_low_voltage:
 00e1 6fe0cc40 fetch 1 ,mem_mouse_led_new_interface_config 
Index: output/ramcode.rom
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/output/ramcode.rom	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/output/ramcode.rom	(working copy)
@@ -222,7 +222,7 @@
 6fe0cc40
 c3003f1c
 20400442
-20203f1d
+20200238
 6fe0cc40
 c3003ed0
 d8e00004
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/mouse_public_sdk/program/patch.prog	(revision 1932)
+++ /YC1308AC/branch/mouse_project/mouse_public_sdk/program/patch.prog	(working copy)
@@ -8,6 +8,7 @@
 define S201X_SENSOR
 //define RGB_LED
 //define RGB_LED_MKEY
+//define RGB_LED_ON_AFTER_PAIR
 
 
 	bbit1 8,pf_patch_ext
@@ -327,7 +328,7 @@
 	fetch 1,mem_mouse_led_new_interface_config		//can be remove?
 	bbit0 MOUSE_ENABLE_1IO2LED,mouse_power_down
 	call p_mouse_device_multi_led_all_off
-	branch mouse_power_down+1
+	branch p_mouse_app_enter_hibernate
 	
 p_mouse_adc_no_low_voltage:
 	fetch 1,mem_mouse_led_new_interface_config
@@ -456,6 +457,10 @@
 	call p_mouse_setting_config
 	call p_mouse_init_sunt
 	rtn wake
+ifdef RGB_LED_ON_AFTER_PAIR
+	jam 1,mem_rgb_led_on_continue_1min_timeout_flag
+	call p_mouse_rgb_led_off_time_init
+endif
 	call mouse_dpi_config
 	call mouse_usb_check_enable
 	call mouse_drawing_optima_init
@@ -813,11 +818,19 @@
 /////////////////////////////////// g24 250Hz use lpm//////////////////////////////////////
 	
 p_mouse_app_enter_hibernate:	// 1.3mA hibernate after sensroe reset
+ifdef RGB_LED
+	fetch 1,mem_mouse_rgb_adc_no_power_flag
+	nrtn blank
+	jam 1,mem_mouse_rgb_adc_no_power_flag
+endif
 	setarg PAN_REG_CONFIG
 	call twspi_read
 	bbit1 3,mouse_app_enter_hibernate+3
 	call p_mouse_sensor_reset
 	call p_mouse_sensor_powerdown
+ifdef RGB_LED
+	branch p_mouse_rgb_led_off
+endif
 	branch mouse_app_enter_hibernate+3
 
 p_mouse_setgpio_hibernate:
@@ -955,10 +968,16 @@
 	branch mouse_bt_hid_handshake+3
 
 p_mouse_le_bb_event_connected:
+ifdef RGB_LED_ON_AFTER_PAIR
+	call p_mouse_rgb_led_on_check_next
+endif
 	call p_mouse_device_poweron_led_config
 	branch mouse_le_bb_event_connected
 p_mouse_bb_event_connected:
 	call mouse_no_data_timer_init
+ifdef RGB_LED_ON_AFTER_PAIR
+	call p_mouse_rgb_led_on_check_next
+endif
 	call p_mouse_device_poweron_led_config
 	branch mouse_bb_event_connected
 	
@@ -1000,6 +1019,9 @@
 	rtn
 	
 p_mouse_24g_pairing_complete:
+ifdef RGB_LED_ON_AFTER_PAIR
+	call p_mouse_rgb_led_on_check_next
+endif
 	call p_mouse_soft_agc_disable
 	call p_mouse_fetch_normal_tx_power
 	call mouse_no_data_timer_init
@@ -1009,6 +1031,9 @@
 	branch mouse_24g_pairing_complete+2
 
 p_mouse_24g_attempt_success:
+ifdef RGB_LED_ON_AFTER_PAIR
+	call p_mouse_rgb_led_on_check_next
+endif
 	fetch 4,mem_24g_addr
 	store 4,mem_24g_receiver_addr
 	store 4,mem_mouse_24g_addr		// if need store 24g address to eeprom/flash,need get mem_24g_addr
@@ -1074,8 +1099,7 @@
 p_mouse_24g_hibernate_set:
 ifdef RGB_LED
 	set0 mark_24g,mark
-	jam 0,mem_rgb_led_on_continue_1min_timeout_flag
-	branch p_mouse_rgb_led_off_time_init
+	branch p_mouse_rgb_led_off
 endif
 p_mouse_24g_hibernate_set_next:
 	jam 0,mem_24g_attempt_fail_flag
@@ -1366,6 +1390,10 @@
 ****rgb on--mbutton output active 1s****
 ****rgb off--mbutton output active 3s****
 **********************/
+p_mouse_rgb_led_off:
+	jam 0,mem_rgb_led_on_continue_1min_timeout_flag
+	branch p_mouse_rgb_led_off_time_init
+	
 p_mouse_rgb_led_off_enable_timer:
 	fetch 1,mem_rgb_led_off_enable
 	rtn blank
@@ -1378,7 +1406,9 @@
 	fetch 1,mem_rgb_led_on_continue_1min_timeout_flag
 	nrtn blank
 	jam 0,mem_rgb_led_on_continue_1min_timeout_flag
-	branch p_mouse_24g_hibernate_set_next
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,p_mouse_24g_hibernate_set_next
+	branch mouse_app_enter_hibernate+3
 	
 p_mouse_rgb_led_off_time_init:
 	jam 0x1e,mem_rgb_led_off_enable_timer
@@ -2015,6 +2045,7 @@
 	store 2,mem_rgb_led_on_check_count
 	fetch 1,mem_rgb_led_on_enable
 	rtneq ON
+p_mouse_rgb_led_on_check_next:
 	jam ON,mem_rgb_led_on_enable
 	jam OFF,mem_rgb_led_off_enable
 	jam 11,mem_rgb_led_on_enable_timer
