Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/output/eeprom.dat	(revision 1178)
+++ /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-56
+4e
 0d
 c2
 84
@@ -39,7 +39,7 @@
 c0
 62
 02
-c6
+c4
 c0
 63
 80
@@ -59,7 +59,7 @@
 c0
 67
 03
-2c
+2a
 c0
 67
 82
@@ -71,7 +71,7 @@
 c0
 6a
 83
-45
+43
 c0
 6b
 01
@@ -83,27 +83,27 @@
 c0
 6d
 02
-af
+ad
 c0
 6d
 82
-b8
+b6
 c0
 6e
 02
-c2
+c0
 c0
 6f
 83
-32
+30
 c0
 70
 03
-3e
+3c
 c0
 74
 02
-d7
+d5
 20
 20
 13
@@ -119,15 +119,15 @@
 c0
 43
 82
-d3
+d1
 c0
 50
 82
-eb
+e9
 c0
 60
 02
-f5
+f3
 c0
 71
 01
@@ -139,7 +139,7 @@
 c0
 76
 03
-29
+27
 20
 20
 13
@@ -499,7 +499,7 @@
 20
 20
 02
-87
+85
 6f
 e0
 83
@@ -1011,7 +1011,7 @@
 20
 40
 02
-87
+85
 68
 48
 c9
@@ -1855,11 +1855,11 @@
 20
 40
 02
-8b
+89
 20
 40
 02
-a0
+9e
 20
 40
 44
@@ -1907,7 +1907,7 @@
 20
 20
 02
-a7
+a5
 6f
 e0
 cb
@@ -1927,11 +1927,11 @@
 20
 3a
 02
-87
+85
 20
 20
 02
-83
+81
 6f
 e0
 cb
@@ -2547,23 +2547,15 @@
 1f
 e6
 7c
-08
-24
-41
-02
-81
-c0
-01
+0a
+20
+42
 82
-83
+7f
 c0
 02
 82
-87
-c0
-03
-82
-83
+81
 20
 60
 00
@@ -2571,11 +2563,11 @@
 70
 48
 f8
-01
+00
 20
 20
 02
-87
+85
 68
 48
 cb
@@ -2615,7 +2607,7 @@
 c0
 00
 02
-91
+8f
 6f
 e4
 4b
@@ -2631,7 +2623,7 @@
 20
 20
 02
-94
+92
 6f
 e4
 4b
@@ -2667,7 +2659,7 @@
 20
 22
 82
-9b
+99
 20
 20
 44
@@ -2735,7 +2727,7 @@
 da
 40
 02
-ac
+aa
 20
 20
 31
@@ -2835,7 +2827,7 @@
 24
 3a
 02
-c5
+c3
 20
 40
 02
@@ -2879,7 +2871,7 @@
 c0
 19
 82
-d1
+cf
 c0
 1a
 3d
@@ -2939,7 +2931,7 @@
 c0
 04
 82
-df
+dd
 20
 20
 4d
@@ -3039,7 +3031,7 @@
 c0
 02
 02
-f8
+f6
 20
 20
 19
@@ -3051,7 +3043,7 @@
 20
 40
 03
-10
+0e
 20
 40
 7c
@@ -3066,12 +3058,12 @@
 36
 c0
 05
-03
-00
+02
+fe
 c0
 09
 03
-19
+17
 20
 20
 1c
@@ -3099,7 +3091,7 @@
 c2
 81
 83
-0a
+08
 6f
 e1
 44
@@ -3127,7 +3119,7 @@
 24
 22
 83
-06
+04
 20
 40
 1e
@@ -3135,7 +3127,7 @@
 24
 34
 03
-06
+04
 20
 20
 1e
@@ -3287,7 +3279,7 @@
 20
 40
 03
-37
+35
 60
 48
 c9
@@ -3347,7 +3339,7 @@
 24
 42
 83
-37
+35
 20
 20
 47
@@ -3367,15 +3359,15 @@
 c0
 00
 83
-4c
+4a
 c0
 01
 03
-4e
+4c
 c0
 01
 83
-50
+4e
 20
 60
 00
@@ -3387,7 +3379,7 @@
 20
 20
 03
-51
+4f
 6f
 e3
 49
@@ -3395,7 +3387,7 @@
 20
 20
 03
-51
+4f
 6f
 e3
 49
@@ -3416,8 +3408,8 @@
 20
 3d
 59
-b7
-d7
+be
+95
 aa
 55
 40
@@ -3793,7 +3785,7 @@
 00
 c0
 49
-02
+01
 aa
 55
 01
@@ -3814,11 +3806,11 @@
 00
 e3
 48
-18
+4a
 01
-04
+2c
 01
-0e
+36
 01
 aa
 55
@@ -4615,8 +4607,8 @@
 08
 08
 0a
-c9
-eb
+1a
+94
 ff
 ff
 ff
@@ -8188,5 +8180,13 @@
 ff
 ff
 ff
-04
-4a
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+87
+2e
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/output/program.lis	(revision 1178)
+++ /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/output/program.lis	(working copy)
@@ -8,34 +8,34 @@
 0005 c0570095 beq patch15_6 ,p_app_init 
 0006 c058007c beq patch16_0 ,p_app_evt_100ms_loop 
 0007 c06181a3 beq patch18_3 ,p_mouse_start_work 
