Index: output/otp.dat
===================================================================
--- /1121s/branch/mouse/AI_Project/mouse_public_24g/output/otp.dat	(revision 3831)
+++ /1121s/branch/mouse/AI_Project/mouse_public_24g/output/otp.dat	(working copy)
@@ -27,7 +27,7 @@
 1e
 aa
 55
-d0
+f0
 11
 4e
 06
@@ -104,7 +104,7 @@
 fb
 fe
 73
-0e
+0b
 61
 64
 fc
@@ -112,11 +112,11 @@
 9a
 2d
 63
-79
+7c
 f7
 df
 c2
-a9
+ae
 ca
 93
 ec
@@ -124,7 +124,7 @@
 f6
 fd
 fe
-6e
+71
 0d
 b9
 08
@@ -152,7 +152,7 @@
 6a
 d6
 48
-0a
+77
 8b
 01
 0b
@@ -160,7 +160,7 @@
 9b
 da
 1e
-c6
+c1
 79
 f4
 96
@@ -560,7 +560,7 @@
 3a
 60
 b6
-2e
+2d
 94
 98
 74
@@ -832,7 +832,7 @@
 b2
 b8
 9e
-54
+5b
 65
 b4
 fc
@@ -1710,7 +1710,7 @@
 8e
 38
 9c
-aa
+a8
 c3
 ed
 fa
@@ -3973,622 +3973,654 @@
 8f
 21
 bf
-03
-78
-8c
-cd
-fc
-59
-2c
+4c
+d8
+7c
+72
 da
+99
+2d
+25
 d3
-3d
-3d
-8a
-e0
-30
-05
-a0
-81
+3f
 be
-74
-5d
+dd
+98
+70
+33
+e7
+b9
+a2
+43
+e4
 68
-fc
-5b
-44
-30
-7a
-9a
-35
-ab
-88
-d2
-13
-c1
-19
-8b
-a8
-46
-3a
-0e
-67
+fe
+d8
+e9
+18
+3d
+a5
+34
+ec
+2b
+43
+b8
+86
+d9
+2f
+81
+16
+3d
+6b
+f4
 24
 a3
-e6
-67
-12
-bf
-9a
-e3
-c1
+bc
+5f
 12
-81
-6b
+df
+ae
+61
+8e
+b2
+1d
+b4
 d8
 2d
-f2
-df
-47
-78
-a4
-0e
-3b
-7d
-12
-98
-89
+a8
+49
+0f
+70
+34
+fd
+74
+dd
+81
+7e
+71
 a5
-0e
-87
-61
-ac
-e9
-15
+57
+d1
+29
+a4
+7a
+fa
 70
 07
-e3
-c4
-93
+d7
+75
+6b
 1d
-c5
-7f
+c7
+53
 a6
-bb
-f7
-c3
-2a
-e3
-31
-a2
+db
+f6
+94
+65
+43
+9b
+9e
 a6
-28
+12
+36
 34
-0d
 f3
 af
-d8
+f1
+b4
+4e
+8d
 ec
-e7
-fe
-27
-a1
+87
 5e
-6c
-4d
-be
+56
 1b
-09
-61
-47
-2f
-01
+bf
+1b
+69
+1f
+12
+cd
+e6
 5b
 87
-d6
-c1
-d6
-93
-36
-73
-83
-91
+99
+61
+47
+ee
+66
+74
+fc
+63
 c6
-67
-a7
-53
+49
+a3
+5b
 6d
-89
-cc
-3f
-89
-5a
-20
-2b
-55
-1c
-1a
-90
-f8
-3b
-f2
-6b
-5a
+8d
+4c
+50
+3a
+16
+5f
+d6
+1e
+a6
+d7
+f7
+b3
+e5
+d5
+ce
+b9
+a6
+3a
+ef
+4a
 ed
-3d
-10
-05
-2d
-76
-ae
-c4
-ee
-32
+df
+60
 8f
+34
+94
+60
+e2
+68
+c5
+ce
+70
+a3
+0a
+6c
+a8
+b7
+72
+06
+44
+b1
+80
+ec
 03
-d7
-41
-cc
-3f
-63
-ad
-b3
-e7
-2d
-b4
-5f
-9a
-ae
-ff
-13
-0b
 c8
 45
 d7
-74
-a3
+0c
+d9
 41
 cf
-13
-1c
-52
-5f
-32
-44
-3f
-a2
-60
-61
-39
-75
-fc
-d2
+6b
+1e
+e5
+e7
 75
-32
+84
+a2
+ac
+18
+21
+3a
+a0
+bb
+10
+3f
+2d
 dd
-67
-5c
-a4
+07
+51
+e9
 32
 99
-a1
-64
+a2
+c0
 c2
-d8
-ab
-1f
+b8
+c8
+7d
 71
-82
+e2
 c0
-4e
+37
 63
 3a
-c8
-74
-88
+91
+5d
+68
+2e
+2f
+e4
+6c
+1f
+c5
+0b
+13
+95
 76
