Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/mouse_public/output/eeprom.dat	(revision 2443)
+++ /YC1308AF/branch/mouse/mouse_public/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-3a
+46
 18
 c2
 84
@@ -55,7 +55,7 @@
 c0
 66
 85
-a6
+a9
 c0
 67
 04
@@ -67,7 +67,7 @@
 c0
 68
 05
-cb
+ce
 c0
 69
 03
@@ -111,11 +111,11 @@
 c0
 42
 85
-9b
+9e
 c0
 53
 05
-9f
+a2
 c0
 6e
 85
@@ -147,7 +147,7 @@
 c0
 76
 05
-90
+93
 20
 20
 13
@@ -3811,7 +3811,7 @@
 20
 40
 05
-fb
+fe
 d8
 40
 00
@@ -4070,8 +4070,8 @@
 13
 20
 40
-05
-fe
+06
+01
 68
 48
 c9
@@ -4103,7 +4103,7 @@
 20
 40
 05
-fb
+fe
 20
 40
 04
@@ -4130,8 +4130,8 @@
 1c
 20
 40
-05
-fe
+06
+01
 70
 4c
 20
@@ -5507,7 +5507,7 @@
 20
 3a
 05
-64
+67
 6f
 e1
 48
@@ -5524,6 +5524,18 @@
 60
 00
 00
+6f
+e4
+4b
+bc
+c2
+98
+22
+e4
+20
+20
+25
+77
 20
 40
 25
@@ -5535,11 +5547,11 @@
 24
 2c
 05
-7d
+80
 24
 37
 85
-7d
+80
 20
 40
 26
@@ -5558,8 +5570,8 @@
 00
 20
 22
-a2
-e4
+85
+64
 6f
 e2
 48
@@ -5575,7 +5587,7 @@
 20
 42
 85
-79
+7c
 6f
 e0
 c8
@@ -5655,11 +5667,11 @@
 c0
 01
 05
-87
+8a
 c0
 02
 05
-8e
+91
 20
 20
 25
@@ -5771,7 +5783,7 @@
 c2
 80
 85
-a3
+a6
 20
 20
 16
@@ -5803,7 +5815,7 @@
 20
 40
 05
-b6
+b9
 58
 00
 00
@@ -5827,7 +5839,7 @@
 20
 40
 05
-c8
+cb
 6f
 e0
 c8
@@ -5847,7 +5859,7 @@
 20
 40
 05
-c5
+c8
 20
 20
 45
@@ -5867,7 +5879,7 @@
 c0
 06
 05
-bb
+be
 20
 20
 42
@@ -5883,7 +5895,7 @@
 c0
 7f
 85
-c1
+c4
 68
 48
 c9
@@ -5927,11 +5939,11 @@
 20
 40
 05
-cb
+ce
 20
 40
 06
-01
+04
 20
 20
 41
@@ -5951,15 +5963,15 @@
 20
 40
 05
-d2
+d5
 20
 40
 05
-e1
+e4
 20
 40
 05
-ee
+f1
 20
 20
 41
@@ -5971,7 +5983,7 @@
 20
 40
 05
-fb
+fe
 20
 40
 41
@@ -5991,7 +6003,7 @@
 20
 40
 05
-fb
+fe
 20
 40
 41
@@ -6011,7 +6023,7 @@
 20
 40
 05
-fb
+fe
 20
 40
 41
@@ -6055,7 +6067,7 @@
 c0
 7f
 85
-ea
+ed
 20
 20
 41
@@ -6066,8 +6078,8 @@
 11
 20
 40
-05
-fe
+06
+01
 68
 48
 c9
@@ -6107,7 +6119,7 @@
 c0
 7f
 85
-f7
+fa
 20
 20
 41
@@ -6118,8 +6130,8 @@
 12
 20
 40
-05
-fe
+06
+01
 68
 48
 c9
@@ -6171,11 +6183,11 @@
 20
 40
 06
-08
+0b
 20
 40
 06
-0b
+0e
 20
 20
 41
@@ -6204,8 +6216,8 @@
 60
 00
 00
-82
-b1
+7a
+e7
 aa
 55
 40
@@ -6350,7 +6362,7 @@
 0a
 01
 00