-0008 c06202c6 beq patch18_4 ,p_mouse_start_reconnect_device 
+0008 c06202c4 beq patch18_4 ,p_mouse_start_reconnect_device 
 0009 c06380f4 beq patch18_7 ,p_mouse_app_enter_hibernate 
 000a c06480f8 beq patch19_1 ,p_mouse_setgpio_hibernate 
 000b c0650128 beq patch19_2 ,p_mouse_lpm_before_common 
 000c c0660060 beq patch19_4 ,p_mouse_adc_read_start 
-000d c067032c beq patch19_6 ,p_mouse_motion 
+000d c067032a beq patch19_6 ,p_mouse_motion 
 000e c0678269 beq patch19_7 ,p_mouse_dpi_process 
 000f c06801b3 beq patch1a_0 ,p_mouse_seting_dpi 
-0010 c06a8345 beq patch1a_5 ,p_mouse_buletooth_fast_conn_end 
+0010 c06a8343 beq patch1a_5 ,p_mouse_buletooth_fast_conn_end 
 0011 c06b0145 beq patch1a_6 ,p_mouse_priority_bb_event 
 0012 c06c81c0 beq patch1b_1 ,p_mouse_bb_event_timer 
-0013 c06d02af beq patch1b_2 ,p_mouse_start_discovery 
-0014 c06d82b8 beq patch1b_3 ,p_mouse_stop_discovery 
-0015 c06e02c2 beq patch1b_4 ,p_mouse_store_remote_bdaddr 
-0016 c06f8332 beq patch1b_7 ,p_mouse_ready_reconnection_by_button 
-0017 c070033e beq patch1c_0 ,p_mouse_polling_device 
-0018 c07402d7 beq patch1d_0 ,p_hid_rx_process 
+0013 c06d02ad beq patch1b_2 ,p_mouse_start_discovery 
+0014 c06d82b6 beq patch1b_3 ,p_mouse_stop_discovery 
+0015 c06e02c0 beq patch1b_4 ,p_mouse_store_remote_bdaddr 
+0016 c06f8330 beq patch1b_7 ,p_mouse_ready_reconnection_by_button 
+0017 c070033c beq patch1c_0 ,p_mouse_polling_device 
+0018 c07402d5 beq patch1d_0 ,p_hid_rx_process 
 0019 2020137c branch loop 
 
 pf_patch_ext:
 001a c0198040 beq patch26_3 ,p_adc_init_data 
 001b c01a0045 beq patch26_4 ,p_enable_adc 
-001c c04382d3 beq patch30_7 ,p_ui_timer_check 
-001d c05082eb beq patch34_1 ,p_le_slave_match 
-001e c06002f5 beq patch38_0 ,p_le_parse_l2cap 
+001c c04382d1 beq patch30_7 ,p_ui_timer_check 
+001d c05082e9 beq patch34_1 ,p_le_slave_match 
+001e c06002f3 beq patch38_0 ,p_le_parse_l2cap 
 001f c071019b beq patch3c_2 ,p_g24_pair_dispatch 
 0020 c07500be beq patch3d_2 ,p_g24_transmit_no_interrupt 
-0021 c0760329 beq patch3d_4 ,p_g24_lpm_wait 
+0021 c0760327 beq patch3d_4 ,p_g24_lpm_wait 
 0022 2020137c branch loop 
 
 p_soft_reset:
@@ -145,7 +145,7 @@
 0078 6fe0c8fa fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
 0079 207a0000 rtn blank 
 007a 7048fa00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
-007b 20200287 branch p_mouse_low_voltage_led_off 
+007b 20200285 branch p_mouse_low_voltage_led_off 
 
 p_app_evt_100ms_loop:
 007c 6fe0830d fetch 1 ,mem_app_evt_timer_count 
@@ -315,7 +315,7 @@
 00f8 204042e9 call mouse_set_sdio_high 
 00f9 20407fdc call clear_wake 
 00fa 20404015 call mouse_before_hibernate_wheel_gpio_set 
-00fb 20400287 call p_mouse_low_voltage_led_off 
+00fb 20400285 call p_mouse_low_voltage_led_off 
 00fc 6848c910 fetcht 1 ,mem_matrix_public_gpio 
 00fd 20406069 call gpio_out_active 
 00fe 6848c910 fetcht 1 ,mem_matrix_public_gpio 
@@ -584,8 +584,8 @@
 01cb 20400239 call p_mouse_multi_discover_led_enable_timer 
 01cc 2040407c call mouse_dpi_key_check_long_press 
 01cd 204044cc call mouse_bt_discovery_check 
-01ce 2040028b call p_mouse_commbination_key_process 
-01cf 204002a0 call p_mouse_24g_pair_key_check_timer 
+01ce 20400289 call p_mouse_commbination_key_process 
+01cf 2040029e call p_mouse_24g_pair_key_check_timer 
 01d0 204044ff call mouse_check_discovery_timeout_timer 
 01d1 20404504 call mouse_check_direct_timeout_timer 
 01d2 20404512 call mouse_le_enable_att_list_timer 
@@ -597,15 +597,15 @@
 01d8 20404535 call mouse_current_mult_update_timer 
 01d9 20404022 call mouse_wheel_trigger_timer 
 01da 20404547 call mouse_store_information_delay_timer 
