Index: format/app_mouse.format
===================================================================
--- /1306ac/branch/mouse/branch/mouse_public_xzr/format/app_mouse.format	(revision 458)
+++ /1306ac/branch/mouse/branch/mouse_public_xzr/format/app_mouse.format	(working copy)
@@ -401,6 +401,10 @@
 1 mem_mouse_ice_sdio_for_sensor_angle
 1 mem_mouse_logo_enable_gpio0
 
+1 mem_mouse_commbination_dpi_check_enable
+1 mem_commbination_dpi_timer
+1 mem_mouse_commbination_key_dpi
+
 )
 
 
Index: output/eeprom.dat
===================================================================
--- /1306ac/branch/mouse/branch/mouse_public_xzr/output/eeprom.dat	(revision 458)
+++ /1306ac/branch/mouse/branch/mouse_public_xzr/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-26
+2e
 03
 c2
 84
@@ -23,11 +23,11 @@
 c0
 27
 00
-8e
+90
 c0
 29
 00
-a1
+a3
 c0
 2d
 00
@@ -119,7 +119,7 @@
 20
 40
 00
-b7
+b9
 d8
 40
 00
@@ -445,17 +445,25 @@
 7e
 00
 c0
+1c
+80
+72
+c0
 1e
 00
-71
+73
 c0
 1d
 00
-7d
+7f
 20
 20
 59
 14
+20
+20
+5e
+21
 6f
 e2
 44
@@ -523,11 +531,11 @@
 c0
 02
 00
-84
+86
 c0
 01
 80
-89
+8b
 20
 20
 5d
@@ -627,7 +635,7 @@
 20
 40
 00
-9d
+9f
 20
 20
 5a
@@ -667,7 +675,7 @@
 20
 40
 00
-c3
+c5
 6f
 e2
 49
@@ -675,7 +683,7 @@
 20
 3a
 00
-af
+b1
 67
 e2
 49
@@ -703,7 +711,7 @@
 20
 20
 00
-a5
+a7
 6f
 e2
 49
@@ -747,7 +755,7 @@
 20
 40
 00
-c3
+c5
 6f
 e2
 49
@@ -755,7 +763,7 @@
 20
 3a
 00
-c6
+c8
 67
 e2
 49
@@ -775,7 +783,7 @@
 24
 21
 00
-c6
+c8
 1a
 42
 7e
@@ -783,7 +791,7 @@
 20
 20
 00
-b9
+bb
 d8
 40
 00
@@ -808,8 +816,8 @@
 60
 00
 00
-a7
-f0
+e2
+83
 aa
 55
 06
@@ -1074,7 +1082,7 @@
 ff
 ff
 ff
-07
+ff
 aa
 55
 01
@@ -1351,16 +1359,20 @@
 00
 aa
 55
-01
+05
 00
 11
 49
 01
+00
+00
+00
+05
 55
 aa
 aa
 55
-21
-a3
-0b
-c5
+22
+a4
+76
+11
Index: output/memmap.format
===================================================================
--- /1306ac/branch/mouse/branch/mouse_public_xzr/output/memmap.format	(revision 458)
+++ /1306ac/branch/mouse/branch/mouse_public_xzr/output/memmap.format	(working copy)
@@ -1686,6 +1686,9 @@
 0x490d mem_mouse_24g_addr_temp
 0x4911 mem_mouse_ice_sdio_for_sensor_angle
 0x4912 mem_mouse_logo_enable_gpio0
+0x4913 mem_mouse_commbination_dpi_check_enable
+0x4914 mem_commbination_dpi_timer
+0x4915 mem_mouse_commbination_key_dpi
 0x443c mem_shutter_bluetooth_type
 0x443d mem_shutter_config_eeprom_offset_addr
 0x443f mem_shutter_config_eeprom_start_flag