-00
+80
 02
 1b
 aa
@@ -7562,22 +7574,10 @@
 aa
 aa
 55
-f7
-93
-bc
-88
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+77
+94
+96
+8a
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-18
-d7
+39
+5f
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/mouse_public/output/program.lis	(revision 2435)
+++ /YC1308AF/branch/mouse/mouse_public/output/program.lis	(working copy)
@@ -12,10 +12,10 @@
 0009 c06303a2 beq patch18_6 ,p_mouse_app_enter_hibernate 
 000a c06403ad beq patch19_0 ,p_mouse_setgpio_hibernate 
 000b c06483dd beq patch19_1 ,p_mouse_lpm_before_common 
-000c c06685a6 beq patch19_5 ,p_mouse_motion 
+000c c06685a9 beq patch19_5 ,p_mouse_motion 
 000d c0670443 beq patch19_6 ,p_mouse_dpi_process 
 000e c0678476 beq patch19_7 ,p_mouse_seting_dpi 
-000f c06805cb beq patch1a_0 ,p_mouse_check_key_gpio 
+000f c06805ce beq patch1a_0 ,p_mouse_check_key_gpio 
 0010 c0690379 beq patch1a_2 ,p_mouse_init_sunt 
 0011 c0698391 beq patch1a_3 ,p_mouse_sensor_poweron 
 0012 c06a84b3 beq patch1a_5 ,p_mouse_priority_bb_event 
@@ -28,8 +28,8 @@
 
 pf_patch_ext:
 0019 c00f8097 beq patch23_7 ,p_twspi_reset 
-001a c042859b beq patch30_5 ,p_ui_timer_check 
-001b c053059f beq patch34_6 ,p_le_enable_phy_by_pdata 
+001a c042859e beq patch30_5 ,p_ui_timer_check 
+001b c05305a2 beq patch34_6 ,p_le_enable_phy_by_pdata 
 001c c06e851f beq patch3b_5 ,p_g24_dispatch 
 001d c06f0239 beq patch3b_6 ,p_g24_receive_packet 
 001e c07082c4 beq patch3c_1 ,p_g24_transmit 
@@ -37,7 +37,7 @@
 0020 c0718552 beq patch3c_3 ,p_g24_pair_sm_common_next 
 0021 c074855c beq patch3d_1 ,p_g24_reconn_dispatch 
 0022 c075018b beq patch3d_2 ,p_g24_transmit_no_interrupt 
-0023 c0760590 beq patch3d_4 ,p_g24_lpm_wait 
+0023 c0760593 beq patch3d_4 ,p_g24_lpm_wait 
 0024 2020137e branch loop 
 
 p_mouse_led_on:
@@ -1275,7 +1275,7 @@
 03b4 6848c914 fetcht 1 ,mem_matrix_public_gpio 
 03b5 204060e6 call gpio_clr_wake 
 03b6 6fe0c924 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-03b7 204005fb call p_mouse_gpio_config_output_high 
+03b7 204005fe call p_mouse_gpio_config_output_high 
 03b8 d8400003 arg 3 ,temp 
 03b9 20403f96 call mouse_gpio_config_input_pu 
 03ba 20403e80 call mouse_lpm_before_common 
@@ -1362,7 +1362,7 @@
 
 p_mouse_3io6key_dpi_check:
 03f7 6fe0c913 fetch 1 ,mem_dpi_button_gpio 
-03f8 204005fe call p_mouse_gpio_config_output_low 
+03f8 20400601 call p_mouse_gpio_config_output_low 
 03f9 6848c913 fetcht 1 ,mem_dpi_button_gpio 
 03fa 202041d5 branch mouse_3io6key_check 
 
@@ -1374,7 +1374,7 @@
 
 p_mouse_dpi_another_gpio_connect_gnd_check:
 03ff 6fe0cc1c fetch 1 ,mem_dpi_another_button_gpio 
-0400 204005fb call p_mouse_gpio_config_output_high 
+0400 204005fe call p_mouse_gpio_config_output_high 
 0401 20400414 call p_mouse_dpi_another_check 
 0402 6848cc1c fetcht 1 ,mem_dpi_another_button_gpio 
 0403 20203f96 branch mouse_gpio_config_input_pu 