-17
-81
-8c
-27
-4b
-8a
-f3
-f9
-2b
-90
+db
+cd
 2d
-15
 a8
-b8
-f8
-f4
-47
-5e
-ea
-2d
-77
-af
-75
-f7
-58
-6f
+b5
+18
+ac
+c7
+7f
+45
+e1
+bb
+e3
+95
+fb
+85
+2a
 f7
-1d
+7d
+93
+d9
+ab
+93
 93
-61
-b4
-3a
-0c
-6d
-3a
-77
-9f
-79
-7a
-51
-81
-3c
-4a
-bc
-fd
 3c
-47
-0c
-0f
-3e
+20
+3b
+51
 68
-0d
-bf
-73
 7a
-46
-fb
-aa
-26
-4b
-4d
-a3
-18
+51
+81
+f6
+55
+15
+6e
+17
+5c
+ec
+45
 35
-f5
-a1
-0d
-e6
-f3
-82
-01
-14
-38
-cf
-b3
-f8
-3a
-02
-ca
-08
-bd
-8b
-7d
+27
+cd
+2f
+b1
 d5
-12
-da
-d3
-9f
+a3
+bb
+95
 c7
-47
-4a
-30
-b4
-85
-38
-5b
-0a
-9c
-8d
-e9
+eb
 14
-be
-37
-25
-c0
-f1
-c4
-d0
-b6
-83
-7d
+5b
+57
+95
+66
+9b
+a2
+03
 b1
-9e
-4f
-96
-d5
-b5
+f9
+e1
+4b
+e5
+12
+fb
+f0
+a6
+36
+85
 a8
-c1
-f1
-92
-92
-8c
-6e
-3b
-1a
-7f
-9a
-8c
-20
+15
+34
+99
+ca
+16
+f2
+e3
+d7
+01
+1e
+4a
+30
+b3
+86
+dc
+97
+d3
+c9
+f5
+c9
+4e
+91
+6f
+31
+d5
+14
+5c
+7c
 ef
-75
-c2
-62
+d6
+3a
+72
+8c
+27
+ce
+c1
+cd
+b2
+f6
+11
+54
+e3
+6f
+ae
+52
+fe
+07
+da
+db
+67
+a8
+d6
+dc
+37
 dd
 d1
+7a
+ea
+46
+0b
+ee
 28
-e0
-3e
-4b
 ea
-9e
-a5
-af
-9f
-b6
-35
-6a
-8a
-04
-41
-52
-45
-d5
-4d
+0f
 3e
-01
-1c
-b0
+14
+0a
+cb
+a3
+5c
+06
+f2
+db
+81
+49
+4a
+53
+31
+e0
+a4
+b8
+22
+31
+d9
+e0
+a9
+41
+0e
+37
+02
+46
+c6
+29
+eb
+02
+51
+6c
+bd
+e3
 af
-99
-67
-7e
-79
-77
 c9
-7e
-cf
-15
-16
-51
-6d
-c4
-ad
-06
-45
+1f
+74
+60
 37
-b5
-fc
-04
-25
-49
-95
-25
-e8
-97
+b1
 f2
 48
-88
-62
-14
-c7
-40
-ae
-92
-5e
-70
+8b
+4e
+44
+cc
+3d
+e2
+dd
+9e
+e6
+26
+4e
 96
-05
-4c
-d9
-ac
-05
-d2
-8f
-85
-95
-a8
-71
-ef
+48
+9b
+ab
+37
+c6
+07
+91
+b2
+76
+97
 ac
 5e
 7b
-47
-60
+83
+2f
+d9
+4a
+01
 79
-87
-c1
+e3
+18
+bd
 7d
-f9
-17
+00
+9b
+91
+5a
+b0
+2a
+5d
+ef
+d6
 70
-62
-a9
-2b
-13
-0e
-c3
-08
-02
-bf
-df
-53
-ed
-f9
-39
-16
-9f
-6a
-14
-64
-dd
+65
+c6
+9b
+36
 d3
-27
-79
-ca
-57
-12
-a7
-99
-d8
-6a
-c8
-ee
-bf
-9a
 22
-47
-72
-00
-63
-ec
-27
-68
-81
-35
-63
-77
-aa
-1a
-d9
-78
-b2
-8a
-69
-cd
-1b
-5c
-67
-95
-c7
-69
+7c
+f5
+34
+cc
+8e
+c6
+8d
+bf
+1d
+a1
+99
+88
+01
+37
+b7
+cf
+98
+c0
+0f
+82
+0e
+d9
+a8
+68
+aa
+c3
+2d
+93
+79
+10
+5f
+96
+ba
+f0
+93
+9e
+6b
+a1
+14
+df
+f1
+3f
+01
 a6
+e2
+df
+4f
+45
+07
+eb
+4c
+8a
+dc
+80
+e4
 80
-0c
-d0
-0d
 0f
-29
-64
+5b
 c5
