Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/Only_24G_G222/output/eeprom.dat	(revision 1831)
+++ /YC1308AF/branch/mouse/YDN_Project/Only_24G_G222/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-36
+42
 18
 c2
 84
@@ -55,7 +55,7 @@
 c0
 66
 85
-b3
+b6
 c0
 67
 04
@@ -67,7 +67,7 @@
 c0
 68
 05
-d7
+da
 c0
 69
 03
@@ -111,11 +111,11 @@
 c0
 42
 85
-a8
+ab
 c0
 53
 05
-ac
+af
 c0
 6e
 85
@@ -147,7 +147,7 @@
 c0
 76
 05
-9d
+a0
 20
 20
 13
@@ -3823,7 +3823,7 @@
 20
 40
 06
-07
+0a
 d8
 40
 00
@@ -4123,7 +4123,7 @@
 20
 40
 06
-0a
+0d
 68
 48
 c9
@@ -4155,7 +4155,7 @@
 20
 40
 06
-07
+0a
 20
 40
 04
@@ -4183,7 +4183,7 @@
 20
 40
 06
-0a
+0d
 70
 4c
 20
@@ -5559,7 +5559,7 @@
 20
 3a
 05
-71
+74
 6f
 e1
 48
@@ -5576,6 +5576,18 @@
 60
 00
 00
+6f
+e4
+4b
+bc
+c2
+98
+22
+e4
+20
+20
+25
+77
 20
 40
 25
@@ -5587,11 +5599,11 @@
 24
 2c
 05
-8a
+8d
 24
 37
 85
-8a
+8d
 20
 40
 26
@@ -5610,8 +5622,8 @@
 00
 20
 22
-a2
-e4
+85
+71
 6f
 e2
 48
@@ -5627,7 +5639,7 @@
 20
 42
 85
-86
+89
 6f
 e0
 c8
@@ -5707,11 +5719,11 @@
 c0
 01
 05
-94
+97
 c0
 02
 05
-9b
+9e
 20
 20
 25
@@ -5823,7 +5835,7 @@
 c2
 80
 85
-b0
+b3
 20
 20
 16
@@ -5855,7 +5867,7 @@
 20
 40
 05
-c3
+c6
 58
 00
 00
@@ -5879,7 +5891,7 @@
 20
 40
 05
-d5
+d8
 6f
 e0
 c8
@@ -5899,7 +5911,7 @@
 20
 40
 05
-d2
+d5
 20
 20
 45
@@ -5919,7 +5931,7 @@
 c0
 06
 05
-c8
+cb
 20
 20
 42
@@ -5935,7 +5947,7 @@
 c0
 7f
 85
-ce
+d1
 68
 48
 c9
@@ -5979,7 +5991,7 @@
 20
 40
 05
-d7
+da
 20
 20
 41
@@ -5999,15 +6011,15 @@
 20
 40
 05
-de
+e1
 20
 40
 05
-ed
+f0
 20
 40
 05
-fa
+fd
 20
 20
 41
@@ -6019,7 +6031,7 @@
 20
 40
 06
-07
+0a
 20
 40
 41
@@ -6039,7 +6051,7 @@
 20
 40
 06
-07
+0a
 20
 40
 41
@@ -6059,7 +6071,7 @@
 20
 40
 06
-07
+0a
 20
 40
 41
@@ -6103,7 +6115,7 @@
 c0
 7f
 85
-f6
+f9
 20
 20
 41
@@ -6115,7 +6127,7 @@
 20
 40
 06
-0a
+0d
 68
 48
 c9
@@ -6155,7 +6167,7 @@
 c0
 7f
 86
-03
+06
 20
 20
 41
@@ -6167,7 +6179,7 @@
 20
 40
 06
-0a
+0d
 68
 48
 c9
@@ -6200,8 +6212,8 @@
 20
 61
 2c
-eb
-6b
+ca
+6e
 aa
 55
 40
@@ -7560,20 +7572,8 @@
 55
 b5
 91
-2a
-7c
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+c0
+65
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-e7
-af
+34
+ae
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/Only_24G_G222/output/program.lis	(revision 1831)
+++ /YC1308AF/branch/mouse/YDN_Project/Only_24G_G222/output/program.lis	(working copy)
@@ -12,10 +12,10 @@
 0009 c06303a5 beq patch18_6 ,p_mouse_app_enter_hibernate 
 000a c06403b0 beq patch19_0 ,p_mouse_setgpio_hibernate 
 000b c06483e0 beq patch19_1 ,p_mouse_lpm_before_common 