-01db 202002a7 branch p_mouse_check_no_data_timeout_timer 
+01db 202002a5 branch p_mouse_check_no_data_timeout_timer 
 
 p_mouse_low_voltage_led_poweron_timer:
 01dc 6fe0cbfe fetch 1 ,mem_mouse_low_vlotage_poweron_timer_count 
 01dd 207a0000 rtn blank 
 01de 1fe0ffff increase -1 ,pdata 
 01df 67e0cbfe store 1 ,mem_mouse_low_vlotage_poweron_timer_count 
-01e0 203a0287 branch p_mouse_low_voltage_led_off ,blank 
-01e1 20200283 branch p_mouse_low_voltage_led_on 
+01e0 203a0285 branch p_mouse_low_voltage_led_off ,blank 
+01e1 20200281 branch p_mouse_low_voltage_led_on 
 
 p_mouse_multi_led_blink_timer:
 01e2 6fe0cbe3 fetch 1 ,mem_mouse_multi_led_blink_enable 
@@ -849,304 +849,302 @@
 0278 6fe0c8f8 fetch 1 ,mem_adc_low_volatage_led_timer_count 
 0279 1fe0fe01 increase 1 ,pdata 
 027a 67e0c8f8 store 1 ,mem_adc_low_volatage_led_timer_count 
-027b 1fe67c08 sub pdata ,8 ,null 
-027c 24410281 ncall p_mouse_adc_low_volatage_led_timer_count_clean ,positive 
-027d c0018283 beq 3 ,p_mouse_low_voltage_led_on 
-027e c0028287 beq 5 ,p_mouse_low_voltage_led_off 
-027f c0038283 beq 7 ,p_mouse_low_voltage_led_on 
-0280 20600000 rtn 
+027b 1fe67c0a sub pdata ,10 ,null 
+027c 2042827f call p_mouse_adc_low_volatage_led_timer_count_clean ,zero 
+027d c0028281 beq 5 ,p_mouse_low_voltage_led_on 
+027e 20600000 rtn 
 
 p_mouse_adc_low_volatage_led_timer_count_clean:
-0281 7048f801 jam 1 ,mem_adc_low_volatage_led_timer_count 
-0282 20200287 branch p_mouse_low_voltage_led_off 
+027f 7048f800 jam 0 ,mem_adc_low_volatage_led_timer_count 
+0280 20200285 branch p_mouse_low_voltage_led_off 
 
 p_mouse_low_voltage_led_on:
+0281 6848cbfb fetcht 1 ,mem_mouse_low_voltage_led_gpio 
+0282 20406069 call gpio_config_output 
 0283 6848cbfb fetcht 1 ,mem_mouse_low_voltage_led_gpio 
-0284 20406069 call gpio_config_output 
-0285 6848cbfb fetcht 1 ,mem_mouse_low_voltage_led_gpio 
-0286 20206069 branch gpio_out_active 
+0284 20206069 branch gpio_out_active 
 
 p_mouse_low_voltage_led_off:
+0285 6848cbfb fetcht 1 ,mem_mouse_low_voltage_led_gpio 
+0286 20406069 call gpio_config_output 
 0287 6848cbfb fetcht 1 ,mem_mouse_low_voltage_led_gpio 
-0288 20406069 call gpio_config_output 
-0289 6848cbfb fetcht 1 ,mem_mouse_low_voltage_led_gpio 
-028a 20206065 branch gpio_out_inactive 
+0288 20206065 branch gpio_out_inactive 
 
 p_mouse_commbination_key_process:
-028b 6fe0c938 fetch 1 ,mem_device_flag 
-028c c0000291 beq mode_24g_device ,p_mouse_24g_commbination_key_process 
-028d 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-028e c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
-028f 6848cbca fetcht 1 ,mem_mouse_commbination_key_bt 
-0290 20200294 branch p_mouse_commbination_key_start 
+0289 6fe0c938 fetch 1 ,mem_device_flag 
+028a c000028f beq mode_24g_device ,p_mouse_24g_commbination_key_process 
+028b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+028c c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+028d 6848cbca fetcht 1 ,mem_mouse_commbination_key_bt 
+028e 20200292 branch p_mouse_commbination_key_start 
 
 p_mouse_24g_commbination_key_process:
-0291 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0292 c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
-0293 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
+028f 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0290 c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
+0291 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
 
 p_mouse_commbination_key_start:
-0294 6048cb9d storet 1 ,mem_mouse_commbination_key 
-0295 20404115 call mouse_check_key_gpio 
-0296 1fe17e07 and pdata ,0x07 ,pdata 
-0297 6848cb9d fetcht 1 ,mem_mouse_commbination_key 
-0298 98467c00 isub temp ,null 
-0299 2022829b branch p_mouse_commbination_key_down ,zero 
-029a 202044eb branch mouse_commbination_key_up 
+0292 6048cb9d storet 1 ,mem_mouse_commbination_key 
+0293 20404115 call mouse_check_key_gpio 
+0294 1fe17e07 and pdata ,0x07 ,pdata 
+0295 6848cb9d fetcht 1 ,mem_mouse_commbination_key 
+0296 98467c00 isub temp ,null 
+0297 20228299 branch p_mouse_commbination_key_down ,zero 
+0298 202044eb branch mouse_commbination_key_up 
 
 p_mouse_commbination_key_down:
-029b 204044f6 call mouse_combination_ui_timer 
-029c 6fe0cb9f fetch 1 ,mem_commbination_key_statue 
-029d c1008000 rtneq commbination_key_state_down 
-029e 704b9f01 jam commbination_key_state_down ,mem_commbination_key_statue 
-029f 20600000 rtn 
+0299 204044f6 call mouse_combination_ui_timer 
+029a 6fe0cb9f fetch 1 ,mem_commbination_key_statue 
+029b c1008000 rtneq commbination_key_state_down 
+029c 704b9f01 jam commbination_key_state_down ,mem_commbination_key_statue 
+029d 20600000 rtn 
 
 p_mouse_24g_pair_key_check_timer:
-02a0 6fe0c938 fetch 1 ,mem_device_flag 
-02a1 c1800000 rtnne mode_24g_device 
+029e 6fe0c938 fetch 1 ,mem_device_flag 
+029f c1800000 rtnne mode_24g_device 
 
 p_mouse_24g_key_process:
-02a2 6fe0cb9e fetch 1 ,mem_select_device_button_statue 
-02a3 c00044eb beq pb_button_state_up ,mouse_commbination_key_up 
+02a0 6fe0cb9e fetch 1 ,mem_select_device_button_statue 
+02a1 c00044eb beq pb_button_state_up ,mouse_commbination_key_up 
 
 p_mouse_24g_key_down:
-02a4 da604ba0 arg mem_combination_ui_button_count ,regc 
-02a5 da40018a arg p_mouse_24g_start_pair_mode ,regb 
-02a6 2020318a branch timer_single_step 
+02a2 da604ba0 arg mem_combination_ui_button_count ,regc 
+02a3 da40018a arg p_mouse_24g_start_pair_mode ,regb 
+02a4 2020318a branch timer_single_step 
 
 p_mouse_check_no_data_timeout_timer:
-02a7 6fe0c92a fetch 1 ,mem_usb_addr 
-02a8 c3838000 rtnbit1 7 
-02a9 da604ab2 arg mem_mouse_no_data_timer ,regc 
-02aa da4002ac arg p_mouse_check_no_data_timeout ,regb 
-02ab 20203191 branch timer_single_step_2b 
+02a5 6fe0c92a fetch 1 ,mem_usb_addr 
+02a6 c3838000 rtnbit1 7 
+02a7 da604ab2 arg mem_mouse_no_data_timer ,regc 
+02a8 da4002aa arg p_mouse_check_no_data_timeout ,regb 
+02a9 20203191 branch timer_single_step_2b 
 
 p_mouse_check_no_data_timeout:
-02ac 6fe0c938 fetch 1 ,mem_device_flag 
-02ad c0000131 beq mode_24g_device ,p_mouse_24g_hibernate_set 
-02ae 2020431b branch mouse_disconnect 
+02aa 6fe0c938 fetch 1 ,mem_device_flag 
+02ab c0000131 beq mode_24g_device ,p_mouse_24g_hibernate_set 
+02ac 2020431b branch mouse_disconnect 
 
 p_mouse_start_discovery:
-02af 6fe1478c fetch 2 ,mem_ui_state_map 
-02b0 2feffe0b isolate1 ui_state_ble_adv ,pdata 
-02b1 2040c581 call mouse_stop_le_adv ,true 
-02b2 6fe1478c fetch 2 ,mem_ui_state_map 
-02b3 2feffe07 isolate1 ui_state_bt_reconnect ,pdata 
-02b4 2040c322 call mouse_cancel_reconnect ,true 
-02b5 704bf101 jam on ,mem_mouse_discovery_led_enable 
-02b6 704bff00 jam 0 ,mem_mouse3_0_reconnect_flag 
-02b7 20204554 branch mouse_start_discovery + 1 
+02ad 6fe1478c fetch 2 ,mem_ui_state_map 
+02ae 2feffe0b isolate1 ui_state_ble_adv ,pdata 
+02af 2040c581 call mouse_stop_le_adv ,true 
+02b0 6fe1478c fetch 2 ,mem_ui_state_map 
+02b1 2feffe07 isolate1 ui_state_bt_reconnect ,pdata 
+02b2 2040c322 call mouse_cancel_reconnect ,true 
+02b3 704bf101 jam on ,mem_mouse_discovery_led_enable 
+02b4 704bff00 jam 0 ,mem_mouse3_0_reconnect_flag 
+02b5 20204554 branch mouse_start_discovery + 1 
 
 p_mouse_stop_discovery:
-02b8 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
-02b9 204046f4 call mouse_disable_function_flag 
-02ba 704ac400 jam 0 ,mem_mouse_bluetooth_reconnect_timeout 
-02bb 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
-02bc 2feffe01 isolate1 mode_4_mouse ,pdata 
-02bd 2040c581 call mouse_stop_le_adv ,true 
-02be 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
-02bf 2feffe00 isolate1 mode_3_mouse ,pdata 
-02c0 2040c583 call mouse_stop_bt3_discovery ,true 
-02c1 2020021e branch p_mouse_discovey_led_blink_off 
+02b6 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+02b7 204046f4 call mouse_disable_function_flag 
+02b8 704ac400 jam 0 ,mem_mouse_bluetooth_reconnect_timeout 
+02b9 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+02ba 2feffe01 isolate1 mode_4_mouse ,pdata 
+02bb 2040c581 call mouse_stop_le_adv ,true 
+02bc 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+02bd 2feffe00 isolate1 mode_3_mouse ,pdata 
+02be 2040c583 call mouse_stop_bt3_discovery ,true 
+02bf 2020021e branch p_mouse_discovey_led_blink_off 
 
 p_mouse_store_remote_bdaddr:
-02c2 6fe0cbff fetch 1 ,mem_mouse3_0_reconnect_flag 
-02c3 243a02c5 nbranch p_mouse_store_remote_bdaddr_next ,blank 
-02c4 2040023f call p_mouse_mode_bt_device1_multi_led_on 
+02c0 6fe0cbff fetch 1 ,mem_mouse3_0_reconnect_flag 
+02c1 243a02c3 nbranch p_mouse_store_remote_bdaddr_next ,blank 
+02c2 2040023f call p_mouse_mode_bt_device1_multi_led_on 
 
 p_mouse_store_remote_bdaddr_next:
-02c5 20204587 branch mouse_store_remote_bdaddr + 1 
+02c3 20204587 branch mouse_store_remote_bdaddr + 1 
 
 p_mouse_start_reconnect_device:
-02c6 da204939 arg mem_device1_type ,rega 
-02c7 6fe0c938 fetch 1 ,mem_device_flag 
-02c8 1fe0ffff increase -1 ,pdata 
-02c9 1feffe1d mul32 pdata ,29 ,pdata 
-02ca 9a20a200 iadd rega ,rega 
-02cb efe08011 ifetch 1 ,rega 
-02cc 67e0c482 store 1 ,mem_xrecord_mode 
+02c4 da204939 arg mem_device1_type ,rega 
+02c5 6fe0c938 fetch 1 ,mem_device_flag 
+02c6 1fe0ffff increase -1 ,pdata 
+02c7 1feffe1d mul32 pdata ,29 ,pdata 
+02c8 9a20a200 iadd rega ,rega 
+02c9 efe08011 ifetch 1 ,rega 
+02ca 67e0c482 store 1 ,mem_xrecord_mode 
 
 p_mouse_start_reconnect:
-02cd 6fe0c482 fetch 1 ,mem_xrecord_mode 
-02ce c01982d1 beq rec_3_mode ,p_mouse3_0_check_reconn_target 
-02cf c01a3d7b beq rec_4_mode ,mouse4_0_check_reconn_target 
-02d0 20204553 branch mouse_start_discovery 
+02cb 6fe0c482 fetch 1 ,mem_xrecord_mode 
+02cc c01982cf beq rec_3_mode ,p_mouse3_0_check_reconn_target 
+02cd c01a3d7b beq rec_4_mode ,mouse4_0_check_reconn_target 
+02ce 20204553 branch mouse_start_discovery 
 
 p_mouse3_0_check_reconn_target:
-02d1 704bff01 jam 1 ,mem_mouse3_0_reconnect_flag 
-02d2 20203d6f branch mouse3_0_check_reconn_target 
+02cf 704bff01 jam 1 ,mem_mouse3_0_reconnect_flag 
+02d0 20203d6f branch mouse3_0_check_reconn_target 
 
 p_ui_timer_check:
-02d3 6fe0cbe2 fetch 1 ,mem_power_on_flag 
-02d4 245a7861 ncall ui_timer_init ,blank 
-02d5 704be200 jam 0 ,mem_power_on_flag 
-02d6 20207851 branch ui_timer_check + 1 
+02d1 6fe0cbe2 fetch 1 ,mem_power_on_flag 
+02d2 245a7861 ncall ui_timer_init ,blank 
+02d3 704be200 jam 0 ,mem_power_on_flag 
+02d4 20207851 branch ui_timer_check + 1 
 
 p_hid_rx_process:
-02d7 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
-02d8 1fe20c00 copy pdata ,contr 
-02d9 efe08006 ifetch 1 ,contr 
-02da 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
-02db 1fe1040f and pdata ,0x0f ,temp 
-02dc 1ff1fe00 rshift4 pdata ,pdata 
-02dd c00482df beq hid_type_set_idle ,p_hid_rx_process_handshake 
-02de 20204d93 branch hid_rx_process + 7 
+02d5 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+02d6 1fe20c00 copy pdata ,contr 
+02d7 efe08006 ifetch 1 ,contr 
+02d8 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
+02d9 1fe1040f and pdata ,0x0f ,temp 
+02da 1ff1fe00 rshift4 pdata ,pdata 
+02db c00482dd beq hid_type_set_idle ,p_hid_rx_process_handshake 
+02dc 20204d93 branch hid_rx_process + 7 
 
 p_hid_rx_process_handshake:
-02df da200001 arg 1 ,rega 
-02e0 20404dc0 call hid_malloc_tx_buff 
-02e1 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
-02e2 e7e10005 istore 2 ,contw 
-02e3 58000000 setarg 0 
-02e4 e7e08005 istore 1 ,contw 
-02e5 70095001 jam 1 ,mem_ui_data_txbuff_length 
-02e6 6fe0c4e2 fetch 1 ,mem_hid_control_state 
-02e7 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
-02e8 67e0c4e2 store 1 ,mem_hid_control_state 
-02e9 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
-02ea 20207871 branch ui_ipc_send_event 
+02dd da200001 arg 1 ,rega 
+02de 20404dc0 call hid_malloc_tx_buff 
+02df 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+02e0 e7e10005 istore 2 ,contw 
+02e1 58000000 setarg 0 
+02e2 e7e08005 istore 1 ,contw 
+02e3 70095001 jam 1 ,mem_ui_data_txbuff_length 
+02e4 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+02e5 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
+02e6 67e0c4e2 store 1 ,mem_hid_control_state 
+02e7 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
+02e8 20207871 branch ui_ipc_send_event 
 
 p_le_slave_match:
-02eb 6fe0c3dd fetch 1 ,mem_le_md_count 
-02ec 1fe0fe01 pincrease 1 
-02ed 67e0c3dd store 1 ,mem_le_md_count 
-02ee c006165a beq le_md_max_count ,le_slave_cont 
-02ef 2040191b call le_acknowledge 
-02f0 2040196a call le_prepare_tx 
-02f1 6fe082bd fetch 1 ,mem_le_tx_phy 
-02f2 2040168b call le_enable_phy_by_pdata 
-02f3 20401838 call le_transmit 
-02f4 20201655 branch le_slave_match + 10 
+02e9 6fe0c3dd fetch 1 ,mem_le_md_count 
+02ea 1fe0fe01 pincrease 1 
+02eb 67e0c3dd store 1 ,mem_le_md_count 
+02ec c006165a beq le_md_max_count ,le_slave_cont 
+02ed 2040191b call le_acknowledge 
+02ee 2040196a call le_prepare_tx 
+02ef 6fe082bd fetch 1 ,mem_le_tx_phy 
+02f0 2040168b call le_enable_phy_by_pdata 
+02f1 20401838 call le_transmit 
+02f2 20201655 branch le_slave_match + 10 
 
 p_le_parse_l2cap:
-02f5 efe10006 ifetch 2 ,contr 
-02f6 c00202f8 beq le_l2cap_cid_att ,p_le_parse_att 
-02f7 202019e4 branch le_parse_l2cap + 10 
+02f3 efe10006 ifetch 2 ,contr 
+02f4 c00202f6 beq le_l2cap_cid_att ,p_le_parse_att 
+02f5 202019e4 branch le_parse_l2cap + 10 
 
 p_le_parse_att:
-02f8 20407ceb call store_contr 
-02f9 20400310 call p_mouse_le_reconn_write_enable_timer_reinit 
-02fa 20407ce5 call get_contr 
-02fb efe18006 ifetch 3 ,contr 
-02fc 67e1c436 store 3 ,mem_le_att_opcode 
-02fd c0050300 beq attop_read_request ,p_le_parse_att_read_request 
-02fe c0090319 beq attop_write_request ,p_le_parse_att_write_request 
-02ff 20201cd3 branch le_parse_att + 2 
+02f6 20407ceb call store_contr 
+02f7 2040030e call p_mouse_le_reconn_write_enable_timer_reinit 
+02f8 20407ce5 call get_contr 
+02f9 efe18006 ifetch 3 ,contr 
+02fa 67e1c436 store 3 ,mem_le_att_opcode 
+02fb c00502fe beq attop_read_request ,p_le_parse_att_read_request 
+02fc c0090317 beq attop_write_request ,p_le_parse_att_write_request 
+02fd 20201cd3 branch le_parse_att + 2 
 
 p_le_parse_att_read_request:
-0300 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0301 c31d9de7 bbit0 mouse_enable_le_battery_service_cancel ,le_parse_att_read_request 
-0302 20401e8d call le_check_encrypt_state 
-0303 68494437 fetcht 2 ,mem_le_att_handle 
-0304 6fe0c3c0 fetch 1 ,mem_le_configuration 
-0305 c281830a bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
+02fe 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+02ff c31d9de7 bbit0 mouse_enable_le_battery_service_cancel ,le_parse_att_read_request 
+0300 20401e8d call le_check_encrypt_state 
+0301 68494437 fetcht 2 ,mem_le_att_handle 
+0302 6fe0c3c0 fetch 1 ,mem_le_configuration 
+0303 c2818308 bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
 
 p_le_send_att_read_response:
-0306 6fe14437 fetch 2 ,mem_le_att_handle 
-0307 c0181ec8 beq 0x30 ,le_send_att_error_response_notfound 
-0308 68494437 fetcht 2 ,mem_le_att_handle 
-0309 20201deb branch le_send_att_read_response 
+0304 6fe14437 fetch 2 ,mem_le_att_handle 
+0305 c0181ec8 beq 0x30 ,le_send_att_error_response_notfound 
+0306 68494437 fetcht 2 ,mem_le_att_handle 
+0307 20201deb branch le_send_att_read_response 
 
 p_le_send_att_read_response_check_auth:
-030a 6fe143d1 fetch 2 ,mem_le_pairing_handle 
-030b 98467c00 isub temp ,null 
-030c 24228306 nbranch p_le_send_att_read_response ,zero 
-030d 20401e8d call le_check_encrypt_state 
-030e 24340306 nbranch p_le_send_att_read_response ,user 
-030f 20201e10 branch le_send_att_read_response_error_insufficient_auth 
+0308 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+0309 98467c00 isub temp ,null 
+030a 24228304 nbranch p_le_send_att_read_response ,zero 
+030b 20401e8d call le_check_encrypt_state 
+030c 24340304 nbranch p_le_send_att_read_response ,user 
+030d 20201e10 branch le_send_att_read_response_error_insufficient_auth 
 
 p_mouse_le_reconn_write_enable_timer_reinit:
-0310 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0311 c41d8000 rtnbit0 mouse_enable_le_battery_service_cancel 
-0312 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
-0313 207a0000 rtn blank 
-0314 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
-0315 1fe17e03 and pdata ,0x03 ,pdata 
-0316 c1018000 rtneq 0x03 
-0317 704b7602 jam 2 ,mem_le_start_encrypt_timer 
-0318 20600000 rtn 
+030e 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+030f c41d8000 rtnbit0 mouse_enable_le_battery_service_cancel 
+0310 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+0311 207a0000 rtn blank 
+0312 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+0313 1fe17e03 and pdata ,0x03 ,pdata 
+0314 c1018000 rtneq 0x03 
+0315 704b7602 jam 2 ,mem_le_start_encrypt_timer 
+0316 20600000 rtn 
 
 p_le_parse_att_write_request:
-0319 18c22200 copy contr ,rega 
-031a 6fe143d4 fetch 2 ,mem_le_l2cap_size 
-031b 1fe0a5fd add pdata ,-3 ,regb 
-031c 20401a25 call le_writeatt_cb 
-031d 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
-031e c07f9e73 beq 0xff ,le_send_att_write_response_check_auth 
-031f 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
-0320 203a1e73 branch le_send_att_write_response_check_auth ,blank 
-0321 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
-0322 c2809e73 bbit1 ll_start_enc_flag ,le_send_att_write_response_check_auth 
-0323 5800001a setarg 0x001a 
-0324 68494437 fetcht 2 ,mem_le_att_handle 
-0325 98467c00 isub temp ,null 
-0326 24229e73 nbranch le_send_att_write_response_check_auth ,zero 
-0327 7002d805 jam att_err_insufficient_authentication ,mem_le_err_code 
-0328 20201ec9 branch le_send_att_error_response 
+0317 18c22200 copy contr ,rega 
+0318 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+0319 1fe0a5fd add pdata ,-3 ,regb 
+031a 20401a25 call le_writeatt_cb 
+031b 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+031c c07f9e73 beq 0xff ,le_send_att_write_response_check_auth 
+031d 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+031e 203a1e73 branch le_send_att_write_response_check_auth ,blank 
+031f 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+0320 c2809e73 bbit1 ll_start_enc_flag ,le_send_att_write_response_check_auth 
+0321 5800001a setarg 0x001a 
+0322 68494437 fetcht 2 ,mem_le_att_handle 
+0323 98467c00 isub temp ,null 
+0324 24229e73 nbranch le_send_att_write_response_check_auth ,zero 
+0325 7002d805 jam att_err_insufficient_authentication ,mem_le_err_code 
+0326 20201ec9 branch le_send_att_error_response 
 
 p_g24_lpm_wait:
-0329 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
-032a 245a26e1 ncall g24_transmit_by_interrupt_enable ,blank 
-032b 202026bc branch g24_lpm_wait + 1 
+0327 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
+0328 245a26e1 ncall g24_transmit_by_interrupt_enable ,blank 
+0329 202026bc branch g24_lpm_wait + 1 
 
 p_mouse_motion:
-032c 78547c00 disable user 
-032d 58000000 setarg 0 
-032e 67e348d1 store 6 ,mem_mouse_x 
-032f 20404240 call mouse_check_sensor_data 
-0330 2040408e call mouse_dpi_config 
-0331 20203f75 branch mouse_motion + 5 
+032a 78547c00 disable user 
+032b 58000000 setarg 0 
+032c 67e348d1 store 6 ,mem_mouse_x 
+032d 20404240 call mouse_check_sensor_data 
+032e 2040408e call mouse_dpi_config 
+032f 20203f75 branch mouse_motion + 5 
 
 p_mouse_ready_reconnection_by_button:
-0332 6fe0cbb4 fetch 1 ,mem_device_number 
-0333 c1008000 rtneq 1 
-0334 20400337 call p_mouse_select_device_number 
-0335 6048c938 storet 1 ,mem_device_flag 
-0336 202046ba branch mouse_store_device_number_before_reset 
+0330 6fe0cbb4 fetch 1 ,mem_device_number 
+0331 c1008000 rtneq 1 
+0332 20400335 call p_mouse_select_device_number 
+0333 6048c938 storet 1 ,mem_device_flag 
+0334 202046ba branch mouse_store_device_number_before_reset 
 
 p_mouse_select_device_number:
-0337 6848c938 fetcht 1 ,mem_device_flag 
-0338 18408401 increase 1 ,temp 
-0339 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-033a c288c6c9 bbit1 mouse_enable_24g ,mouse_select_device_number_24g 
-033b 18467c03 sub temp ,3 ,null 
-033c 244146d0 ncall mouse_select_device_count_clean_bt ,positive 
-033d 20600000 rtn 
+0335 6848c938 fetcht 1 ,mem_device_flag 
+0336 18408401 increase 1 ,temp 
+0337 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0338 c288c6c9 bbit1 mouse_enable_24g ,mouse_select_device_number_24g 
+0339 18467c03 sub temp ,3 ,null 
+033a 244146d0 ncall mouse_select_device_count_clean_bt ,positive 
+033b 20600000 rtn 
 
 p_mouse_polling_device:
-033e 6fe0cab0 fetch 1 ,mem_reconn_times 
-033f 1fe0ffff increase -1 ,pdata 
-0340 67e0cab0 store 1 ,mem_reconn_times 
-0341 6848c938 fetcht 1 ,mem_device_flag 
-0342 18467c01 sub temp ,1 ,null 
-0343 24428337 ncall p_mouse_select_device_number ,zero 
-0344 20204715 branch mouse_polling_device_next 
+033c 6fe0cab0 fetch 1 ,mem_reconn_times 
+033d 1fe0ffff increase -1 ,pdata 
+033e 67e0cab0 store 1 ,mem_reconn_times 
+033f 6848c938 fetcht 1 ,mem_device_flag 
+0340 18467c01 sub temp ,1 ,null 
+0341 24428335 ncall p_mouse_select_device_number ,zero 
+0342 20204715 branch mouse_polling_device_next 
 
 p_mouse_buletooth_fast_conn_end:
-0345 204045bd call mouse_select_reconn_device 
-0346 20404314 call mouse_bluetooth_fast_conn_disable 
-0347 6fe0c938 fetch 1 ,mem_device_flag 
-0348 c000834c beq mode_bt_device1 ,p_mouse_device1_check_auto_discover 
-0349 c001034e beq mode_bt_device2 ,p_mouse_device2_check_auto_discover 
-034a c0018350 beq mode_bt_device3 ,p_mouse_device3_check_auto_discover 
-034b 20600000 rtn 
+0343 204045bd call mouse_select_reconn_device 
+0344 20404314 call mouse_bluetooth_fast_conn_disable 
+0345 6fe0c938 fetch 1 ,mem_device_flag 
+0346 c000834a beq mode_bt_device1 ,p_mouse_device1_check_auto_discover 
+0347 c001034c beq mode_bt_device2 ,p_mouse_device2_check_auto_discover 
+0348 c001834e beq mode_bt_device3 ,p_mouse_device3_check_auto_discover 
+0349 20600000 rtn 
 
 p_mouse_device1_check_auto_discover:
-034c 6fe3493a fetch 6 ,mem_device1_addr 
-034d 20200351 branch p_mouse_device_check_auto_discover 
+034a 6fe3493a fetch 6 ,mem_device1_addr 
+034b 2020034f branch p_mouse_device_check_auto_discover 
 
 p_mouse_device2_check_auto_discover:
-034e 6fe34957 fetch 6 ,mem_device2_addr 
-034f 20200351 branch p_mouse_device_check_auto_discover 
+034c 6fe34957 fetch 6 ,mem_device2_addr 
+034d 2020034f branch p_mouse_device_check_auto_discover 
 
 p_mouse_device3_check_auto_discover:
-0350 6fe34974 fetch 6 ,mem_device3_addr 
+034e 6fe34974 fetch 6 ,mem_device3_addr 
 
 p_mouse_device_check_auto_discover:
-0351 684b4bf2 fetcht 6 ,mem_mouse_compare_addr_ff_new 
-0352 98467c00 isub temp ,null 
-0353 2022c553 branch mouse_start_discovery ,zero 
-0354 20203d59 branch mouse_start_reconnect_device 
+034f 684b4bf2 fetcht 6 ,mem_mouse_compare_addr_ff_new 
+0350 98467c00 isub temp ,null 
+0351 2022c553 branch mouse_start_discovery ,zero 
+0352 20203d59 branch mouse_start_reconnect_device 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/program/patch.prog	(revision 1178)
+++ /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/program/patch.prog	(working copy)
@@ -919,14 +919,12 @@
 	fetch 1,mem_adc_low_volatage_led_timer_count
 	increase 1,pdata
 	store 1,mem_adc_low_volatage_led_timer_count
-	sub pdata,8,null
-	ncall p_mouse_adc_low_volatage_led_timer_count_clean,positive
-	beq 3,p_mouse_low_voltage_led_on
-	beq 5,p_mouse_low_voltage_led_off
-	beq 7,p_mouse_low_voltage_led_on
+	sub pdata,10,null
+	call p_mouse_adc_low_volatage_led_timer_count_clean,zero
+	beq 5,p_mouse_low_voltage_led_on
 	rtn
 p_mouse_adc_low_volatage_led_timer_count_clean:
-	jam 1,mem_adc_low_volatage_led_timer_count
+	jam 0,mem_adc_low_volatage_led_timer_count
 	branch p_mouse_low_voltage_led_off
 
 p_mouse_low_voltage_led_on:
Index: sched/mouse.dat
===================================================================
--- /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/sched/mouse.dat	(revision 1178)
+++ /YC1308AC/branch/mouse_project/XZR/PBSwitch_3mode_3ch_YCJ-9801/sched/mouse.dat	(working copy)
@@ -195,14 +195,14 @@
 mem_mouse_commbination_key_bt:07
 mem_mouse_commbination_key_24g:06
 
-mem_store_information_delay_timer_init:02
+mem_store_information_delay_timer_init:01
 
 #adc start
 mem_adc_config_flag_init:00 		#00-vinlpm   01-hvin   02-gpio
 mem_adc_channel:05 		#00-gpio4   01-gpio5   02-gpio6  03-gpio7    04-gpio9  05-gpio10  06-gpio11  07-gpio12
-mem_mouse_vdd_full_vol:18 01		#2.8V
-04 01#mem_mouse_vdd_empty_vol  :2.6V
-0e 01#mem_mouse_vdd_low_vol   :2.7V
+mem_mouse_vdd_full_vol:4a 01		#3.3V
+2c 01#mem_mouse_vdd_empty_vol  :3.0V
+36 01#mem_mouse_vdd_low_vol   :3.1V
 #mem_mouse_vdd_full_vol:3c 01		#3.3V
 #1e 01#mem_mouse_vdd_empty_vol  :3.0V
 #30 01#mem_mouse_vdd_low_vol   :3.2V