Index: output/program.lis
===================================================================
--- /1306ac/branch/mouse/branch/mouse_public_xzr/output/program.lis	(revision 458)
+++ /1306ac/branch/mouse/branch/mouse_public_xzr/output/program.lis	(working copy)
@@ -4,8 +4,8 @@
 0001 c01e8050 beq patch07_5 ,p_mouse_setgpio_hibernate 
 0002 c0230062 beq patch08_6 ,p_mouse_3io6key_check 
 0003 c026006d beq patch09_4 ,p_mouse_priority_bb_event 
-0004 c027008e beq patch09_6 ,p_mouse_bb_event_timer 
-0005 c02900a1 beq patch0a_2 ,p_mouse_store_device_info 
+0004 c0270090 beq patch09_6 ,p_mouse_bb_event_timer 
+0005 c02900a3 beq patch0a_2 ,p_mouse_store_device_info 
 0006 c02d0045 beq patch0b_2 ,p_mouse_24g_package_data 
 0007 c02f0030 beq patch0b_6 ,p_mouse_ui_led_off_static 
 0008 c02f8034 beq patch0b_7 ,p_mouse_ui_led_on_static 
@@ -38,7 +38,7 @@
 001b c40b8000 rtnbit0 mouse_enable_otp 
 
 p_mouse_load_otp_info_check:
-001c 204000b7 call p_mouse_read_otp_24g_addr 
+001c 204000b9 call p_mouse_read_otp_24g_addr 
 
 p_mouse_otp_load_app_initflag:
 001d d8400002 arg 2 ,temp 
@@ -154,127 +154,131 @@
 
 p_mouse_priority_bb_event:
 006d 1a627e00 copy regc ,pdata 
-006e c01e0071 beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
-006f c01d007d beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
-0070 20205914 branch mouse_priority_bb_event + 2 
+006e c01c8072 beq bt_evt_24g_pairing_complete ,p_mouse_24g_pairing_complete 
+006f c01e0073 beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
+0070 c01d007f beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
+0071 20205914 branch mouse_priority_bb_event + 2 
+
+p_mouse_24g_pairing_complete:
+0072 20205e21 branch mouse_24g_pairing_complete 
 
 p_mouse_24g_attempt_success:
-0071 6fe244da fetch 4 ,mem_24g_addr 
-0072 67e24533 store 4 ,mem_24g_receiver_addr 
-0073 67e24640 store 4 ,mem_mouse_24g_addr 
-0074 20404bce call g24_ch_syncword_crc8_init 
-0075 20405e1b call mouse_device_poweron_led_config 
-0076 20405aa9 call mouse_no_data_timer_init 
-0077 204058c4 call mouse_init_sensor_reset 
-0078 70476800 jam 0 ,mem_mouse_long_mult_flag 
-0079 70454700 jam 0 ,mem_24g_conn_sm 
-007a 70452d00 jam 0 ,mem_24g_reconn_type 
-007b 684a4533 fetcht 4 ,mem_24g_receiver_addr 
-007c 20205e17 branch mouse_24g_attempt_success + 11 
+0073 6fe244da fetch 4 ,mem_24g_addr 
+0074 67e24533 store 4 ,mem_24g_receiver_addr 
+0075 67e24640 store 4 ,mem_mouse_24g_addr 
+0076 20404bce call g24_ch_syncword_crc8_init 
+0077 20405e1b call mouse_device_poweron_led_config 
+0078 20405aa9 call mouse_no_data_timer_init 
+0079 204058c4 call mouse_init_sensor_reset 
+007a 70476800 jam 0 ,mem_mouse_long_mult_flag 
+007b 70454700 jam 0 ,mem_24g_conn_sm 
+007c 70452d00 jam 0 ,mem_24g_reconn_type 
+007d 684a4533 fetcht 4 ,mem_24g_receiver_addr 
+007e 20205e17 branch mouse_24g_attempt_success + 11 
 
 p_mouse_24g_attempt_fail:
-007d 6fe0c54b fetch 1 ,mem_24g_attempt_fail_flag 
-007e 243a5d80 nbranch mouse_24g_hibernate_set ,blank 
-007f 6fe0c52d fetch 1 ,mem_24g_reconn_type 
-0080 c0015df4 beq fast_conn_and_3_0_addr ,mouse_24g_fast_conn_attempt_fail 
-0081 c0020084 beq pair_and_3_0_addr ,p_mouse_24g_auto_pair_attempt_fail 
-0082 c0018089 beq receiver_and_3_0_addr ,p_mouse_reconn_dongle_attempt_fail 
-0083 20205ded branch mouse_24g_attempt_fail_enter_hibernate_next 
+007f 6fe0c54b fetch 1 ,mem_24g_attempt_fail_flag 
+0080 243a5d80 nbranch mouse_24g_hibernate_set ,blank 
+0081 6fe0c52d fetch 1 ,mem_24g_reconn_type 
+0082 c0015df4 beq fast_conn_and_3_0_addr ,mouse_24g_fast_conn_attempt_fail 
+0083 c0020086 beq pair_and_3_0_addr ,p_mouse_24g_auto_pair_attempt_fail 
+0084 c001808b beq receiver_and_3_0_addr ,p_mouse_reconn_dongle_attempt_fail 
+0085 20205ded branch mouse_24g_attempt_fail_enter_hibernate_next 
 
 p_mouse_24g_auto_pair_attempt_fail:
-0084 6fe44864 fetch mouse_flag_len ,mem_mouse_flag 
-0085 c317dded bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate_next 
-0086 6fe0c86c fetch 1 ,mem_device_number 
-0087 c000dded beq 1 ,mouse_24g_attempt_fail_enter_hibernate_next 
-0088 20205dcb branch mouse_24g_first_bluetooth_reconnect 
+0086 6fe44864 fetch mouse_flag_len ,mem_mouse_flag 
+0087 c317dded bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate_next 
+0088 6fe0c86c fetch 1 ,mem_device_number 
+0089 c000dded beq 1 ,mouse_24g_attempt_fail_enter_hibernate_next 
+008a 20205dcb branch mouse_24g_first_bluetooth_reconnect 
 
 p_mouse_reconn_dongle_attempt_fail:
-0089 6fe44864 fetch mouse_flag_len ,mem_mouse_flag 
-008a c317dded bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate_next 
-008b c289dded bbit1 mouse_enable_eeprom ,mouse_24g_attempt_fail_enter_hibernate_next 
-008c c2895ded bbit1 mouse_enable_flash ,mouse_24g_attempt_fail_enter_hibernate_next 
-008d 20205dc4 branch mouse_24g_start_auto_pair + 1 
+008b 6fe44864 fetch mouse_flag_len ,mem_mouse_flag 
+008c c317dded bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate_next 
+008d c289dded bbit1 mouse_enable_eeprom ,mouse_24g_attempt_fail_enter_hibernate_next 
+008e c2895ded bbit1 mouse_enable_flash ,mouse_24g_attempt_fail_enter_hibernate_next 
+008f 20205dc4 branch mouse_24g_start_auto_pair + 1 
 
 p_mouse_bb_event_timer:
-008e 204053c6 call mouse_adc_read 
-008f 20405f47 call mouse_low_voltage_led_timer 
-0090 20404907 call g24_pair_timeout_timer 
-0091 20404ba5 call g24_reconn_timeout_timer 
-0092 20405d6b call mouse_24g_long_sleep_param_update_timer 
-0093 20405e9a call mouse_device_poweron_timer 
-0094 20405ecb call mouse_dpi_led_blink_delay_timer 
-0095 20405ac1 call mouse_led_multi_timer 
-0096 20405af3 call mouse_logo_led_on_timer 
-0097 2040561c call mouse_dpi_key_check_long_press 
-0098 20405a36 call mouse_bt_discovery_check 
-0099 20405a46 call mouse_commbination_key_process 
-009a 20405a69 call mouse_check_discovery_timeout_timer 
-009b 2040009d call p_mouse_check_direct_timeout_timer 
-009c 20205a2d branch mouse_bb_event_timer + 15 
+0090 204053c6 call mouse_adc_read 
+0091 20405f47 call mouse_low_voltage_led_timer 
+0092 20404907 call g24_pair_timeout_timer 
+0093 20404ba5 call g24_reconn_timeout_timer 
+0094 20405d6b call mouse_24g_long_sleep_param_update_timer 
+0095 20405e9a call mouse_device_poweron_timer 
+0096 20405ecb call mouse_dpi_led_blink_delay_timer 
+0097 20405ac1 call mouse_led_multi_timer 
+0098 20405af3 call mouse_logo_led_on_timer 
+0099 2040561c call mouse_dpi_key_check_long_press 
+009a 20405a36 call mouse_bt_discovery_check 
+009b 20405a46 call mouse_commbination_key_process 
+009c 20405a69 call mouse_check_discovery_timeout_timer 
+009d 2040009f call p_mouse_check_direct_timeout_timer 
+009e 20205a2d branch mouse_bb_event_timer + 15 
 
 p_mouse_check_direct_timeout_timer:
-009d da604831 arg mem_mouse_direct_timer ,regc 
-009e da405a74 arg mouse_check_direct_timeout ,regb 
-009f 20404dcc call timer_single_step 
-00a0 20205a71 branch mouse_check_direct_timeout_timer + 3 
+009f da604831 arg mem_mouse_direct_timer ,regc 
+00a0 da405a74 arg mouse_check_direct_timeout ,regb 
+00a1 20404dcc call timer_single_step 
+00a2 20205a71 branch mouse_check_direct_timeout_timer + 3 
 
 p_mouse_store_device_info:
-00a1 20405b90 call mouse_store_device_info + 1 
-00a2 c40b8000 rtnbit0 mouse_enable_otp 
+00a3 20405b90 call mouse_store_device_info + 1 
+00a4 c40b8000 rtnbit0 mouse_enable_otp 
 
 p_mouse_store_otp_device_info:
 
 p_mouse_otp_store_24g_addr:
-00a3 dfe00790 arg otp_offset_24g_addr ,pdata 
-00a4 1fe22400 copy pdata ,regb 
+00a5 dfe00790 arg otp_offset_24g_addr ,pdata 
+00a6 1fe22400 copy pdata ,regb 
 
 p_mouse_otp_store_24g_addr_loop:
-00a5 204000c3 call p_mouse_read_otp_24g_addr_common 
-00a6 6fe2490d fetch 4 ,mem_mouse_24g_addr_temp 
-00a7 203a00af branch p_mouse_24g_addr_store ,blank 
-00a8 67e24909 store 4 ,mem_mouse_24g_addr_last 
-00a9 1a40a404 increase 4 ,regb 
-00aa dfe007cf arg otp_offset_24g_addr_end ,pdata 
-00ab 9a467c00 isub regb ,null 
-00ac 24610000 nrtn positive 
-00ad 1a427e00 copy regb ,pdata 
-00ae 202000a5 branch p_mouse_otp_store_24g_addr_loop 
+00a7 204000c5 call p_mouse_read_otp_24g_addr_common 
+00a8 6fe2490d fetch 4 ,mem_mouse_24g_addr_temp 
+00a9 203a00b1 branch p_mouse_24g_addr_store ,blank 
+00aa 67e24909 store 4 ,mem_mouse_24g_addr_last 
+00ab 1a40a404 increase 4 ,regb 
+00ac dfe007cf arg otp_offset_24g_addr_end ,pdata 
+00ad 9a467c00 isub regb ,null 
+00ae 24610000 nrtn positive 
+00af 1a427e00 copy regb ,pdata 
+00b0 202000a7 branch p_mouse_otp_store_24g_addr_loop 
 
 p_mouse_24g_addr_store:
-00af 6fe24909 fetch 4 ,mem_mouse_24g_addr_last 
-00b0 684a4640 fetcht 4 ,mem_mouse_24g_addr 
-00b1 98467c00 isub temp ,null 
-00b2 20628000 rtn zero 
-00b3 df200004 arg 4 ,loopcnt 
-00b4 da204640 arg mem_mouse_24g_addr ,rega 
-00b5 1a427e00 copy regb ,pdata 
-00b6 20206883 branch otp_write 
+00b1 6fe24909 fetch 4 ,mem_mouse_24g_addr_last 
+00b2 684a4640 fetcht 4 ,mem_mouse_24g_addr 
+00b3 98467c00 isub temp ,null 
+00b4 20628000 rtn zero 
+00b5 df200004 arg 4 ,loopcnt 
+00b6 da204640 arg mem_mouse_24g_addr ,rega 
+00b7 1a427e00 copy regb ,pdata 
+00b8 20206883 branch otp_write 
 
 p_mouse_read_otp_24g_addr:
-00b7 dfe00790 arg otp_offset_24g_addr ,pdata 
-00b8 1fe22400 copy pdata ,regb 
+00b9 dfe00790 arg otp_offset_24g_addr ,pdata 
+00ba 1fe22400 copy pdata ,regb 
 
 p_mouse_read_otp_24g_addr_loop:
-00b9 204000c3 call p_mouse_read_otp_24g_addr_common 
-00ba 6fe2490d fetch 4 ,mem_mouse_24g_addr_temp 
-00bb 203a00c6 branch p_mouse_24g_addr_load ,blank 
-00bc 67e24909 store 4 ,mem_mouse_24g_addr_last 
-00bd 1a40a404 increase 4 ,regb 
-00be dfe007cf arg otp_offset_24g_addr_end ,pdata 
-00bf 9a467c00 isub regb ,null 
-00c0 242100c6 nbranch p_mouse_24g_addr_load ,positive 
-00c1 1a427e00 copy regb ,pdata 
-00c2 202000b9 branch p_mouse_read_otp_24g_addr_loop 
+00bb 204000c5 call p_mouse_read_otp_24g_addr_common 
+00bc 6fe2490d fetch 4 ,mem_mouse_24g_addr_temp 
+00bd 203a00c8 branch p_mouse_24g_addr_load ,blank 
+00be 67e24909 store 4 ,mem_mouse_24g_addr_last 
+00bf 1a40a404 increase 4 ,regb 
+00c0 dfe007cf arg otp_offset_24g_addr_end ,pdata 
+00c1 9a467c00 isub regb ,null 
+00c2 242100c8 nbranch p_mouse_24g_addr_load ,positive 
+00c3 1a427e00 copy regb ,pdata 
+00c4 202000bb branch p_mouse_read_otp_24g_addr_loop 
 
 p_mouse_read_otp_24g_addr_common:
-00c3 d8400004 arg 4 ,temp 
-00c4 da20490d arg mem_mouse_24g_addr_temp ,rega 
-00c5 202068c5 branch otpd_read_data_with_pwr_operation 
+00c5 d8400004 arg 4 ,temp 
+00c6 da20490d arg mem_mouse_24g_addr_temp ,rega 
+00c7 202068c5 branch otpd_read_data_with_pwr_operation 
 
 p_mouse_24g_addr_load:
-00c6 6fe24909 fetch 4 ,mem_mouse_24g_addr_last 
-00c7 67e24640 store 4 ,mem_mouse_24g_addr 
-00c8 20600000 rtn 
+00c8 6fe24909 fetch 4 ,mem_mouse_24g_addr_last 
+00c9 67e24640 store 4 ,mem_mouse_24g_addr 
+00ca 20600000 rtn 
               org 0x3800
 
 start:
Index: program/patch.prog
===================================================================
--- /1306ac/branch/mouse/branch/mouse_public_xzr/program/patch.prog	(revision 458)
+++ /1306ac/branch/mouse/branch/mouse_public_xzr/program/patch.prog	(working copy)
@@ -2,6 +2,7 @@
 //define SENSOR_ANGLE_ICE_SDIO
 //define DPI_LOAD_AND_STORE
 //define ADC_ENABLE
