Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/ATS_Project/mouse_public_4mode_usb/output/eeprom.dat	(revision 3569)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/ATS_Project/mouse_public_4mode_usb/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-3a
+2e
 15
 c2
 84
@@ -483,7 +483,7 @@
 70
 8a
 39
-0a
+03
 70
 8a
 3a
@@ -495,7 +495,7 @@
 70
 8a
 39
-0a
+06
 70
 8a
 3a
@@ -2803,7 +2803,7 @@
 20
 40
 05
-1d
+1a
 20
 60
 00
@@ -5075,7 +5075,7 @@
 20
 20
 05
-05
+02
 6f
 e0
 c9
@@ -5129,21 +5129,9 @@
 63
 21
 20
-40
-47
-66
 20
-40
 02
-6c
-78
-55
-fc
-00
-20
-20
-3c
-7f
+44
 6f
 e0
 c9
@@ -5279,7 +5267,7 @@
 20
 20
 05
-27
+24
 6f
 f0
 8c
@@ -5295,7 +5283,7 @@
 c3
 0a
 85
-2d
+2a
 6f
 e0
 cb
@@ -5303,7 +5291,7 @@
 c0
 00
 85
-33
+30
 20
 40
 37
@@ -5335,7 +5323,7 @@
 20
 3a
 05
-3e
+3b
 6f
 e4
 4b
@@ -5351,11 +5339,11 @@
 c0
 01
 85
-40
+3d
 c0
 01
 05
-47
+44
 20
 40
 37
@@ -5379,7 +5367,7 @@
 20
 20
 05
-36
+33
 20
 40
 37
@@ -5436,8 +5424,8 @@
 60
 00
 00
-e3
-d7
+54
+db
 aa
 55
 40
@@ -6837,8 +6825,8 @@
 55
 68
 a1
-f2
-4e
+9f
+51
 ff
 ff
 ff
@@ -8188,5 +8176,17 @@
 ff
 ff
 ff
-db
-81
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+cc
+44
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/ATS_Project/mouse_public_4mode_usb/output/program.lis	(revision 3569)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/ATS_Project/mouse_public_4mode_usb/output/program.lis	(working copy)
@@ -153,12 +153,12 @@
 0076 20201237 branch set_tx_power_10db 
 
 p_set_tx_power_f17db:
-0077 708a390a jam 0x0a ,core_tx_pwr_ctrl0 
+0077 708a3903 jam 0x03 ,core_tx_pwr_ctrl0 
 0078 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
 0079 20201226 branch set_rf_ldo_cfg89 
 
 p_set_tx_power_pair:
-007a 708a390a jam 0x0a ,core_tx_pwr_ctrl0 
+007a 708a3906 jam 0x06 ,core_tx_pwr_ctrl0 
 007b 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
 007c 20201226 branch set_rf_ldo_cfg89 
 
@@ -961,7 +961,7 @@
 02b8 20404714 call mouse_bt_button_check 
 02b9 20403fc8 call mouse_wheel_check 
 02ba 204004ea call p_mouse_usb_isr 
-02bb 2040051d call p_mouse_usb_mode 
+02bb 2040051a call p_mouse_usb_mode 
 02bc 20600000 rtn 
 
 p_mouse_select_device_check:
@@ -1735,7 +1735,7 @@
 04f0 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
 04f1 204060fd call gpio_get_bit 
 04f2 242084f4 nbranch p_mouse_usb_gpio_low ,true 
-04f3 20200505 branch p_mouse_usb_gpio_high 
+04f3 20200502 branch p_mouse_usb_gpio_high 
 
 p_mouse_usb_gpio_low:
 04f4 6fe0c930 fetch 1 ,mem_mouse_usb_vdd_status 
@@ -1751,101 +1751,98 @@
 04fe 67f10050 store 2 ,core_clkoff 
 04ff 70409901 jam 1 ,mem_lpm_mode 
 0500 20406321 call select_system_clk_12m_dpll 
