Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/mouse_public_4mode_usb/output/eeprom.dat	(revision 3566)
+++ /YC1308AF/branch/mouse/mouse_public_4mode_usb/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-1e
+26
 1a
 c2
 84
@@ -3891,7 +3891,7 @@
 20
 40
 06
-56
+58
 20
 60
 00
@@ -6335,7 +6335,7 @@
 20
 20
 06
-3f
+40
 6f
 e0
 c9
@@ -6353,6 +6353,10 @@
 af
 00
 70
+4c
+be
+00
+70
 0b
 fa
 00
@@ -6428,6 +6432,10 @@
 4c
 af
 01
+70
+4c
+be
+01
 20
 40
 02
@@ -6531,7 +6539,7 @@
 20
 20
 06
-60
+62
 6f
 f0
 8c
@@ -6547,7 +6555,7 @@
 c3
 0a
 86
-66
+68
 6f
 e0
 cb
@@ -6555,7 +6563,7 @@
 c0
 00
 86
-6c
+6e
 20
 40
 37
@@ -6587,7 +6595,7 @@
 20
 3a
 06
-77
+79
 6f
 e4
 4b
@@ -6603,11 +6611,11 @@
 c0
 01
 86
-79
+7b
 c0
 01
 06
-80
+82
 20
 40
 37
@@ -6631,7 +6639,7 @@
 20
 20
 06
-6f
+71
 20
 40
 37
@@ -6688,8 +6696,8 @@
 60
 00
 00
-b0
-e5
+3f
+34
 aa
 55
 40
@@ -8089,16 +8097,8 @@
 55
 d8
 a1
-f1
-cf
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+4e
+69
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-38
-32
+5c
+93
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/mouse_public_4mode_usb/output/program.lis	(revision 3566)
+++ /YC1308AF/branch/mouse/mouse_public_4mode_usb/output/program.lis	(working copy)
@@ -1297,7 +1297,7 @@
 03c8 20404714 call mouse_bt_button_check 
 03c9 20403fc8 call mouse_wheel_check 
 03ca 20400625 call p_mouse_usb_isr 
-03cb 20400656 call p_mouse_usb_mode 
+03cb 20400658 call p_mouse_usb_mode 
 03cc 20600000 rtn 
 
 p_mouse_select_device_check:
@@ -2134,115 +2134,117 @@
 062b 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
 062c 204060fd call gpio_get_bit 
 062d 2420862f nbranch p_mouse_usb_gpio_low ,true 
-062e 2020063f branch p_mouse_usb_gpio_high 
+062e 20200640 branch p_mouse_usb_gpio_high 
 
 p_mouse_usb_gpio_low:
 062f 6fe0c930 fetch 1 ,mem_mouse_usb_vdd_status 
 0630 c1528000 rtneq mouse_usb_interface_remove 
 0631 704930a5 jam mouse_usb_interface_remove ,mem_mouse_usb_vdd_status 
 0632 704caf00 jam 0 ,mem_usb_mode_enable 
-0633 700bfa00 jam 0 ,mem_usb_device_enumeration_endflag 
-0634 7009f600 jam 0 ,mem_usb_status 
-0635 700bec00 jam 0 ,mem_usb_state 
-0636 6ff10050 fetch 2 ,core_clkoff 
-0637 79207e0a set1 clock_off_usb ,pdata 
-0638 67f10050 store 2 ,core_clkoff 
-0639 70409901 jam 1 ,mem_lpm_mode 
-063a 20406321 call select_system_clk_12m_dpll 
-063b 20404766 call mouse_drawing_optima_init 
-063c 2040037a call p_mouse_sensor_powerdown 
-063d 7855fc00 disable wake 
-063e 20203c7f branch mouse_init_wireless 
+0633 704cbe00 jam 0 ,mem_mouse_pair_success 
+0634 700bfa00 jam 0 ,mem_usb_device_enumeration_endflag 
+0635 7009f600 jam 0 ,mem_usb_status 
+0636 700bec00 jam 0 ,mem_usb_state 
+0637 6ff10050 fetch 2 ,core_clkoff 
+0638 79207e0a set1 clock_off_usb ,pdata 
+0639 67f10050 store 2 ,core_clkoff 
+063a 70409901 jam 1 ,mem_lpm_mode 
+063b 20406321 call select_system_clk_12m_dpll 
+063c 20404766 call mouse_drawing_optima_init 
+063d 2040037a call p_mouse_sensor_powerdown 
+063e 7855fc00 disable wake 
+063f 20203c7f branch mouse_init_wireless 
 
 p_mouse_usb_gpio_high:
-063f 6fe0c930 fetch 1 ,mem_mouse_usb_vdd_status 
-0640 c12d0000 rtneq mouse_usb_interface_insert 
-0641 7049305a jam mouse_usb_interface_insert ,mem_mouse_usb_vdd_status 
-0642 58000000 setarg 0 
-0643 67e14887 store 2 ,mem_24g_pair_timeout 
-0644 67e1488b store 2 ,mem_24g_reconn_timeout 
-0645 704caf01 jam 1 ,mem_usb_mode_enable 
-0646 204002e0 call p_mouse_multi_led_blink_disable 
-0647 70409900 jam 0 ,mem_lpm_mode 
-0648 20400613 call p_select_system_clk_24m_dpll 
-0649 20404831 call mouse_24g_stop 
-064a 20400045 call p_mouse_stop_bluetooth_mode 
-064b 7855fc00 disable wake 
-064c 2040430a call mouse_init_sensor_reset 
-064d 580005e7 setarg p_mouse_usb_config_param 
-064e 67e10b45 store 2 ,mem_cb_usb_config 
-064f 6fe0cc87 fetch 1 ,mem_usb_tx_interval_retention 
-0650 67e08b47 store 1 ,mem_usb_tx_interval 
-0651 d8c04c88 arg mem_usb_vid_pid_retention ,contr 
-0652 d8a00b48 arg mem_usb_vid_pid ,contw 
-0653 df200009 arg 9 ,loopcnt 
-0654 20407dd4 call memcpy 
-0655 20207a08 branch usb_init 
+0640 6fe0c930 fetch 1 ,mem_mouse_usb_vdd_status 
+0641 c12d0000 rtneq mouse_usb_interface_insert 
+0642 7049305a jam mouse_usb_interface_insert ,mem_mouse_usb_vdd_status 
+0643 58000000 setarg 0 
+0644 67e14887 store 2 ,mem_24g_pair_timeout 
+0645 67e1488b store 2 ,mem_24g_reconn_timeout 
+0646 704caf01 jam 1 ,mem_usb_mode_enable 
+0647 704cbe01 jam 1 ,mem_mouse_pair_success 
+0648 204002e0 call p_mouse_multi_led_blink_disable 
+0649 70409900 jam 0 ,mem_lpm_mode 
+064a 20400613 call p_select_system_clk_24m_dpll 
+064b 20404831 call mouse_24g_stop 
+064c 20400045 call p_mouse_stop_bluetooth_mode 
+064d 7855fc00 disable wake 
+064e 2040430a call mouse_init_sensor_reset 
+064f 580005e7 setarg p_mouse_usb_config_param 
+0650 67e10b45 store 2 ,mem_cb_usb_config 
+0651 6fe0cc87 fetch 1 ,mem_usb_tx_interval_retention 
+0652 67e08b47 store 1 ,mem_usb_tx_interval 
+0653 d8c04c88 arg mem_usb_vid_pid_retention ,contr 
+0654 d8a00b48 arg mem_usb_vid_pid ,contw 
+0655 df200009 arg 9 ,loopcnt 
+0656 20407dd4 call memcpy 
+0657 20207a08 branch usb_init 
 
 p_mouse_usb_mode:
-0656 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
-0657 c4068000 rtnbit0 mouse_enable_usb 
-0658 6ff08c02 fetch 1 ,core_usb_addr 
-0659 67e0c92f store 1 ,mem_usb_addr 
-065a c4038000 rtnbit0 7 
-065b 204005fe call p_usb_timer_check 
-065c 24740000 nrtn user 
-065d 20403fb0 call mouse_motion 
+0658 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0659 c4068000 rtnbit0 mouse_enable_usb 
+065a 6ff08c02 fetch 1 ,core_usb_addr 
+065b 67e0c92f store 1 ,mem_usb_addr 
+065c c4038000 rtnbit0 7 
+065d 204005fe call p_usb_timer_check 
 065e 24740000 nrtn user 
-065f 20200660 branch p_mouse_push_data_to_usb 
+065f 20403fb0 call mouse_motion 
+0660 24740000 nrtn user 
+0661 20200662 branch p_mouse_push_data_to_usb 
 
 p_mouse_push_data_to_usb:
-0660 6ff08c02 fetch 1 ,core_usb_addr 
-0661 c4038000 rtnbit0 7 
-0662 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
-0663 c30a8666 bbit0 mouse_enable_keyboard ,p_mouse_push_mouse_data_to_usb 
-0664 6fe0cb9c fetch 1 ,mem_customer_key 
-0665 c000866c beq 1 ,p_mouse_push_keyboard_data_to_usb 
+0662 6ff08c02 fetch 1 ,core_usb_addr 
+0663 c4038000 rtnbit0 7 
+0664 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0665 c30a8668 bbit0 mouse_enable_keyboard ,p_mouse_push_mouse_data_to_usb 
+0666 6fe0cb9c fetch 1 ,mem_customer_key 
+0667 c000866e beq 1 ,p_mouse_push_keyboard_data_to_usb 
 
 p_mouse_push_mouse_data_to_usb:
-0666 2040370f call dongle_usb_tx_ms_data 
-0667 58000001 setarg ms_report_id 
-0668 67e08bff store 1 ,mem_usb_mouse_data 
-0669 6fe3c8d4 fetch 7 ,mem_mouse_key 
-066a e7e38005 istore 7 ,contw 
-066b 20600000 rtn 
+0668 2040370f call dongle_usb_tx_ms_data 
+0669 58000001 setarg ms_report_id 
+066a 67e08bff store 1 ,mem_usb_mouse_data 
+066b 6fe3c8d4 fetch 7 ,mem_mouse_key 
+066c e7e38005 istore 7 ,contw 
+066d 20600000 rtn 
 
 p_mouse_push_keyboard_data_to_usb:
-066c 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
-066d 203a0677 branch p_mouse_push_release_keyboard_data_to_usb ,blank 
-066e 6fe44bde fetch 8 ,mem_customer_key_press + 1 
+066e 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
+066f 203a0679 branch p_mouse_push_release_keyboard_data_to_usb ,blank 
+0670 6fe44bde fetch 8 ,mem_customer_key_press + 1 
 
 p_mouse_push_keyboard_package_data_to_usb:
-066f 67e4095c store 8 ,mem_pdatatemp 
-0670 6fe0cbdd fetch 1 ,mem_customer_key_press 
-0671 c0018679 beq kb_multikey_report_id ,p_mouse_push_multimedia_key_data_to_usb 
-0672 c0010680 beq kb_system_conctrl_report_id ,p_mouse_push_systemctrl_key_data_to_usb 
-0673 2040371d call dongle_usb_tx_kb_data 
-0674 6fe4095c fetch 8 ,mem_pdatatemp 
-0675 67e40c0f store 8 ,mem_usb_kb_data 
-0676 20600000 rtn 
+0671 67e4095c store 8 ,mem_pdatatemp 
+0672 6fe0cbdd fetch 1 ,mem_customer_key_press 
+0673 c001867b beq kb_multikey_report_id ,p_mouse_push_multimedia_key_data_to_usb 
+0674 c0010682 beq kb_system_conctrl_report_id ,p_mouse_push_systemctrl_key_data_to_usb 
+0675 2040371d call dongle_usb_tx_kb_data 
+0676 6fe4095c fetch 8 ,mem_pdatatemp 
+0677 67e40c0f store 8 ,mem_usb_kb_data 
+0678 20600000 rtn 
 
 p_mouse_push_release_keyboard_data_to_usb:
-0677 6fe44be7 fetch 8 ,mem_customer_key_release + 1 
-0678 2020066f branch p_mouse_push_keyboard_package_data_to_usb 
+0679 6fe44be7 fetch 8 ,mem_customer_key_release + 1 
+067a 20200671 branch p_mouse_push_keyboard_package_data_to_usb 
 
 p_mouse_push_multimedia_key_data_to_usb:
-0679 20403710 call dongle_usb_tx_enable_ep2 
-067a 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
-067b 58000003 setarg kb_multikey_report_id 
-067c 67e08c1f store 1 ,mem_usb_kb_multikey 
-067d 6fe1095c fetch 2 ,mem_pdatatemp 
-067e e7e10005 istore 2 ,contw 
-067f 20600000 rtn 
+067b 20403710 call dongle_usb_tx_enable_ep2 
+067c 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
+067d 58000003 setarg kb_multikey_report_id 
+067e 67e08c1f store 1 ,mem_usb_kb_multikey 
+067f 6fe1095c fetch 2 ,mem_pdatatemp 
+0680 e7e10005 istore 2 ,contw 
+0681 20600000 rtn 
 
 p_mouse_push_systemctrl_key_data_to_usb:
-0680 20403710 call dongle_usb_tx_enable_ep2 
-0681 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
-0682 58000002 setarg kb_system_conctrl_report_id 
-0683 67e08c2f store 1 ,mem_usb_kb_system 
-0684 6fe0895c fetch 1 ,mem_pdatatemp 
-0685 e7e08005 istore 1 ,contw 
-0686 20600000 rtn 
+0682 20403710 call dongle_usb_tx_enable_ep2 
+0683 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
+0684 58000002 setarg kb_system_conctrl_report_id 
+0685 67e08c2f store 1 ,mem_usb_kb_system 
+0686 6fe0895c fetch 1 ,mem_pdatatemp 
+0687 e7e08005 istore 1 ,contw 
+0688 20600000 rtn 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/mouse_public_4mode_usb/program/patch.prog	(revision 3566)
+++ /YC1308AF/branch/mouse/mouse_public_4mode_usb/program/patch.prog	(working copy)
@@ -2561,6 +2561,7 @@
 	rtneq MOUSE_USB_INTERFACE_REMOVE
 	jam MOUSE_USB_INTERFACE_REMOVE,mem_mouse_usb_vdd_status
 	jam 0,mem_usb_mode_enable		//enable select device
+	jam 0,mem_mouse_pair_success
 	jam 0,mem_usb_device_enumeration_endflag
 	jam 0,mem_usb_status
 	jam 0,mem_usb_state
@@ -2582,6 +2583,7 @@
 	store 2,mem_24g_pair_timeout
 	store 2,mem_24g_reconn_timeout
 	jam 1,mem_usb_mode_enable		//can not select device
+	jam 1,mem_mouse_pair_success
 	call p_mouse_multi_led_blink_disable
 	jam 0,mem_lpm_mode
 	call p_select_system_clk_24M_dpll