-000c c06685b3 beq patch19_5 ,p_mouse_motion 
+000c c06685b6 beq patch19_5 ,p_mouse_motion 
 000d c0670450 beq patch19_6 ,p_mouse_dpi_process 
 000e c0678483 beq patch19_7 ,p_mouse_seting_dpi 
-000f c06805d7 beq patch1a_0 ,p_mouse_check_key_gpio 
+000f c06805da beq patch1a_0 ,p_mouse_check_key_gpio 
 0010 c0690382 beq patch1a_2 ,p_mouse_init_sunt 
 0011 c0698394 beq patch1a_3 ,p_mouse_sensor_poweron 
 0012 c06a84c0 beq patch1a_5 ,p_mouse_priority_bb_event 
@@ -28,8 +28,8 @@
 
 pf_patch_ext:
 0019 c00f8095 beq patch23_7 ,p_twspi_reset 
-001a c04285a8 beq patch30_5 ,p_ui_timer_check 
-001b c05305ac beq patch34_6 ,p_le_enable_phy_by_pdata 
+001a c04285ab beq patch30_5 ,p_ui_timer_check 
+001b c05305af beq patch34_6 ,p_le_enable_phy_by_pdata 
 001c c06e852c beq patch3b_5 ,p_g24_dispatch 
 001d c06f0237 beq patch3b_6 ,p_g24_receive_packet 
 001e c07082b5 beq patch3c_1 ,p_g24_transmit 
@@ -37,7 +37,7 @@
 0020 c071855f beq patch3c_3 ,p_g24_pair_sm_common_next 
 0021 c0748569 beq patch3d_1 ,p_g24_reconn_dispatch 
 0022 c0750189 beq patch3d_2 ,p_g24_transmit_no_interrupt 
-0023 c076059d beq patch3d_4 ,p_g24_lpm_wait 
+0023 c07605a0 beq patch3d_4 ,p_g24_lpm_wait 
 0024 2020137e branch loop 
 
 p_mouse_led_on:
@@ -1274,7 +1274,7 @@
 03b7 6848c914 fetcht 1 ,mem_matrix_public_gpio 
 03b8 204060e6 call gpio_clr_wake 
 03b9 6fe0c924 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-03ba 20400607 call p_mouse_gpio_config_output_high 
+03ba 2040060a call p_mouse_gpio_config_output_high 
 03bb d8400003 arg 3 ,temp 
 03bc 20403f96 call mouse_gpio_config_input_pu 
 03bd 20403e80 call mouse_lpm_before_common 
@@ -1375,7 +1375,7 @@
 
 p_mouse_3io6key_dpi_check:
 0404 6fe0c913 fetch 1 ,mem_dpi_button_gpio 
-0405 2040060a call p_mouse_gpio_config_output_low 
+0405 2040060d call p_mouse_gpio_config_output_low 
 0406 6848c913 fetcht 1 ,mem_dpi_button_gpio 
 0407 202041d5 branch mouse_3io6key_check 
 
@@ -1387,7 +1387,7 @@
 
 p_mouse_dpi_another_gpio_connect_gnd_check:
 040c 6fe0cc1c fetch 1 ,mem_dpi_another_button_gpio 
-040d 20400607 call p_mouse_gpio_config_output_high 
+040d 2040060a call p_mouse_gpio_config_output_high 
 040e 20400421 call p_mouse_dpi_another_check 
 040f 6848cc1c fetcht 1 ,mem_dpi_another_button_gpio 
 0410 20203f96 branch mouse_gpio_config_input_pu 
@@ -1396,7 +1396,7 @@
 0411 6fe0cc1c fetch 1 ,mem_dpi_another_button_gpio 
 0412 793ffe07 set0 gpio_active_bit ,pdata 
 0413 67e0cc1c store 1 ,mem_dpi_another_button_gpio 
-0414 2040060a call p_mouse_gpio_config_output_low 
+0414 2040060d call p_mouse_gpio_config_output_low 
 0415 704c2000 jam mouse_dpi_another_key ,mem_mouse_key_temp_patch 
 0416 6848cc1c fetcht 1 ,mem_dpi_another_button_gpio 
 0417 6fe0cc1d fetch 1 ,mem_dpi_another_press_status 