-1c
-11
-46
-70
-01
-e1
-80
-23
-d7
-21
-67
-76
-75
-fa
-f2
+6c
+15
+63
+42
 ce
-c6
-00
-1d
+73
+d1
+09
 ce
-e0
+a4
+d3
+b9
+ce
+80
 f1
-11
-96
-09
-ad
-2c
-42
-1f
+1b
+de
+61
+6f
+00
+45
+b7
 49
+ac
+1c
+ed
+79
+88
+ed
+8e
+de
 a1
-eb
-4b
-c3
-cf
-55
-ea
-75
-77
 9f
-be
-a9
-20
+dc
+7a
+aa
 6e
-21
-fc
-0a
-0c
-c9
+41
 fc
-1a
-02
-a5
-db
-77
-f1
-a9
-50
-de
+0b
+44
+a1
+3e
+08
+4d
+05
+19
+5f
+49
+af
+28
+b5
 1b
-4c
-50
-9c
+4e
+83
+13
 70
 cf
 ce
-fd
+e2
 51
-f3
+93
 e4
-ef
+c2
 bb
-4b
-25
-27
-31
-f2
-00
-eb
+2b
+76
+b6
+0b
+f3
+7a
+89
 bb
 85
 fd
-5b
-d5
-ba
-f1
-29
+4d
+ef
+bb
+8b
+53
 ec
-d7
-6a
+b7
+39
+0d
+dc
+2e
+ba
+08
+8c
+42
+c0
 8d
-e6
-4f
-93
-fc
-b6
-23
-e9
-66
-ac
-3b
-26
-f6
-e6
-fb
-eb
-5c
-e5
+96
+5a
+0f
+17
+dc
+9a
+c2
+a9
+19
+70
+b3
 a8
+cc
+46
+cc
+2d
+07
 e4
-5e
+fd
+bb
+9c
+70
+6d
+96
+ea
+15
+59
+e6
+a7
+82
+cc
+55
+ff
+bc
+76
+ac
+9d
+92
+e2
+25
+54
+c9
+a0
+48
 aa
 55
 40
@@ -4715,7 +4747,7 @@
 00
 27
 4b
-02
+03
 00
 aa
 55
@@ -5071,8 +5103,8 @@
 00
 1d
 46
-2c
-01
+14
+00
 aa
 55
 02
@@ -5087,7 +5119,7 @@
 00
 23
 47
-64
+32
 00
 aa
 55
@@ -5815,8 +5847,8 @@
 aa
 aa
 55
-f1
+a7
 45
-bf
-61
+34
+86
 20
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/AI_Project/mouse_public_24g/output/program.lis	(revision 3831)
+++ /1121s/branch/mouse/AI_Project/mouse_public_24g/output/program.lis	(working copy)
@@ -18,21 +18,21 @@
 000f c03502d8 beq patch0d_2 ,p_mouse_default_init 
 0010 c0360289 beq patch0d_4 ,p_mouse_param_init 
 0011 c0370390 beq patch0d_6 ,p_mouse_start_work 
-0012 c03983e3 beq patch0e_3 ,p_mouse_setgpio_hibernate 
+0012 c03983e6 beq patch0e_3 ,p_mouse_setgpio_hibernate 
 0013 c03a0239 beq patch0e_4 ,p_mouse_lpm_before_common 
-0014 c03d0429 beq patch0f_2 ,p_mouse_motion 
-0015 c03e040a beq patch0f_4 ,p_mouse_setting_dpi 
+0014 c03d042c beq patch0f_2 ,p_mouse_motion 
+0015 c03e040d beq patch0f_4 ,p_mouse_setting_dpi 
 0016 c03f83c3 beq patch0f_7 ,p_mouse_3io6key_check 
-0017 c040840e beq patch10_1 ,p_mouse_init_sensor 
+0017 c0408411 beq patch10_1 ,p_mouse_init_sensor 
 0018 c0428356 beq patch10_5 ,p_mouse_priority_bb_event 
 0019 c0438320 beq patch10_7 ,p_mouse_bb_event_timer 
 001a c04582e8 beq patch11_3 ,p_mouse_app_initflag_check 
 001b c04602ef beq patch11_4 ,p_mouse_store_device_info 
 001c c04682fb beq patch11_5 ,p_mouse_store_dpi_info_check 
 001d c04703ac beq patch11_6 ,p_mouse_idle 
-001e c049843c beq patch12_3 ,p_mouse_drawing_optima 
+001e c0498441 beq patch12_3 ,p_mouse_drawing_optima 
 001f c04a83d9 beq patch12_5 ,p_mouse_24g_hibernate_set 
-0020 c04b03f2 beq patch12_6 ,p_mouse_24g_package_data 
+0020 c04b03f5 beq patch12_6 ,p_mouse_24g_package_data 
 0021 c0628267 beq patch18_5 ,p_otp_read_data 
 0022 c06a822d beq patch1a_5 ,p_gpio_set_wake_by_current_state 
 0023 c06b0226 beq patch1a_6 ,p_gpio_set_wake 