-0501 20404766 call mouse_drawing_optima_init 
-0502 2040026c call p_mouse_sensor_powerdown 
-0503 7855fc00 disable wake 
-0504 20203c7f branch mouse_init_wireless 
+0501 20200244 branch p_mouse_soft_reset 
 
 p_mouse_usb_gpio_high:
-0505 6fe0c930 fetch 1 ,mem_mouse_usb_vdd_status 
-0506 c12d0000 rtneq mouse_usb_interface_insert 
-0507 7049305a jam mouse_usb_interface_insert ,mem_mouse_usb_vdd_status 
-0508 58000000 setarg 0 
-0509 67e14887 store 2 ,mem_24g_pair_timeout 
-050a 67e1488b store 2 ,mem_24g_reconn_timeout 
-050b 704caf01 jam 1 ,mem_usb_mode_enable 
-050c 704cbe01 jam 1 ,mem_mouse_pair_success 
-050d 204001d2 call p_mouse_multi_led_blink_disable 
-050e 70409900 jam 0 ,mem_lpm_mode 
-050f 204004d8 call p_select_system_clk_24m_dpll 
-0510 20404831 call mouse_24g_stop 
-0511 20400042 call p_mouse_stop_bluetooth_mode 
-0512 7855fc00 disable wake 
-0513 2040430a call mouse_init_sensor_reset 
-0514 580004ac setarg p_mouse_usb_config_param 
-0515 67e10b45 store 2 ,mem_cb_usb_config 
-0516 6fe0cc87 fetch 1 ,mem_usb_tx_interval_retention 
-0517 67e08b47 store 1 ,mem_usb_tx_interval 
-0518 d8c04c88 arg mem_usb_vid_pid_retention ,contr 
-0519 d8a00b48 arg mem_usb_vid_pid ,contw 
-051a df200009 arg 9 ,loopcnt 
-051b 20407dd4 call memcpy 
-051c 20207a08 branch usb_init 
+0502 6fe0c930 fetch 1 ,mem_mouse_usb_vdd_status 
+0503 c12d0000 rtneq mouse_usb_interface_insert 
+0504 7049305a jam mouse_usb_interface_insert ,mem_mouse_usb_vdd_status 
+0505 58000000 setarg 0 
+0506 67e14887 store 2 ,mem_24g_pair_timeout 
+0507 67e1488b store 2 ,mem_24g_reconn_timeout 
+0508 704caf01 jam 1 ,mem_usb_mode_enable 
+0509 704cbe01 jam 1 ,mem_mouse_pair_success 
+050a 204001d2 call p_mouse_multi_led_blink_disable 
+050b 70409900 jam 0 ,mem_lpm_mode 
+050c 204004d8 call p_select_system_clk_24m_dpll 
+050d 20404831 call mouse_24g_stop 
+050e 20400042 call p_mouse_stop_bluetooth_mode 
+050f 7855fc00 disable wake 
+0510 2040430a call mouse_init_sensor_reset 
+0511 580004ac setarg p_mouse_usb_config_param 
+0512 67e10b45 store 2 ,mem_cb_usb_config 
+0513 6fe0cc87 fetch 1 ,mem_usb_tx_interval_retention 
+0514 67e08b47 store 1 ,mem_usb_tx_interval 
+0515 d8c04c88 arg mem_usb_vid_pid_retention ,contr 
+0516 d8a00b48 arg mem_usb_vid_pid ,contw 
+0517 df200009 arg 9 ,loopcnt 
+0518 20407dd4 call memcpy 
+0519 20207a08 branch usb_init 
 
 p_mouse_usb_mode:
-051d 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
-051e c4068000 rtnbit0 mouse_enable_usb 
-051f 6ff08c02 fetch 1 ,core_usb_addr 
-0520 67e0c92f store 1 ,mem_usb_addr 
-0521 c4038000 rtnbit0 7 
-0522 204004c3 call p_usb_timer_check 
-0523 24740000 nrtn user 
-0524 20403fb0 call mouse_motion 
-0525 24740000 nrtn user 
-0526 20200527 branch p_mouse_push_data_to_usb 
+051a 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+051b c4068000 rtnbit0 mouse_enable_usb 
+051c 6ff08c02 fetch 1 ,core_usb_addr 
+051d 67e0c92f store 1 ,mem_usb_addr 
+051e c4038000 rtnbit0 7 
+051f 204004c3 call p_usb_timer_check 
+0520 24740000 nrtn user 
+0521 20403fb0 call mouse_motion 
+0522 24740000 nrtn user 
+0523 20200524 branch p_mouse_push_data_to_usb 
 
 p_mouse_push_data_to_usb:
-0527 6ff08c02 fetch 1 ,core_usb_addr 
-0528 c4038000 rtnbit0 7 
-0529 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
-052a c30a852d bbit0 mouse_enable_keyboard ,p_mouse_push_mouse_data_to_usb 
-052b 6fe0cb9c fetch 1 ,mem_customer_key 
-052c c0008533 beq 1 ,p_mouse_push_keyboard_data_to_usb 
+0524 6ff08c02 fetch 1 ,core_usb_addr 
+0525 c4038000 rtnbit0 7 
+0526 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0527 c30a852a bbit0 mouse_enable_keyboard ,p_mouse_push_mouse_data_to_usb 
+0528 6fe0cb9c fetch 1 ,mem_customer_key 
+0529 c0008530 beq 1 ,p_mouse_push_keyboard_data_to_usb 
 
 p_mouse_push_mouse_data_to_usb:
-052d 2040370f call dongle_usb_tx_ms_data 
-052e 58000001 setarg ms_report_id 
-052f 67e08bff store 1 ,mem_usb_mouse_data 
-0530 6fe3c8d4 fetch 7 ,mem_mouse_key 
-0531 e7e38005 istore 7 ,contw 
-0532 20600000 rtn 
+052a 2040370f call dongle_usb_tx_ms_data 
+052b 58000001 setarg ms_report_id 
+052c 67e08bff store 1 ,mem_usb_mouse_data 
+052d 6fe3c8d4 fetch 7 ,mem_mouse_key 
+052e e7e38005 istore 7 ,contw 
+052f 20600000 rtn 
 
 p_mouse_push_keyboard_data_to_usb:
-0533 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
-0534 203a053e branch p_mouse_push_release_keyboard_data_to_usb ,blank 
-0535 6fe44bde fetch 8 ,mem_customer_key_press + 1 
+0530 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
+0531 203a053b branch p_mouse_push_release_keyboard_data_to_usb ,blank 
+0532 6fe44bde fetch 8 ,mem_customer_key_press + 1 
 
 p_mouse_push_keyboard_package_data_to_usb:
-0536 67e4095c store 8 ,mem_pdatatemp 
-0537 6fe0cbdd fetch 1 ,mem_customer_key_press 
-0538 c0018540 beq kb_multikey_report_id ,p_mouse_push_multimedia_key_data_to_usb 
-0539 c0010547 beq kb_system_conctrl_report_id ,p_mouse_push_systemctrl_key_data_to_usb 
-053a 2040371d call dongle_usb_tx_kb_data 
-053b 6fe4095c fetch 8 ,mem_pdatatemp 
-053c 67e40c0f store 8 ,mem_usb_kb_data 
-053d 20600000 rtn 
+0533 67e4095c store 8 ,mem_pdatatemp 
+0534 6fe0cbdd fetch 1 ,mem_customer_key_press 
+0535 c001853d beq kb_multikey_report_id ,p_mouse_push_multimedia_key_data_to_usb 
+0536 c0010544 beq kb_system_conctrl_report_id ,p_mouse_push_systemctrl_key_data_to_usb 
+0537 2040371d call dongle_usb_tx_kb_data 
+0538 6fe4095c fetch 8 ,mem_pdatatemp 
+0539 67e40c0f store 8 ,mem_usb_kb_data 
+053a 20600000 rtn 
 
 p_mouse_push_release_keyboard_data_to_usb:
-053e 6fe44be7 fetch 8 ,mem_customer_key_release + 1 
-053f 20200536 branch p_mouse_push_keyboard_package_data_to_usb 
+053b 6fe44be7 fetch 8 ,mem_customer_key_release + 1 
+053c 20200533 branch p_mouse_push_keyboard_package_data_to_usb 
 
 p_mouse_push_multimedia_key_data_to_usb:
-0540 20403710 call dongle_usb_tx_enable_ep2 
-0541 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
-0542 58000003 setarg kb_multikey_report_id 
-0543 67e08c1f store 1 ,mem_usb_kb_multikey 
-0544 6fe1095c fetch 2 ,mem_pdatatemp 
-0545 e7e10005 istore 2 ,contw 
-0546 20600000 rtn 
+053d 20403710 call dongle_usb_tx_enable_ep2 
+053e 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
+053f 58000003 setarg kb_multikey_report_id 
+0540 67e08c1f store 1 ,mem_usb_kb_multikey 
+0541 6fe1095c fetch 2 ,mem_pdatatemp 
+0542 e7e10005 istore 2 ,contw 
+0543 20600000 rtn 
 
 p_mouse_push_systemctrl_key_data_to_usb:
-0547 20403710 call dongle_usb_tx_enable_ep2 
-0548 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
-0549 58000002 setarg kb_system_conctrl_report_id 
-054a 67e08c2f store 1 ,mem_usb_kb_system 
-054b 6fe0895c fetch 1 ,mem_pdatatemp 
-054c e7e08005 istore 1 ,contw 
-054d 20600000 rtn 
+0544 20403710 call dongle_usb_tx_enable_ep2 
+0545 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
+0546 58000002 setarg kb_system_conctrl_report_id 
+0547 67e08c2f store 1 ,mem_usb_kb_system 
+0548 6fe0895c fetch 1 ,mem_pdatatemp 
+0549 e7e08005 istore 1 ,contw 
+054a 20600000 rtn 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/ATS_Project/mouse_public_4mode_usb/program/patch.prog	(revision 3569)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/ATS_Project/mouse_public_4mode_usb/program/patch.prog	(working copy)
@@ -185,12 +185,12 @@
 	branch set_tx_power_10db	//others
 
 p_set_tx_power_f17db:	//F17dbm
-	jam 0x0a,core_tx_pwr_ctrl0		
+	jam 0x03,core_tx_pwr_ctrl0		
 	jam 0x00,core_tx_pwr_ctrl1
 	branch set_rf_ldo_cfg89
 
 p_set_tx_power_pair:
-	jam 0x0a,core_tx_pwr_ctrl0
+	jam 0x06,core_tx_pwr_ctrl0
 	jam 0x00,core_tx_pwr_ctrl1
 	branch set_rf_ldo_cfg89
 
@@ -2150,10 +2150,11 @@
 	store 2,core_clkoff
 	jam 1,mem_lpm_mode
 	call select_system_clk_12M_dpll
-	call mouse_drawing_optima_init	
-	call p_mouse_sensor_powerdown
-	disable wake	//using for mouse_init_sensor_reset	
-	branch mouse_init_wireless
+	branch p_mouse_soft_reset
+//	call mouse_drawing_optima_init	
+//	call p_mouse_sensor_powerdown
+//	disable wake	//using for mouse_init_sensor_reset	
+//	branch mouse_init_wireless
 
 p_mouse_usb_gpio_high:
 	fetch 1,mem_mouse_usb_vdd_status