@@ -1874,217 +1874,222 @@
 0569 6fe1488d fetch 2 ,mem_24g_reconn_count 
 056a d84001f8 arg 0x01f8 ,temp 
 056b 98417e00 iand temp ,pdata 
-056c 203a0571 branch p_g24_reconn_dispatch_next ,blank 
+056c 203a0574 branch p_g24_reconn_dispatch_next ,blank 
 056d 6fe1488d fetch 2 ,mem_24g_reconn_count 
 056e 1fe0fe01 increase 1 ,pdata 
 056f 67e1488d store 2 ,mem_24g_reconn_count 
 0570 20600000 rtn 
 
+p_g24_reconn_mode_judge:
+0571 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0572 c29822e4 bbit1 mouse_enable_auto_24g_paring ,g24_pair_start 
+0573 20202577 branch g24_reconn_receiver_addr 
+
 p_g24_reconn_dispatch_next:
-0571 204025a3 call g24_reconn_data_prep 
-0572 20400228 call p_g24_transmit_receive_ack 
-0573 242c058a nbranch p_g24_reconn_device_fail ,sync 
-0574 2437858a nbranch p_g24_reconn_device_fail ,user3 
-0575 20402679 call g24_ackpayload_parse 
-0576 6fe2487b fetch 4 ,mem_24g_pair_addr 
-0577 684a483f fetcht 4 ,mem_24g_addr 
-0578 98467c00 isub temp ,null 
-0579 2022a2e4 branch g24_pair_start ,zero 
-057a 6fe248ad fetch 4 ,mem_24g_device_addr 
-057b 684a483f fetcht 4 ,mem_24g_addr 
-057c 98467c00 isub temp ,null 
-057d 20428586 call p_g24_store_receiver_addr ,zero 
-057e 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
-057f 793ffe02 set0 state_24g_reconn ,pdata 
-0580 67e0c8a5 store 1 ,mem_24g_conn_sm 
-0581 58000000 setarg 0 
-0582 67e14887 store 2 ,mem_24g_pair_timeout 
-0583 67e1488d store 2 ,mem_24g_reconn_count 
-0584 67e1488b store 2 ,mem_24g_reconn_timeout 
-0585 2020259e branch g24_reconn_attempt_success 
+0574 204025a3 call g24_reconn_data_prep 
+0575 20400228 call p_g24_transmit_receive_ack 
+0576 242c058d nbranch p_g24_reconn_device_fail ,sync 
+0577 2437858d nbranch p_g24_reconn_device_fail ,user3 
+0578 20402679 call g24_ackpayload_parse 
+0579 6fe2487b fetch 4 ,mem_24g_pair_addr 
+057a 684a483f fetcht 4 ,mem_24g_addr 
+057b 98467c00 isub temp ,null 
+057c 20228571 branch p_g24_reconn_mode_judge ,zero 
+057d 6fe248ad fetch 4 ,mem_24g_device_addr 
+057e 684a483f fetcht 4 ,mem_24g_addr 
+057f 98467c00 isub temp ,null 
+0580 20428589 call p_g24_store_receiver_addr ,zero 
+0581 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+0582 793ffe02 set0 state_24g_reconn ,pdata 
+0583 67e0c8a5 store 1 ,mem_24g_conn_sm 
+0584 58000000 setarg 0 
+0585 67e14887 store 2 ,mem_24g_pair_timeout 
+0586 67e1488d store 2 ,mem_24g_reconn_count 
+0587 67e1488b store 2 ,mem_24g_reconn_timeout 
+0588 2020259e branch g24_reconn_attempt_success 
 
 p_g24_store_receiver_addr:
-0586 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
-0587 207a0000 rtn blank 
-0588 67e24895 store 4 ,mem_24g_receiver_addr 
-0589 20202587 branch g24_ch_syncword_crc8_init 
+0589 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+058a 207a0000 rtn blank 
+058b 67e24895 store 4 ,mem_24g_receiver_addr 
+058c 20202587 branch g24_ch_syncword_crc8_init 
 
 p_g24_reconn_device_fail:
-058a 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
-058b 203a2281 branch g24_ch ,blank 
-058c 6fe1488d fetch 2 ,mem_24g_reconn_count 
-058d 1fe0fe01 increase 1 ,pdata 
-058e 67e1488d store 2 ,mem_24g_reconn_count 
-058f 2feffe09 isolate1 9 ,pdata 
-0590 6fe0c88f fetch 1 ,mem_24g_reconn_type 
-0591 c0010594 beq fast_conn_and_3_0_addr ,p_g24_reconn_fast_conn_and_3_0 
-0592 c002059b beq pair_and_3_0_addr ,p_g24_reconn_pair_and_3_0 
-0593 202025b1 branch g24_reconn_device_fail + 7 
+058d 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
+058e 203a2281 branch g24_ch ,blank 
+058f 6fe1488d fetch 2 ,mem_24g_reconn_count 
+0590 1fe0fe01 increase 1 ,pdata 
+0591 67e1488d store 2 ,mem_24g_reconn_count 
+0592 2feffe09 isolate1 9 ,pdata 
+0593 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+0594 c0010597 beq fast_conn_and_3_0_addr ,p_g24_reconn_fast_conn_and_3_0 
+0595 c002059e beq pair_and_3_0_addr ,p_g24_reconn_pair_and_3_0 
+0596 202025b1 branch g24_reconn_device_fail + 7 
 
 p_g24_reconn_fast_conn_and_3_0:
-0594 6fe0cccf fetch 1 ,mem_24g_reconn_pairing_switch 
-0595 1fe0fe01 increase 1 ,pdata 
-0596 1fe17e03 and_into 3 ,pdata 
-0597 67e0cccf store 1 ,mem_24g_reconn_pairing_switch 
-0598 c000257e beq 0 ,g24_reconn_device_3_0_addr 
-0599 c001256f beq 2 ,g24_reconn_fast_conn 
-059a 202022ef branch g24_pair_init_param 
+0597 6fe0cccf fetch 1 ,mem_24g_reconn_pairing_switch 
+0598 1fe0fe01 increase 1 ,pdata 
+0599 1fe17e03 and_into 3 ,pdata 
+059a 67e0cccf store 1 ,mem_24g_reconn_pairing_switch 
+059b c000257e beq 0 ,g24_reconn_device_3_0_addr 
+059c c001256f beq 2 ,g24_reconn_fast_conn 
+059d 202022ef branch g24_pair_init_param 
 
 p_g24_reconn_pair_and_3_0:
-059b 2020a57e branch g24_reconn_device_3_0_addr ,true 
-059c 202022ef branch g24_pair_init_param 
+059e 2020a57e branch g24_reconn_device_3_0_addr ,true 
+059f 202022ef branch g24_pair_init_param 
 
 p_g24_lpm_wait:
-059d 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
-059e 243a7ec7 nbranch disable_user ,blank 
-059f 78347c00 enable user 
-05a0 20401436 call lpo_calibration 
-05a1 6fe1c174 fetch 3 ,mem_clks_per_lpo 
-05a2 203a7ec7 branch disable_user ,blank 
-05a3 6fe0c099 fetch 1 ,mem_lpm_mode 
-05a4 203a7ec7 branch disable_user ,blank 
-05a5 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
-05a6 c000fec7 beq g24_tx_timer_int_enable ,disable_user 
-05a7 20600000 rtn 
+05a0 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
+05a1 243a7ec7 nbranch disable_user ,blank 
+05a2 78347c00 enable user 
+05a3 20401436 call lpo_calibration 
+05a4 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+05a5 203a7ec7 branch disable_user ,blank 
+05a6 6fe0c099 fetch 1 ,mem_lpm_mode 
+05a7 203a7ec7 branch disable_user ,blank 
+05a8 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+05a9 c000fec7 beq g24_tx_timer_int_enable ,disable_user 
+05aa 20600000 rtn 
 
 p_ui_timer_check:
-05a8 6fe0cbf4 fetch 1 ,mem_power_on_flag 
-05a9 245a78cc ncall ui_timer_init ,blank 
-05aa 704bf400 jam 0 ,mem_power_on_flag 
-05ab 202078bc branch ui_timer_check + 1 
+05ab 6fe0cbf4 fetch 1 ,mem_power_on_flag 
+05ac 245a78cc ncall ui_timer_init ,blank 
+05ad 704bf400 jam 0 ,mem_power_on_flag 
+05ae 202078bc branch ui_timer_check + 1 
 
 p_le_enable_phy_by_pdata:
-05ac 18427e00 copy temp ,pdata 
-05ad c2801651 bbit1 bit_le_1m_phy ,le_enable 
-05ae c28085b0 bbit1 bit_le_2m_phy ,p_le_enable_2m 
-05af 2020163c branch le_enable_phy_by_pdata + 5 
+05af 18427e00 copy temp ,pdata 
+05b0 c2801651 bbit1 bit_le_1m_phy ,le_enable 
+05b1 c28085b3 bbit1 bit_le_2m_phy ,p_le_enable_2m 
+05b2 2020163c branch le_enable_phy_by_pdata + 5 
 
 p_le_enable_2m:
-05b0 20401640 call le_enable_2m 
-05b1 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
-05b2 20600000 rtn 
+05b3 20401640 call le_enable_2m 
+05b4 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+05b5 20600000 rtn 
 
 p_mouse_motion:
-05b3 78547c00 disable user 
-05b4 58000000 setarg 0 
-05b5 67e348d5 store 6 ,mem_mouse_x 
-05b6 204005c3 call p_mouse_check_sensor_data 
-05b7 58000089 setarg 0x0089 
-05b8 20405d5e call twspi_write 
-05b9 2040039a call p_mouse_dpi_config 
-05ba 20403fbe call mouse_zwheel 
-05bb 20403fc3 call mouse_t_zwheel 
-05bc 204005d5 call p_mouse_key 
-05bd 6fe0c8d4 fetch 1 ,mem_mouse_key 
-05be 1fe17e1f and_into 0x1f ,pdata 
-05bf 67e0c8d4 store 1 ,mem_mouse_key 
-05c0 24344766 nbranch mouse_drawing_optima_init ,user 
-05c1 204005d2 call p_mouse_drawing_optima 
-05c2 20204584 branch mouse_no_data_timer_init 
+05b6 78547c00 disable user 
+05b7 58000000 setarg 0 
+05b8 67e348d5 store 6 ,mem_mouse_x 
+05b9 204005c6 call p_mouse_check_sensor_data 
+05ba 58000089 setarg 0x0089 
+05bb 20405d5e call twspi_write 
+05bc 2040039a call p_mouse_dpi_config 
+05bd 20403fbe call mouse_zwheel 
+05be 20403fc3 call mouse_t_zwheel 
+05bf 204005d8 call p_mouse_key 
+05c0 6fe0c8d4 fetch 1 ,mem_mouse_key 
+05c1 1fe17e1f and_into 0x1f ,pdata 
+05c2 67e0c8d4 store 1 ,mem_mouse_key 
+05c3 24344766 nbranch mouse_drawing_optima_init ,user 
+05c4 204005d5 call p_mouse_drawing_optima 
+05c5 20204584 branch mouse_no_data_timer_init 
 
 p_mouse_check_sensor_data:
-05c3 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
-05c4 c1800000 rtnne flash_sm_no_buys 
-05c5 6fe0c92c fetch 1 ,mem_config_sensor_type 
-05c6 c00605c8 beq ka5857 ,p_mouse_ka5857_sensor_motion 
-05c7 20204283 branch mouse_check_sensor_data + 3 
+05c6 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
+05c7 c1800000 rtnne flash_sm_no_buys 
+05c8 6fe0c92c fetch 1 ,mem_config_sensor_type 
+05c9 c00605cb beq ka5857 ,p_mouse_ka5857_sensor_motion 
+05ca 20204283 branch mouse_check_sensor_data + 3 
 
 p_mouse_ka5857_sensor_motion:
-05c8 20404304 call mouse_clear_sensor_data 
-05c9 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
-05ca c07f85ce beq gpio_disable ,p_mouse_ka5857_sensor_motion_1 
-05cb 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
-05cc 204060fd call gpio_get_bit 
-05cd 24608000 nrtn true 
+05cb 20404304 call mouse_clear_sensor_data 
+05cc 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+05cd c07f85d1 beq gpio_disable ,p_mouse_ka5857_sensor_motion_1 
+05ce 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+05cf 204060fd call gpio_get_bit 
+05d0 24608000 nrtn true 
 
 p_mouse_ka5857_sensor_motion_1:
-05ce 58000000 setarg pan_reg_pid_l 
-05cf 20405d65 call twspi_read 
-05d0 c0ac41f2 bne pka8g2_id1 ,mouse_twspi_reset 
-05d1 202042b9 branch mouse_p3212_sensor_motion_2 
+05d1 58000000 setarg pan_reg_pid_l 
+05d2 20405d65 call twspi_read 
+05d3 c0ac41f2 bne pka8g2_id1 ,mouse_twspi_reset 
+05d4 202042b9 branch mouse_p3212_sensor_motion_2 
 
 p_mouse_drawing_optima:
-05d2 6fe0c92c fetch 1 ,mem_config_sensor_type 
-05d3 c1018000 rtneq p3212 
-05d4 20204758 branch mouse_drawing_optima 
+05d5 6fe0c92c fetch 1 ,mem_config_sensor_type 
+05d6 c1018000 rtneq p3212 
+05d7 20204758 branch mouse_drawing_optima 
 
 p_mouse_key:
-05d5 204005d7 call p_mouse_check_key_gpio 
-05d6 2020411d branch mouse_key + 1 
+05d8 204005da call p_mouse_check_key_gpio 
+05d9 2020411d branch mouse_key + 1 
 
 p_mouse_check_key_gpio:
-05d7 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
-05d8 245a4161 ncall mouse_check_key_gpio_once ,blank 
-05d9 da200000 arg 0 ,rega 
-05da 204005de call p_mouse_check_lkey_gpio 
-05db 204005ed call p_mouse_check_bkkey_gpio 
-05dc 204005fa call p_mouse_check_fwkey_gpio 
-05dd 2020415e branch mouse_check_key_gpio_next 
+05da 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+05db 245a4161 ncall mouse_check_key_gpio_once ,blank 
+05dc da200000 arg 0 ,rega 
+05dd 204005e1 call p_mouse_check_lkey_gpio 
+05de 204005f0 call p_mouse_check_bkkey_gpio 
+05df 204005fd call p_mouse_check_fwkey_gpio 
+05e0 2020415e branch mouse_check_key_gpio_next 
 
 p_mouse_check_lkey_gpio:
-05de 6fe0c91c fetch 1 ,mem_lbutton_gpio 
-05df 20400607 call p_mouse_gpio_config_output_high 
-05e0 20404164 call mouse_check_lkey_gpio 
-05e1 6848c91c fetcht 1 ,mem_lbutton_gpio 
-05e2 20403f96 call mouse_gpio_config_input_pu 
+05e1 6fe0c91c fetch 1 ,mem_lbutton_gpio 
+05e2 2040060a call p_mouse_gpio_config_output_high 
+05e3 20404164 call mouse_check_lkey_gpio 
+05e4 6848c91c fetcht 1 ,mem_lbutton_gpio 
+05e5 20403f96 call mouse_gpio_config_input_pu 
 
 p_mouse_check_rkey_gpio:
-05e3 6fe0c91d fetch 1 ,mem_rbutton_gpio 
-05e4 20400607 call p_mouse_gpio_config_output_high 
-05e5 2040416a call mouse_check_rkey_gpio 
-05e6 6848c91d fetcht 1 ,mem_rbutton_gpio 
-05e7 20403f96 call mouse_gpio_config_input_pu 
+05e6 6fe0c91d fetch 1 ,mem_rbutton_gpio 
+05e7 2040060a call p_mouse_gpio_config_output_high 
+05e8 2040416a call mouse_check_rkey_gpio 
+05e9 6848c91d fetcht 1 ,mem_rbutton_gpio 
+05ea 20403f96 call mouse_gpio_config_input_pu 
 
 p_mouse_check_mkey_gpio:
-05e8 6fe0c91e fetch 1 ,mem_mbutton_gpio 
-05e9 20400607 call p_mouse_gpio_config_output_high 
-05ea 20404170 call mouse_check_mkey_gpio 
-05eb 6848c91e fetcht 1 ,mem_mbutton_gpio 
-05ec 20203f96 branch mouse_gpio_config_input_pu 
+05eb 6fe0c91e fetch 1 ,mem_mbutton_gpio 
+05ec 2040060a call p_mouse_gpio_config_output_high 
+05ed 20404170 call mouse_check_mkey_gpio 
+05ee 6848c91e fetcht 1 ,mem_mbutton_gpio 
+05ef 20203f96 branch mouse_gpio_config_input_pu 
 
 p_mouse_check_bkkey_gpio:
-05ed 6fe0c911 fetch 1 ,mem_bk_button_gpio 
-05ee c17f8000 rtneq gpio_disable 
-05ef 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
-05f0 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
-05f1 1fe22600 copy pdata ,regc 
-05f2 6848c911 fetcht 1 ,mem_bk_button_gpio 
-05f3 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
-05f4 c07f85f6 beq gpio_disable ,p_mouse_3io6key_bk_check 
-05f5 2020417e branch mouse_check_bkkey_gpio_next 
+05f0 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+05f1 c17f8000 rtneq gpio_disable 
+05f2 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
+05f3 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+05f4 1fe22600 copy pdata ,regc 
+05f5 6848c911 fetcht 1 ,mem_bk_button_gpio 
+05f6 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+05f7 c07f85f9 beq gpio_disable ,p_mouse_3io6key_bk_check 
+05f8 2020417e branch mouse_check_bkkey_gpio_next 
 
 p_mouse_3io6key_bk_check:
-05f6 6fe0c911 fetch 1 ,mem_bk_button_gpio 
-05f7 2040060a call p_mouse_gpio_config_output_low 
-05f8 6848c911 fetcht 1 ,mem_bk_button_gpio 
-05f9 2020418b branch mouse_3io6key_bk_check 
+05f9 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+05fa 2040060d call p_mouse_gpio_config_output_low 
+05fb 6848c911 fetcht 1 ,mem_bk_button_gpio 
+05fc 2020418b branch mouse_3io6key_bk_check 
 
 p_mouse_check_fwkey_gpio:
-05fa 6fe0c912 fetch 1 ,mem_fw_button_gpio 
-05fb c17f8000 rtneq gpio_disable 
-05fc 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
-05fd 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
-05fe 1fe22600 copy pdata ,regc 
-05ff 6848c912 fetcht 1 ,mem_fw_button_gpio 
-0600 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
-0601 c07f8603 beq gpio_disable ,p_mouse_3io6key_fw_check 
-0602 20204197 branch mouse_check_fwkey_gpio_next 
+05fd 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+05fe c17f8000 rtneq gpio_disable 
+05ff 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
+0600 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+0601 1fe22600 copy pdata ,regc 
+0602 6848c912 fetcht 1 ,mem_fw_button_gpio 
+0603 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+0604 c07f8606 beq gpio_disable ,p_mouse_3io6key_fw_check 
+0605 20204197 branch mouse_check_fwkey_gpio_next 
 
 p_mouse_3io6key_fw_check:
-0603 6fe0c912 fetch 1 ,mem_fw_button_gpio 
-0604 2040060a call p_mouse_gpio_config_output_low 
-0605 6848c912 fetcht 1 ,mem_fw_button_gpio 
-0606 202041a4 branch mouse_3io6key_fw_check 
+0606 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+0607 2040060d call p_mouse_gpio_config_output_low 
+0608 6848c912 fetcht 1 ,mem_fw_button_gpio 
+0609 202041a4 branch mouse_3io6key_fw_check 
 
 p_mouse_gpio_config_output_high:
-0607 c17f8000 rtneq gpio_disable 
-0608 d840003f arg gpcfg_output_high ,temp 
-0609 2020612c branch gpio_config_function_int 
-
-p_mouse_gpio_config_output_low:
 060a c17f8000 rtneq gpio_disable 
-060b d840003e arg gpcfg_output_low ,temp 
+060b d840003f arg gpcfg_output_high ,temp 
 060c 2020612c branch gpio_config_function_int 
+
+p_mouse_gpio_config_output_low:
+060d c17f8000 rtneq gpio_disable 
+060e d840003e arg gpcfg_output_low ,temp 
+060f 2020612c branch gpio_config_function_int 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/Only_24G_G222/program/patch.prog	(revision 1831)
+++ /YC1308AF/branch/mouse/YDN_Project/Only_24G_G222/program/patch.prog	(working copy)
@@ -2150,6 +2150,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
@@ -2159,8 +2165,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