@@ -170,7 +170,7 @@
 0083 202000c8 branch p_g24_send_rf_other_data 
 
 p_g24_only_send_device_info:
-0084 70458808 jam 8 ,mem_24g_datalen 
+0084 7045880b jam 11 ,mem_24g_datalen 
 0085 6fe0c589 fetch 1 ,mem_24g_data_type 
 0086 79207e06 set1 data_device_info ,pdata 
 0087 67e0c589 store 1 ,mem_24g_data_type 
@@ -260,7 +260,7 @@
 00c7 20207c99 branch memset0_16 
 
 p_g24_send_rf_other_data:
-00c8 1840fe07 add temp ,7 ,pdata 
+00c8 1840fe08 add temp ,8 ,pdata 
 00c9 67e0c588 store 1 ,mem_24g_datalen 
 00ca 20403636 call g24_transmit_rf_ctrl_clear 
 00cb 67e0c519 store 1 ,mem_24g_txbuf 
@@ -536,7 +536,7 @@
 01a1 1fe0fe01 increase 1 ,pdata 
 01a2 67e145fe store 2 ,mem_24g_txfail_cnt 
 01a3 6fe0c5ff fetch 1 ,mem_24g_txfail_cnt + 1 
-01a4 c2823676 bbit1 4 ,g24_tx_attempt_fail 
+01a4 c2803676 bbit1 0 ,g24_tx_attempt_fail 
 01a5 2040367c call g24_transmit_hop_process 
 01a6 6fe14622 fetch 2 ,mem_24g_retransmit 
 01a7 1fe0fe01 increase 1 ,pdata 
@@ -1320,221 +1320,226 @@
 
 p_mouse_24g_hibernate_set:
 03d9 70460000 jam 0 ,mem_24g_attempt_fail_flag 
-03da 20403647 call g24_transmit_next_packet 
-03db 5fffffff setarg -1 
-03dc 67e245af store 4 ,mem_24g_enter_hibernate 
-03dd 58000000 setarg 0 
-03de 67e3c846 store 7 ,mem_mouse_key 
-03df 67e0c602 store 1 ,mem_24g_abort_pac 
-03e0 70473f01 jam 1 ,mem_sensor_shutdown_flag 
-03e1 204059ed call mouse_sensor_powerdown 
-03e2 2020622b branch mouse_24g_long_sleep 
+03da 6fe0c6f8 fetch 1 ,mem_mouse_search_dongle_action 
+03db 793ffe00 set0 g24_disconn_state ,pdata 
+03dc 67e0c6f8 store 1 ,mem_mouse_search_dongle_action 
+03dd 20403647 call g24_transmit_next_packet 
+03de 5fffffff setarg -1 
+03df 67e245af store 4 ,mem_24g_enter_hibernate 
+03e0 58000000 setarg 0 
+03e1 67e3c846 store 7 ,mem_mouse_key 
+03e2 67e0c602 store 1 ,mem_24g_abort_pac 
+03e3 70473f01 jam 1 ,mem_sensor_shutdown_flag 
+03e4 204059ed call mouse_sensor_powerdown 
+03e5 2020622b branch mouse_24g_long_sleep 
 
 p_mouse_setgpio_hibernate:
-03e3 20405a92 call mouse_set_sdio_high 
-03e4 204003d5 call p_clear_wake 
-03e5 204056a9 call mouse_before_hibernate_wheel_gpio_set 
-03e6 6fe0c64d fetch 1 ,mem_mouse_sensor_sdio_gpio 
-03e7 20405943 call mouse_gpio_config_output_high 
-03e8 6848c65a fetcht 1 ,mem_device_switch_gpio 
-03e9 204055ab call mouse_gpio_set_pupd_by_input 
-03ea d8400015 arg 21 ,temp 
-03eb 204055b5 call mouse_gpio_config_input_pu 
-03ec 2040611a call mouse_logo_led_off 
-03ed 20400239 call p_mouse_lpm_before_common 
-03ee 202054e2 branch mouse_setgpio_hibernate_next 
+03e6 20405a92 call mouse_set_sdio_high 
+03e7 204003d5 call p_clear_wake 
+03e8 204056a9 call mouse_before_hibernate_wheel_gpio_set 
+03e9 6fe0c64d fetch 1 ,mem_mouse_sensor_sdio_gpio 
+03ea 20405943 call mouse_gpio_config_output_high 
+03eb 6848c65a fetcht 1 ,mem_device_switch_gpio 
+03ec 204055ab call mouse_gpio_set_pupd_by_input 
+03ed d8400015 arg 21 ,temp 
+03ee 204055b5 call mouse_gpio_config_input_pu 
+03ef 2040611a call mouse_logo_led_off 
+03f0 20400239 call p_mouse_lpm_before_common 
+03f1 202054e2 branch mouse_setgpio_hibernate_next 
 
 p_mouse_tx_device_info_check:
-03ef 6fe0cb26 fetch 1 ,mem_device_tx_device_info_flag 
-03f0 207a0000 rtn blank 
-03f1 20207dba branch enable_user 
+03f2 6fe0cb26 fetch 1 ,mem_device_tx_device_info_flag 
+03f3 207a0000 rtn blank 
+03f4 20207dba branch enable_user 
 
 p_mouse_24g_package_data:
-03f2 c6930000 rtnmark0 mark_24g 
-03f3 20405601 call mouse_motion 
-03f4 204003ef call p_mouse_tx_device_info_check 
-03f5 24740000 nrtn user 
-03f6 6fe0c77c fetch 1 ,mem_mouse_24g_long_sleep_flag 
-03f7 70477c00 jam 0 ,mem_mouse_24g_long_sleep_flag 
-03f8 245a0408 ncall p_mouse_24g_short_sleep_clear_wake ,blank 
-03f9 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
-03fa c30b03fd bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
-03fb 6fe0c96c fetch 1 ,mem_customer_key 
-03fc 243a60b6 nbranch mouse_24g_keyboard_package_data ,blank 
+03f5 c6930000 rtnmark0 mark_24g 
+03f6 20405601 call mouse_motion 
+03f7 204003f2 call p_mouse_tx_device_info_check 
+03f8 24740000 nrtn user 
+03f9 6fe0c77c fetch 1 ,mem_mouse_24g_long_sleep_flag 
+03fa 70477c00 jam 0 ,mem_mouse_24g_long_sleep_flag 
+03fb 245a040b ncall p_mouse_24g_short_sleep_clear_wake ,blank 
+03fc 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
+03fd c30b0400 bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
+03fe 6fe0c96c fetch 1 ,mem_customer_key 
+03ff 243a60b6 nbranch mouse_24g_keyboard_package_data ,blank 
 
 p_mouse_24g_mouse_package_data:
-03fd 204003ff call p_mouse_data_xy_release 
-03fe 202060a2 branch mouse_24g_mouse_package_data + 1 
+0400 20400402 call p_mouse_data_xy_release 
+0401 202060a2 branch mouse_24g_mouse_package_data + 1 
 
 p_mouse_data_xy_release:
-03ff 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-0400 c1ff8000 rtnne gpio_disable 
-0401 6fe0c77d fetch 1 ,mem_mouse_long_mult_flag 
-0402 207a0000 rtn blank 
-0403 1fe0ffff increase -1 ,pdata 
-0404 67e0c77d store 1 ,mem_mouse_long_mult_flag 
-0405 58000000 setarg 0 
-0406 67e24847 store 4 ,mem_mouse_x 
-0407 20205a73 branch mouse_init_sensor_reset 
+0402 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
+0403 c1ff8000 rtnne gpio_disable 
+0404 6fe0c77d fetch 1 ,mem_mouse_long_mult_flag 
+0405 207a0000 rtn blank 
+0406 1fe0ffff increase -1 ,pdata 
+0407 67e0c77d store 1 ,mem_mouse_long_mult_flag 
+0408 58000000 setarg 0 
+0409 67e24847 store 4 ,mem_mouse_x 
+040a 20205a73 branch mouse_init_sensor_reset 
 
 p_mouse_24g_short_sleep_clear_wake:
-0408 204003d5 call p_clear_wake 
-0409 20200258 branch p_lpm_write_gpio_wakeup 
+040b 204003d5 call p_clear_wake 
+040c 20200258 branch p_lpm_write_gpio_wakeup 
 
 p_mouse_setting_dpi:
-040a 2040573e call mouse_setting_dpi_4_level 
-040b 20400071 call p_g24_send_dpi_info_enable 
-040c 2040613a call mouse_dpi_led_blink_delay 
-040d 20205747 branch mouse_setting_sensor_type 
+040d 2040573e call mouse_setting_dpi_4_level 
+040e 20400071 call p_g24_send_dpi_info_enable 
+040f 2040613a call mouse_dpi_led_blink_delay 
+0410 20205747 branch mouse_setting_sensor_type 
 
 p_mouse_init_sensor:
-040e 20405958 call mouse_read_sensor_id 
-040f c018595f beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
-0410 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
-0411 c02c0413 beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
-0412 20205952 branch mouse_init_sensor + 5 
+0411 20405958 call mouse_read_sensor_id 
+0412 c018595f beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
+0413 c018d9c6 beq p3065_id1 ,mouse_init_p3065 
+0414 c02c0416 beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
+0415 20205952 branch mouse_init_sensor + 5 
 
 p_mouse_ka8g2_id2_judge:
-0413 204059e7 call mouse_sensor_poweron 
-0414 6fe0c85a fetch 1 ,mem_sensor_id2 
-0415 c02c8417 beq pka8g2_id2 ,p_mouse_ka8g2_init_param 
-0416 2020595f branch mouse_init_p32xx_id2_judge 
+0416 204059e7 call mouse_sensor_poweron 
+0417 6fe0c85a fetch 1 ,mem_sensor_id2 
+0418 c02c841a beq pka8g2_id2 ,p_mouse_ka8g2_init_param 
+0419 2020595f branch mouse_init_p32xx_id2_judge 
 
 p_mouse_ka8g2_init_param:
-0417 7049570b jam ka8g2 ,mem_config_sensor_type 
-0418 da604a0b arg mem_sensor_ka8g2_init_new ,regc 
-0419 20205995 branch mouse_sensor_wr_seq 
+041a 7049570b jam ka8g2 ,mem_config_sensor_type 
+041b da604a0b arg mem_sensor_ka8g2_init_new ,regc 
+041c 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_check_sensor_data:
-041a 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
-041b c1800000 rtnne flash_sm_no_buys 
-041c 6fe0c957 fetch 1 ,mem_config_sensor_type 
-041d c005841f beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
-041e 202059f8 branch mouse_check_sensor_data + 2 
+041d 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
+041e c1800000 rtnne flash_sm_no_buys 
+041f 6fe0c957 fetch 1 ,mem_config_sensor_type 
+0420 c0058422 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
+0421 202059f8 branch mouse_check_sensor_data + 2 
 
 p_mouse_pka8g2_sensor_motion:
-041f 20405a6d call mouse_clear_sensor_data 
-0420 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-0421 c07f8425 beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
-0422 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
-0423 20406ee6 call gpio_get_bit 
-0424 24608000 nrtn true 
+0422 20405a6d call mouse_clear_sensor_data 
+0423 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
+0424 c07f8428 beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
+0425 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
+0426 20406ee6 call gpio_get_bit 
+0427 24608000 nrtn true 
 
 p_mouse_pka8g2_sensor_motion_1:
-0425 58000000 setarg pan_reg_pid_l 
-0426 204069e5 call twspi_read 
-0427 c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
-0428 20205a2f branch mouse_p3212_sensor_motion_2 
+0428 58000000 setarg pan_reg_pid_l 
+0429 204069e5 call twspi_read 
+042a c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
+042b 20205a2f branch mouse_p3212_sensor_motion_2 
 
 p_mouse_motion:
-0429 78547c00 disable user 
-042a 58000000 setarg 0 
-042b 67e34847 store 6 ,mem_mouse_x 
-042c 2040041a call p_mouse_check_sensor_data 
-042d 58000089 setarg 0x0089 
-042e 204069e4 call twspi_write 
-042f 20405747 call mouse_setting_sensor_type 
-0430 20405612 call mouse_zwheel 
-0431 20405617 call mouse_t_zwheel 
-0432 2040043f call p_mouse_key 
-0433 6fe0c846 fetch 1 ,mem_mouse_key 
-0434 1fe17e1f and_into 0x1f ,pdata 
-0435 67e0c846 store 1 ,mem_mouse_key 
-0436 2434043a nbranch p_mouse_drawing_optima_init ,user 
-0437 704b2501 jam 1 ,mem_24g_rf_data_flag 
-0438 20405f26 call mouse_drawing_optima 
-0439 20205c0b branch mouse_no_data_timer_init 
+042c 78547c00 disable user 
+042d 6fe0c6f8 fetch 1 ,mem_mouse_search_dongle_action 
+042e c3800000 rtnbit1 g24_disconn_state 
+042f 58000000 setarg 0 
+0430 67e34847 store 6 ,mem_mouse_x 
+0431 2040041d call p_mouse_check_sensor_data 
+0432 58000089 setarg 0x0089 
+0433 204069e4 call twspi_write 
+0434 20405747 call mouse_setting_sensor_type 
+0435 20405612 call mouse_zwheel 
+0436 20405617 call mouse_t_zwheel 
+0437 20400444 call p_mouse_key 
+0438 6fe0c846 fetch 1 ,mem_mouse_key 
+0439 1fe17e1f and_into 0x1f ,pdata 
+043a 67e0c846 store 1 ,mem_mouse_key 
+043b 2434043f nbranch p_mouse_drawing_optima_init ,user 
+043c 704b2501 jam 1 ,mem_24g_rf_data_flag 
+043d 20405f26 call mouse_drawing_optima 
+043e 20205c0b branch mouse_no_data_timer_init 
 
 p_mouse_drawing_optima_init:
-043a 704b2500 jam 0 ,mem_24g_rf_data_flag 
-043b 20205f37 branch mouse_drawing_optima_init 
+043f 704b2500 jam 0 ,mem_24g_rf_data_flag 
+0440 20205f37 branch mouse_drawing_optima_init 
 
 p_mouse_drawing_optima:
-043c 6fe0c957 fetch 1 ,mem_config_sensor_type 
-043d c1058000 rtneq ka8g2 
-043e 20205f27 branch mouse_drawing_optima + 1 
+0441 6fe0c957 fetch 1 ,mem_config_sensor_type 
+0442 c1058000 rtneq ka8g2 
+0443 20205f27 branch mouse_drawing_optima + 1 
 
 p_mouse_key:
-043f 2040584c call mouse_check_firekey_gpio 
-0440 6fe0c987 fetch 1 ,mem_fire_key_flag 
-0441 243a5860 nbranch fire_key_press ,blank 
-0442 6fe0c982 fetch 1 ,mem_fire_key_status 
-0443 243a585f nbranch fire_key_process ,blank 
-0444 20405888 call mouse_check_key_gpio 
-0445 20400447 call p_mouse_ghost_key_check 
-0446 202057ad branch mouse_key + 7 
+0444 2040584c call mouse_check_firekey_gpio 
+0445 6fe0c987 fetch 1 ,mem_fire_key_flag 
+0446 243a5860 nbranch fire_key_press ,blank 
+0447 6fe0c982 fetch 1 ,mem_fire_key_status 
+0448 243a585f nbranch fire_key_process ,blank 
+0449 20405888 call mouse_check_key_gpio 
+044a 2040044c call p_mouse_ghost_key_check 
+044b 202057ad branch mouse_key + 7 
 
 p_mouse_ghost_key_check:
-0447 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
-0448 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
-0449 70497b00 jam 0 ,mem_mouse_ghost_flag 
-044a 1fe22400 copy pdata ,regb 
-044b 6848c644 fetcht 1 ,mem_lbutton_gpio 
-044c 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-044d 98467c00 isub temp ,null 
-044e 20228459 branch p_mouse_matrix_ghost_key_l_bk ,zero 
-044f 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-0450 98467c00 isub temp ,null 
-0451 2022845f branch p_mouse_matrix_ghost_key_l_fw ,zero 
-0452 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0453 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0454 98467c00 isub temp ,null 
-0455 20228468 branch p_mouse_ghost_key_mbk_rfw ,zero 
+044c 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+044d 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+044e 70497b00 jam 0 ,mem_mouse_ghost_flag 
+044f 1fe22400 copy pdata ,regb 
+0450 6848c644 fetcht 1 ,mem_lbutton_gpio 
+0451 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0452 98467c00 isub temp ,null 
+0453 2022845e branch p_mouse_matrix_ghost_key_l_bk ,zero 
+0454 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0455 98467c00 isub temp ,null 
+0456 20228464 branch p_mouse_matrix_ghost_key_l_fw ,zero 
+0457 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0458 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0459 98467c00 isub temp ,null 
+045a 2022846d branch p_mouse_ghost_key_mbk_rfw ,zero 
 
 p_mouse_ghost_key_mfw_rbk:
-0456 204057fb call mouse_ghost_key_check_m_fw 
+045b 204057fb call mouse_ghost_key_check_m_fw 
 
 p_mouse_ghost_key_rbk:
-0457 2040046d call p_mouse_ghost_key_check_r_bk 
-0458 202057e5 branch mouse_ghost_key_check_next 
+045c 20400472 call p_mouse_ghost_key_check_r_bk 
+045d 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_matrix_ghost_key_l_bk:
-0459 6848c645 fetcht 1 ,mem_mbutton_gpio 
-045a 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-045b 98467c00 isub temp ,null 
-045c 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
+045e 6848c645 fetcht 1 ,mem_mbutton_gpio 
+045f 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0460 98467c00 isub temp ,null 
+0461 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
 
 p_mouse_ghost_key_lbk_rfw:
-045d 204057ef call mouse_ghost_key_check_l_bk 
-045e 20200469 branch p_mouse_ghost_key_rfw 
+0462 204057ef call mouse_ghost_key_check_l_bk 
+0463 2020046e branch p_mouse_ghost_key_rfw 
 
 p_mouse_matrix_ghost_key_l_fw:
-045f 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0460 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0461 98467c00 isub temp ,null 
-0462 20228465 branch p_mouse_ghost_key_lfw_mbk ,zero 
+0464 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0465 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0466 98467c00 isub temp ,null 
+0467 2022846a branch p_mouse_ghost_key_lfw_mbk ,zero 
 
 p_mouse_ghost_key_lfw_rbk:
-0463 2040046f call p_mouse_ghost_key_check_l_fw 
-0464 20200457 branch p_mouse_ghost_key_rbk 
+0468 20400474 call p_mouse_ghost_key_check_l_fw 
+0469 2020045c branch p_mouse_ghost_key_rbk 
 
 p_mouse_ghost_key_lfw_mbk:
-0465 2040046f call p_mouse_ghost_key_check_l_fw 
-0466 2040046b call p_mouse_ghost_key_check_m_bk 
-0467 202057e5 branch mouse_ghost_key_check_next 
+046a 20400474 call p_mouse_ghost_key_check_l_fw 
+046b 20400470 call p_mouse_ghost_key_check_m_bk 
+046c 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_mbk_rfw:
-0468 2040046b call p_mouse_ghost_key_check_m_bk 
+046d 20400470 call p_mouse_ghost_key_check_m_bk 
 
 p_mouse_ghost_key_rfw:
-0469 20400471 call p_mouse_ghost_key_check_r_fw 
-046a 202057e5 branch mouse_ghost_key_check_next 
+046e 20400476 call p_mouse_ghost_key_check_r_fw 
+046f 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_check_m_bk:
-046b 1a417e12 and regb ,mouse_m_bk_button ,pdata 
-046c 202057f3 branch mouse_ghost_key_check_m_bk + 1 
+0470 1a417e12 and regb ,mouse_m_bk_button ,pdata 
+0471 202057f3 branch mouse_ghost_key_check_m_bk + 1 
 
 p_mouse_ghost_key_check_r_bk:
-046d 1a417e0a and regb ,mouse_r_bk_button ,pdata 
-046e 202057f6 branch mouse_ghost_key_check_r_bk + 1 
+0472 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+0473 202057f6 branch mouse_ghost_key_check_r_bk + 1 
 
 p_mouse_ghost_key_check_l_fw:
-046f 1a417e11 and regb ,mouse_l_fw_button ,pdata 
-0470 202057f9 branch mouse_ghost_key_check_l_fw + 1 
+0474 1a417e11 and regb ,mouse_l_fw_button ,pdata 
+0475 202057f9 branch mouse_ghost_key_check_l_fw + 1 
 
 p_mouse_ghost_key_check_r_fw:
-0471 1a417e12 and regb ,mouse_r_fw_button ,pdata 
-0472 202057ff branch mouse_ghost_key_check_r_fw + 1 
+0476 1a417e12 and regb ,mouse_r_fw_button ,pdata 
+0477 202057ff branch mouse_ghost_key_check_r_fw + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/branch/mouse/AI_Project/mouse_public_24g/program/patch.prog	(revision 3831)
+++ /1121s/branch/mouse/AI_Project/mouse_public_24g/program/patch.prog	(working copy)
@@ -197,7 +197,7 @@
 	
 //6byte sn + 1byte dpi + 1byte battery-->?
 p_g24_only_send_device_info:
-	jam 8,mem_24g_datalen
+	jam 11,mem_24g_datalen
 	fetch 1,mem_24g_data_type
 	set1 DATA_DEVICE_INFO,pdata
 	store 1,mem_24g_data_type
@@ -292,7 +292,7 @@
 //============rf+other info tx interface===========//
 //temp=len  rega=ptr
 p_g24_send_rf_other_data:
-	add temp,7,pdata
+	add temp,8,pdata
 	store 1,mem_24g_datalen
 	call g24_transmit_rf_ctrl_clear
 	store 1,mem_24g_txbuf
@@ -576,7 +576,7 @@
 	increase 1,pdata
 	store 2,mem_24g_txfail_cnt	
 	fetch 1,mem_24g_txfail_cnt+1
-	bbit1 4,g24_tx_attempt_fail
+	bbit1 0,g24_tx_attempt_fail
 	call g24_transmit_hop_process
 	fetch 2,mem_24g_retransmit
 	increase 1,pdata
@@ -1538,6 +1538,9 @@
 	
 p_mouse_24g_hibernate_set:
 	jam 0,mem_24g_attempt_fail_flag
+	fetch 1,mem_mouse_search_dongle_action
+	set0 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
 	call g24_transmit_next_packet
 	setarg -1
 	store 4,mem_24g_enter_hibernate
@@ -1671,6 +1674,8 @@
 
 p_mouse_motion:
 	disable user
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit1 G24_DISCONN_STATE
 	setarg 0
 	store 6,mem_mouse_x
 	call p_mouse_check_sensor_data
Index: sched/mouse.dat
===================================================================
--- /1121s/branch/mouse/AI_Project/mouse_public_24g/sched/mouse.dat	(revision 3831)
+++ /1121s/branch/mouse/AI_Project/mouse_public_24g/sched/mouse.dat	(working copy)
@@ -123,7 +123,7 @@
 #0X02 MOUSE_12CLK_ANGLE
 #0X03 MOUSE_3CLK_ANGLE
 
-mem_mouse_version:02 00
+mem_mouse_version:03 00
 
 mem_mouse_customer_function:01  #01--win+d     02--ctrl+alt+a    03--ie home    04--play
 mem_mouse_logo_ctrl_type:00		#bit1:combation ctrl  bit2: dpi ctrl
@@ -204,9 +204,9 @@
 mem_mouse_24g_tsniff_8ms:00 77 01 00
 
 mem_24g_enter_hibernate:00 48 60
-mem_24g_long_sleep_param_update_timer_init:2c 01	#30s
+mem_24g_long_sleep_param_update_timer_init:14 00	#2s
 mem_24g_transmit_by_interrupt_exit_count_init:50 00
-mem_mouse_24g_search_dongle_time_init:64 00	#10s
+mem_mouse_24g_search_dongle_time_init:32 00	#10s
 mem_store_information_delay_timer_init:01
 
 