@@ -1383,7 +1383,7 @@
 0404 6fe0cc1c fetch 1 ,mem_dpi_another_button_gpio 
 0405 793ffe07 set0 gpio_active_bit ,pdata 
 0406 67e0cc1c store 1 ,mem_dpi_another_button_gpio 
-0407 204005fe call p_mouse_gpio_config_output_low 
+0407 20400601 call p_mouse_gpio_config_output_low 
 0408 704c2000 jam mouse_dpi_another_key ,mem_mouse_key_temp_patch 
 0409 6848cc1c fetcht 1 ,mem_dpi_another_button_gpio 
 040a 6fe0cc1d fetch 1 ,mem_dpi_another_press_status 
@@ -1861,237 +1861,242 @@
 055c 6fe1488d fetch 2 ,mem_24g_reconn_count 
 055d d84001f8 arg 0x01f8 ,temp 
 055e 98417e00 iand temp ,pdata 
-055f 203a0564 branch p_g24_reconn_dispatch_next ,blank 
+055f 203a0567 branch p_g24_reconn_dispatch_next ,blank 
 0560 6fe1488d fetch 2 ,mem_24g_reconn_count 
 0561 1fe0fe01 increase 1 ,pdata 
 0562 67e1488d store 2 ,mem_24g_reconn_count 
 0563 20600000 rtn 
 
+p_g24_reconn_mode_judge:
+0564 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0565 c29822e4 bbit1 mouse_enable_auto_24g_paring ,g24_pair_start 
+0566 20202577 branch g24_reconn_receiver_addr 
+
 p_g24_reconn_dispatch_next:
-0564 204025a3 call g24_reconn_data_prep 
-0565 2040022a call p_g24_transmit_receive_ack 
-0566 242c057d nbranch p_g24_reconn_device_fail ,sync 
-0567 2437857d nbranch p_g24_reconn_device_fail ,user3 
-0568 20402679 call g24_ackpayload_parse 
-0569 6fe2487b fetch 4 ,mem_24g_pair_addr 
-056a 684a483f fetcht 4 ,mem_24g_addr 
-056b 98467c00 isub temp ,null 
-056c 2022a2e4 branch g24_pair_start ,zero 
-056d 6fe248ad fetch 4 ,mem_24g_device_addr 
-056e 684a483f fetcht 4 ,mem_24g_addr 
-056f 98467c00 isub temp ,null 
-0570 20428579 call p_g24_store_receiver_addr ,zero 
-0571 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
-0572 793ffe02 set0 state_24g_reconn ,pdata 
-0573 67e0c8a5 store 1 ,mem_24g_conn_sm 
-0574 58000000 setarg 0 
-0575 67e14887 store 2 ,mem_24g_pair_timeout 
-0576 67e1488d store 2 ,mem_24g_reconn_count 
-0577 67e1488b store 2 ,mem_24g_reconn_timeout 
-0578 2020259e branch g24_reconn_attempt_success 
+0567 204025a3 call g24_reconn_data_prep 
+0568 2040022a call p_g24_transmit_receive_ack 
+0569 242c0580 nbranch p_g24_reconn_device_fail ,sync 
+056a 24378580 nbranch p_g24_reconn_device_fail ,user3 
+056b 20402679 call g24_ackpayload_parse 
+056c 6fe2487b fetch 4 ,mem_24g_pair_addr 
+056d 684a483f fetcht 4 ,mem_24g_addr 
+056e 98467c00 isub temp ,null 
+056f 20228564 branch p_g24_reconn_mode_judge ,zero 
+0570 6fe248ad fetch 4 ,mem_24g_device_addr 
+0571 684a483f fetcht 4 ,mem_24g_addr 
+0572 98467c00 isub temp ,null 
+0573 2042857c call p_g24_store_receiver_addr ,zero 
+0574 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+0575 793ffe02 set0 state_24g_reconn ,pdata 
+0576 67e0c8a5 store 1 ,mem_24g_conn_sm 
+0577 58000000 setarg 0 
+0578 67e14887 store 2 ,mem_24g_pair_timeout 
+0579 67e1488d store 2 ,mem_24g_reconn_count 
+057a 67e1488b store 2 ,mem_24g_reconn_timeout 
+057b 2020259e branch g24_reconn_attempt_success 
 
 p_g24_store_receiver_addr:
-0579 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
-057a 207a0000 rtn blank 
-057b 67e24895 store 4 ,mem_24g_receiver_addr 
-057c 20202587 branch g24_ch_syncword_crc8_init 
+057c 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+057d 207a0000 rtn blank 
+057e 67e24895 store 4 ,mem_24g_receiver_addr 
+057f 20202587 branch g24_ch_syncword_crc8_init 
 
 p_g24_reconn_device_fail:
-057d 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
-057e 203a2281 branch g24_ch ,blank 
-057f 6fe1488d fetch 2 ,mem_24g_reconn_count 
-0580 1fe0fe01 increase 1 ,pdata 
-0581 67e1488d store 2 ,mem_24g_reconn_count 
-0582 2feffe09 isolate1 9 ,pdata 
-0583 6fe0c88f fetch 1 ,mem_24g_reconn_type 
-0584 c0010587 beq fast_conn_and_3_0_addr ,p_g24_reconn_fast_conn_and_3_0 
-0585 c002058e beq pair_and_3_0_addr ,p_g24_reconn_pair_and_3_0 
-0586 202025b1 branch g24_reconn_device_fail + 7 
+0580 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
+0581 203a2281 branch g24_ch ,blank 
+0582 6fe1488d fetch 2 ,mem_24g_reconn_count 
+0583 1fe0fe01 increase 1 ,pdata 
+0584 67e1488d store 2 ,mem_24g_reconn_count 
+0585 2feffe09 isolate1 9 ,pdata 
+0586 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+0587 c001058a beq fast_conn_and_3_0_addr ,p_g24_reconn_fast_conn_and_3_0 
+0588 c0020591 beq pair_and_3_0_addr ,p_g24_reconn_pair_and_3_0 
+0589 202025b1 branch g24_reconn_device_fail + 7 
 
 p_g24_reconn_fast_conn_and_3_0:
-0587 6fe0cccf fetch 1 ,mem_24g_reconn_pairing_switch 
-0588 1fe0fe01 increase 1 ,pdata 
-0589 1fe17e03 and_into 3 ,pdata 
-058a 67e0cccf store 1 ,mem_24g_reconn_pairing_switch 
-058b c000257e beq 0 ,g24_reconn_device_3_0_addr 
-058c c001256f beq 2 ,g24_reconn_fast_conn 
-058d 202022ef branch g24_pair_init_param 
+058a 6fe0cccf fetch 1 ,mem_24g_reconn_pairing_switch 
+058b 1fe0fe01 increase 1 ,pdata 
+058c 1fe17e03 and_into 3 ,pdata 
+058d 67e0cccf store 1 ,mem_24g_reconn_pairing_switch 
+058e c000257e beq 0 ,g24_reconn_device_3_0_addr 
+058f c001256f beq 2 ,g24_reconn_fast_conn 
+0590 202022ef branch g24_pair_init_param 
 
 p_g24_reconn_pair_and_3_0:
-058e 2020a57e branch g24_reconn_device_3_0_addr ,true 
-058f 202022ef branch g24_pair_init_param 
+0591 2020a57e branch g24_reconn_device_3_0_addr ,true 
+0592 202022ef branch g24_pair_init_param 
 
 p_g24_lpm_wait:
-0590 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
-0591 243a7ec7 nbranch disable_user ,blank 
-0592 78347c00 enable user 
-0593 20401436 call lpo_calibration 
-0594 6fe1c174 fetch 3 ,mem_clks_per_lpo 
-0595 203a7ec7 branch disable_user ,blank 
-0596 6fe0c099 fetch 1 ,mem_lpm_mode 
-0597 203a7ec7 branch disable_user ,blank 
-0598 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
-0599 c000fec7 beq g24_tx_timer_int_enable ,disable_user 
-059a 20600000 rtn 
+0593 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
+0594 243a7ec7 nbranch disable_user ,blank 
+0595 78347c00 enable user 
+0596 20401436 call lpo_calibration 
+0597 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+0598 203a7ec7 branch disable_user ,blank 
+0599 6fe0c099 fetch 1 ,mem_lpm_mode 
+059a 203a7ec7 branch disable_user ,blank 
+059b 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+059c c000fec7 beq g24_tx_timer_int_enable ,disable_user 
+059d 20600000 rtn 
 
 p_ui_timer_check:
-059b 6fe0cbf4 fetch 1 ,mem_power_on_flag 
-059c 245a78cc ncall ui_timer_init ,blank 
-059d 704bf400 jam 0 ,mem_power_on_flag 
-059e 202078bc branch ui_timer_check + 1 
+059e 6fe0cbf4 fetch 1 ,mem_power_on_flag 
+059f 245a78cc ncall ui_timer_init ,blank 
+05a0 704bf400 jam 0 ,mem_power_on_flag 
+05a1 202078bc branch ui_timer_check + 1 
 
 p_le_enable_phy_by_pdata:
-059f 18427e00 copy temp ,pdata 
-05a0 c2801651 bbit1 bit_le_1m_phy ,le_enable 
-05a1 c28085a3 bbit1 bit_le_2m_phy ,p_le_enable_2m 
-05a2 2020163c branch le_enable_phy_by_pdata + 5 
+05a2 18427e00 copy temp ,pdata 
+05a3 c2801651 bbit1 bit_le_1m_phy ,le_enable 
+05a4 c28085a6 bbit1 bit_le_2m_phy ,p_le_enable_2m 
+05a5 2020163c branch le_enable_phy_by_pdata + 5 
 
 p_le_enable_2m:
-05a3 20401640 call le_enable_2m 
-05a4 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
-05a5 20600000 rtn 
+05a6 20401640 call le_enable_2m 
+05a7 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+05a8 20600000 rtn 
 
 p_mouse_motion:
-05a6 78547c00 disable user 
-05a7 58000000 setarg 0 
-05a8 67e348d5 store 6 ,mem_mouse_x 
-05a9 204005b6 call p_mouse_check_sensor_data 
-05aa 58000089 setarg 0x0089 
-05ab 20405d5e call twspi_write 
-05ac 20400397 call p_mouse_dpi_config 
-05ad 20403fbe call mouse_zwheel 
-05ae 20403fc3 call mouse_t_zwheel 
-05af 204005c8 call p_mouse_key 
-05b0 6fe0c8d4 fetch 1 ,mem_mouse_key 
-05b1 1fe17e1f and_into 0x1f ,pdata 
-05b2 67e0c8d4 store 1 ,mem_mouse_key 
-05b3 24344766 nbranch mouse_drawing_optima_init ,user 
-05b4 204005c5 call p_mouse_drawing_optima 
-05b5 20204584 branch mouse_no_data_timer_init 
+05a9 78547c00 disable user 
+05aa 58000000 setarg 0 
+05ab 67e348d5 store 6 ,mem_mouse_x 
+05ac 204005b9 call p_mouse_check_sensor_data 
+05ad 58000089 setarg 0x0089 
+05ae 20405d5e call twspi_write 
+05af 20400397 call p_mouse_dpi_config 
+05b0 20403fbe call mouse_zwheel 
+05b1 20403fc3 call mouse_t_zwheel 
+05b2 204005cb call p_mouse_key 
+05b3 6fe0c8d4 fetch 1 ,mem_mouse_key 
+05b4 1fe17e1f and_into 0x1f ,pdata 
+05b5 67e0c8d4 store 1 ,mem_mouse_key 
+05b6 24344766 nbranch mouse_drawing_optima_init ,user 
+05b7 204005c8 call p_mouse_drawing_optima 
+05b8 20204584 branch mouse_no_data_timer_init 
 
 p_mouse_check_sensor_data:
-05b6 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
-05b7 c1800000 rtnne flash_sm_no_buys 
-05b8 6fe0c92c fetch 1 ,mem_config_sensor_type 
-05b9 c00605bb beq ka5857 ,p_mouse_ka5857_sensor_motion 
-05ba 20204283 branch mouse_check_sensor_data + 3 
+05b9 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
+05ba c1800000 rtnne flash_sm_no_buys 
+05bb 6fe0c92c fetch 1 ,mem_config_sensor_type 
+05bc c00605be beq ka5857 ,p_mouse_ka5857_sensor_motion 
+05bd 20204283 branch mouse_check_sensor_data + 3 
 
 p_mouse_ka5857_sensor_motion:
-05bb 20404304 call mouse_clear_sensor_data 
-05bc 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
-05bd c07f85c1 beq gpio_disable ,p_mouse_ka5857_sensor_motion_1 
-05be 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
-05bf 204060fd call gpio_get_bit 
-05c0 24608000 nrtn true 
+05be 20404304 call mouse_clear_sensor_data 
+05bf 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+05c0 c07f85c4 beq gpio_disable ,p_mouse_ka5857_sensor_motion_1 
+05c1 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+05c2 204060fd call gpio_get_bit 
+05c3 24608000 nrtn true 
 
 p_mouse_ka5857_sensor_motion_1:
-05c1 58000000 setarg pan_reg_pid_l 
-05c2 20405d65 call twspi_read 
-05c3 c0ac41f2 bne pka8g2_id1 ,mouse_twspi_reset 
-05c4 202042b9 branch mouse_p3212_sensor_motion_2 
+05c4 58000000 setarg pan_reg_pid_l 
+05c5 20405d65 call twspi_read 
+05c6 c0ac41f2 bne pka8g2_id1 ,mouse_twspi_reset 
+05c7 202042b9 branch mouse_p3212_sensor_motion_2 
 
 p_mouse_drawing_optima:
-05c5 6fe0c92c fetch 1 ,mem_config_sensor_type 
-05c6 c1018000 rtneq p3212 
-05c7 20204758 branch mouse_drawing_optima 
+05c8 6fe0c92c fetch 1 ,mem_config_sensor_type 
+05c9 c1018000 rtneq p3212 
+05ca 20204758 branch mouse_drawing_optima 
 
 p_mouse_key:
-05c8 204005cb call p_mouse_check_key_gpio 
-05c9 20400601 call p_mouse_ghost_key_check 
-05ca 2020411e branch mouse_key + 2 
+05cb 204005ce call p_mouse_check_key_gpio 
+05cc 20400604 call p_mouse_ghost_key_check 
+05cd 2020411e branch mouse_key + 2 
 
 p_mouse_check_key_gpio:
-05cb 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
-05cc 245a4161 ncall mouse_check_key_gpio_once ,blank 
-05cd da200000 arg 0 ,rega 
-05ce 204005d2 call p_mouse_check_lkey_gpio 
-05cf 204005e1 call p_mouse_check_bkkey_gpio 
-05d0 204005ee call p_mouse_check_fwkey_gpio 
-05d1 2020415e branch mouse_check_key_gpio_next 
+05ce 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+05cf 245a4161 ncall mouse_check_key_gpio_once ,blank 
+05d0 da200000 arg 0 ,rega 
+05d1 204005d5 call p_mouse_check_lkey_gpio 
+05d2 204005e4 call p_mouse_check_bkkey_gpio 
+05d3 204005f1 call p_mouse_check_fwkey_gpio 
+05d4 2020415e branch mouse_check_key_gpio_next 
 
 p_mouse_check_lkey_gpio:
-05d2 6fe0c91c fetch 1 ,mem_lbutton_gpio 
-05d3 204005fb call p_mouse_gpio_config_output_high 
-05d4 20404164 call mouse_check_lkey_gpio 
-05d5 6848c91c fetcht 1 ,mem_lbutton_gpio 
-05d6 20403f96 call mouse_gpio_config_input_pu 
+05d5 6fe0c91c fetch 1 ,mem_lbutton_gpio 
+05d6 204005fe call p_mouse_gpio_config_output_high 
+05d7 20404164 call mouse_check_lkey_gpio 
+05d8 6848c91c fetcht 1 ,mem_lbutton_gpio 
+05d9 20403f96 call mouse_gpio_config_input_pu 
 
 p_mouse_check_rkey_gpio:
-05d7 6fe0c91d fetch 1 ,mem_rbutton_gpio 
-05d8 204005fb call p_mouse_gpio_config_output_high 
-05d9 2040416a call mouse_check_rkey_gpio 
-05da 6848c91d fetcht 1 ,mem_rbutton_gpio 
-05db 20403f96 call mouse_gpio_config_input_pu 
+05da 6fe0c91d fetch 1 ,mem_rbutton_gpio 
+05db 204005fe call p_mouse_gpio_config_output_high 
+05dc 2040416a call mouse_check_rkey_gpio 
+05dd 6848c91d fetcht 1 ,mem_rbutton_gpio 
+05de 20403f96 call mouse_gpio_config_input_pu 
 
 p_mouse_check_mkey_gpio:
-05dc 6fe0c91e fetch 1 ,mem_mbutton_gpio 
-05dd 204005fb call p_mouse_gpio_config_output_high 
-05de 20404170 call mouse_check_mkey_gpio 
-05df 6848c91e fetcht 1 ,mem_mbutton_gpio 
-05e0 20203f96 branch mouse_gpio_config_input_pu 
+05df 6fe0c91e fetch 1 ,mem_mbutton_gpio 
+05e0 204005fe call p_mouse_gpio_config_output_high 
+05e1 20404170 call mouse_check_mkey_gpio 
+05e2 6848c91e fetcht 1 ,mem_mbutton_gpio 
+05e3 20203f96 branch mouse_gpio_config_input_pu 
 
 p_mouse_check_bkkey_gpio:
-05e1 6fe0c911 fetch 1 ,mem_bk_button_gpio 
-05e2 c17f8000 rtneq gpio_disable 
-05e3 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
-05e4 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
-05e5 1fe22600 copy pdata ,regc 
-05e6 6848c911 fetcht 1 ,mem_bk_button_gpio 
-05e7 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
-05e8 c07f85ea beq gpio_disable ,p_mouse_3io6key_bk_check 
-05e9 2020417e branch mouse_check_bkkey_gpio_next 
+05e4 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+05e5 c17f8000 rtneq gpio_disable 
+05e6 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
+05e7 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+05e8 1fe22600 copy pdata ,regc 
+05e9 6848c911 fetcht 1 ,mem_bk_button_gpio 
+05ea 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+05eb c07f85ed beq gpio_disable ,p_mouse_3io6key_bk_check 
+05ec 2020417e branch mouse_check_bkkey_gpio_next 
 
 p_mouse_3io6key_bk_check:
-05ea 6fe0c911 fetch 1 ,mem_bk_button_gpio 
-05eb 204005fe call p_mouse_gpio_config_output_low 
-05ec 6848c911 fetcht 1 ,mem_bk_button_gpio 
-05ed 2020418b branch mouse_3io6key_bk_check 
+05ed 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+05ee 20400601 call p_mouse_gpio_config_output_low 
+05ef 6848c911 fetcht 1 ,mem_bk_button_gpio 
+05f0 2020418b branch mouse_3io6key_bk_check 
 
 p_mouse_check_fwkey_gpio:
-05ee 6fe0c912 fetch 1 ,mem_fw_button_gpio 
-05ef c17f8000 rtneq gpio_disable 
-05f0 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
-05f1 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
-05f2 1fe22600 copy pdata ,regc 
-05f3 6848c912 fetcht 1 ,mem_fw_button_gpio 
-05f4 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
-05f5 c07f85f7 beq gpio_disable ,p_mouse_3io6key_fw_check 
-05f6 20204197 branch mouse_check_fwkey_gpio_next 
+05f1 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+05f2 c17f8000 rtneq gpio_disable 
+05f3 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
+05f4 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+05f5 1fe22600 copy pdata ,regc 
+05f6 6848c912 fetcht 1 ,mem_fw_button_gpio 
+05f7 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+05f8 c07f85fa beq gpio_disable ,p_mouse_3io6key_fw_check 
+05f9 20204197 branch mouse_check_fwkey_gpio_next 
 
 p_mouse_3io6key_fw_check:
-05f7 6fe0c912 fetch 1 ,mem_fw_button_gpio 
-05f8 204005fe call p_mouse_gpio_config_output_low 
-05f9 6848c912 fetcht 1 ,mem_fw_button_gpio 
-05fa 202041a4 branch mouse_3io6key_fw_check 
+05fa 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+05fb 20400601 call p_mouse_gpio_config_output_low 
+05fc 6848c912 fetcht 1 ,mem_fw_button_gpio 
+05fd 202041a4 branch mouse_3io6key_fw_check 
 
 p_mouse_gpio_config_output_high:
-05fb c17f8000 rtneq gpio_disable 
-05fc d840003f arg gpcfg_output_high ,temp 
-05fd 2020612c branch gpio_config_function_int 
-
-p_mouse_gpio_config_output_low:
 05fe c17f8000 rtneq gpio_disable 
-05ff d840003e arg gpcfg_output_low ,temp 
+05ff d840003f arg gpcfg_output_high ,temp 
 0600 2020612c branch gpio_config_function_int 
 
+p_mouse_gpio_config_output_low:
+0601 c17f8000 rtneq gpio_disable 
+0602 d840003e arg gpcfg_output_low ,temp 
+0603 2020612c branch gpio_config_function_int 
+
 p_mouse_ghost_key_check:
-0601 704ba900 jam 0 ,mem_mouse_matrix_key_cow_count 
-0602 704baa00 jam 0 ,mem_mouse_matrix_key_row_count 
-0603 704bab00 jam 0 ,mem_mouse_ghost_flag 
-0604 1fe20400 copy pdata ,temp 
-0605 20400608 call p_mouse_ghost_key_check_l_fw 
-0606 2040060b call p_mouse_ghost_key_check_r_bk 
-0607 20204133 branch mouse_ghost_key_check + 6 
+0604 704ba900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0605 704baa00 jam 0 ,mem_mouse_matrix_key_row_count 
+0606 704bab00 jam 0 ,mem_mouse_ghost_flag 
+0607 1fe20400 copy pdata ,temp 
+0608 2040060b call p_mouse_ghost_key_check_l_fw 
+0609 2040060e call p_mouse_ghost_key_check_r_bk 
+060a 20204133 branch mouse_ghost_key_check + 6 
 
 p_mouse_ghost_key_check_l_fw:
-0608 18417e11 and temp ,mouse_l_fw_button ,pdata 
-0609 c008c14e beq mouse_l_fw_button ,mouse_matrix_cow_more_than_one_key 
-060a 20600000 rtn 
+060b 18417e11 and temp ,mouse_l_fw_button ,pdata 
+060c c008c14e beq mouse_l_fw_button ,mouse_matrix_cow_more_than_one_key 
+060d 20600000 rtn 
 
 p_mouse_ghost_key_check_r_bk:
-060b 18417e0a and temp ,mouse_r_bk_button ,pdata 
-060c c005414e beq mouse_r_bk_button ,mouse_matrix_cow_more_than_one_key 
-060d 20600000 rtn 
+060e 18417e0a and temp ,mouse_r_bk_button ,pdata 
+060f c005414e beq mouse_r_bk_button ,mouse_matrix_cow_more_than_one_key 
+0610 20600000 rtn 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/mouse_public/program/patch.prog	(revision 2435)
+++ /YC1308AF/branch/mouse/mouse_public/program/patch.prog	(working copy)
@@ -2137,6 +2137,12 @@
 	increase 1,pdata
 	store 2,mem_24g_reconn_count
 	rtn
+
+p_g24_reconn_mode_judge:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,g24_pair_start
+	branch g24_reconn_receiver_addr
+	
 p_g24_reconn_dispatch_next:
 	call g24_reconn_data_prep
 	call p_g24_transmit_receive_ack
@@ -2146,8 +2152,7 @@
 	fetch 4,mem_24g_pair_addr
 	fetcht 4,mem_24g_addr
 	isub temp,null
-	branch g24_pair_start,zero
-	
+	branch p_g24_reconn_mode_judge,zero
 	fetch 4,mem_24g_device_addr
 	fetcht 4,mem_24g_addr
 	isub temp,null
Index: sched/mouse.dat
===================================================================
--- /YC1308AF/branch/mouse/mouse_public/sched/mouse.dat	(revision 2443)
+++ /YC1308AF/branch/mouse/mouse_public/sched/mouse.dat	(working copy)
@@ -73,7 +73,7 @@
 #bit5 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
 #bit6 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
 #bit7 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING
-00
+80
 
 #mouse flag byte7
 #bit0 MOUSE_ENABLE_AUTO_24G_PARING