+//define COMMBINATION_DPI
 
 	bbit1 8,pf_patch_ext
 ifdef SENSOR_ANGLE_ICE_SDIO
@@ -38,6 +39,9 @@
 	call p_mouse_setting_config
 	call mouse_init_sunt
 	rtn wake
+ifdef COMMBINATION_DPI
+	jam 0,mem_mouse_commbination_dpi_check_enable
+endif
 	call mouse_le_name_load		//config tool
 	call mouse_dpi_config
 	call mouse_drawing_optima_init
@@ -208,11 +212,21 @@
 	
 p_mouse_priority_bb_event:
 	copy regc,pdata
+	beq BT_EVT_24G_PAIRING_COMPLETE,p_mouse_24g_pairing_complete
 	beq BT_EVT_24G_ATTEMPT_SUCCESS,p_mouse_24g_attempt_success
 	beq BT_EVT_24G_ATTEMPT_FAIL,p_mouse_24g_attempt_fail
 	branch mouse_priority_bb_event+2
 
+p_mouse_24g_pairing_complete:
+ifdef COMMBINATION_DPI
+	jam 1,mem_mouse_commbination_dpi_check_enable
+endif
+	branch mouse_24g_pairing_complete
+
 p_mouse_24g_attempt_success:
+ifdef COMMBINATION_DPI
+	jam 1,mem_mouse_commbination_dpi_check_enable
+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
@@ -256,6 +270,9 @@
 	call g24_pair_timeout_timer
 	call g24_reconn_timeout_timer
 	call mouse_24g_long_sleep_param_update_timer
+ifdef COMMBINATION_DPI
+	call p_mouse_commbination_dpi_check_timer
+endif
 	//led
 	call mouse_device_poweron_timer
 	call mouse_dpi_led_blink_delay_timer
@@ -270,6 +287,25 @@
 	call p_mouse_check_direct_timeout_timer
 	branch mouse_bb_event_timer+15
 
+ifdef COMMBINATION_DPI
+p_mouse_commbination_dpi_check_timer:
+	fetch 1,mem_mouse_commbination_key_dpi
+	rtneq GPIO_DISABLE
+	fetch 1,mem_mouse_commbination_dpi_check_enable
+	rtn blank
+	call mouse_check_key_gpio
+	and pdata,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key_dpi
+	isub temp,null
+	branch p_mouse_commbination_dpi_check,zero
+	jam 0x01,mem_commbination_dpi_timer
+	rtn
+p_mouse_commbination_dpi_check:	
+	arg mem_commbination_dpi_timer,regc
+	arg mouse_dpi_process+3,regb		//skip gost key
+	branch timer_single_step
+endif
+
 p_mouse_check_direct_timeout_timer:
 	arg mem_mouse_direct_timer,regc
 	arg mouse_check_direct_timeout,regb
Index: sched/mouse_basic.dat
===================================================================
--- /1306ac/branch/mouse/branch/mouse_public_xzr/sched/mouse_basic.dat	(revision 458)
+++ /1306ac/branch/mouse/branch/mouse_public_xzr/sched/mouse_basic.dat	(working copy)
@@ -131,7 +131,7 @@
 ff  #mem_mouse_1io2led_multi_24g_gpio
 ff  #mem_mouse_1io2led_multi_bt1_gpio
 ff  #mem_mouse_1io2led_multi_bt2_gpio
-07  #mem_mouse_logo_led_gpio
+ff  #mem_mouse_logo_led_gpio
 
 
 #mouse sensor angle
@@ -213,6 +213,7 @@
 mem_24g_fast_conn_enable:01
 mem_24g_fast_conn_addr:0f 0f 0f 0f
 mem_mouse_commbination_key_24g:03 #03--LR  05--LM  06--RM  07---LMR
+mem_mouse_commbination_key_dpi:05
 mem_24g_ch_map_update:00   #00--disable   01--enable
 mem_24g_long_sleep_set_level:02    #00--30ms   01--50ms  02--80ms  03--100ms
 mem_24g_disable_fec1:00	 #00--default mode  01--new process
