Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/eeprom.dat	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/eeprom.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-fa
-19
+0e
+1a
 c2
 84
 00
@@ -115,7 +115,7 @@
 c0
 6d
 85
-e9
+ee
 c0
 4f
 83
@@ -123,7 +123,7 @@
 c0
 74
 06
-6a
+6f
 20
 20
 13
@@ -179,7 +179,7 @@
 c0
 0d
 06
-5c
+61
 c0
 50
 83
@@ -191,7 +191,7 @@
 c0
 60
 06
-36
+3b
 20
 20
 13
@@ -283,7 +283,7 @@
 20
 40
 05
-ec
+f1
 20
 40
 3d
@@ -515,27 +515,27 @@
 c0
 19
 06
-20
+25
 c0
 0a
 86
-1a
+1f
 c0
 0a
 06
-17
+1c
 c0
 22
 06
-27
+2c
 c0
 20
 06
-31
+36
 c0
 00
 86
-66
+6b
 20
 20
 43
@@ -6024,10 +6024,30 @@
 40
 46
 e4
+6f
+e0
+cb
+b3
+2f
+ef
+fe
+01
 20
 40
-05
-e3
+c3
+df
+6f
+e0
+cb
+b3
+2f
+ef
+fe
+00
+20
+40
+f8
+c4
 20
 20
 05
@@ -6039,11 +6059,11 @@
 c0
 00
 85
-e7
+ec
 c0
 01
 05
-e8
+ed
 20
 60
 00
@@ -6090,8 +6110,8 @@
 0b
 24
 21
-05
-fe
+06
+03
 d8
 c0
 4c
@@ -6143,7 +6163,7 @@
 20
 40
 06
-14
+19
 6f
 e0
 cc
@@ -6283,7 +6303,7 @@
 c0
 00
 86
-24
+29
 70
 4b
 76
@@ -6371,7 +6391,7 @@
 c0
 02
 06
-39
+3e
 20
 20
 19
@@ -6387,11 +6407,11 @@
 c0
 05
 06
-3e
+43
 c0
 09
 06
-4d
+52
 20
 20
 1c
@@ -6419,7 +6439,7 @@
 c2
 81
 86
-48
+4d
 6f
 e1
 44
@@ -6447,11 +6467,11 @@
 24
 22
 86
-44
+49
 24
 34
 06
-44
+49
 20
 20
 1e
@@ -6539,7 +6559,7 @@
 c0
 03
 86
-63
+68
 20
 20
 57
@@ -6599,7 +6619,7 @@
 c0
 04
 86
-72
+77
 20
 20
 4d
@@ -6652,8 +6672,8 @@
 20
 78
 71
-df
-e9
+12
+7c
 aa
 55
 40
@@ -6902,7 +6922,7 @@
 ff
 07
 06
-88
+0a
 ff
 ff
 aa
@@ -6918,7 +6938,7 @@
 00
 24
 49
-03
+00
 00
 00
 aa
@@ -6972,7 +6992,7 @@
 48
 4c
 08
-0a
+8a
 8a
 aa
 55
@@ -7108,7 +7128,7 @@
 00
 fd
 48
-02
+00
 aa
 55
 01
@@ -7122,12 +7142,12 @@
 00
 e3
 48
-0f
+28
 01
-a2
-00
-b4
+f9
 00
+21
+01
 aa
 55
 0a
@@ -7898,30 +7918,10 @@
 aa
 aa
 55
-83
+5e
 73
-1a
-f9
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+99
+44
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-0e
-fe
+16
+4f
Index: output/flash.dat
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/flash.dat	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/flash.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-fa
-19
+0e
+1a
 c2
 84
 00
@@ -115,7 +115,7 @@
 c0
 6d
 85
-e9
+ee
 c0
 4f
 83
@@ -123,7 +123,7 @@
 c0
 74
 06
-6a
+6f
 20
 20
 13
@@ -179,7 +179,7 @@
 c0
 0d
 06
-5c
+61
 c0
 50
 83
@@ -191,7 +191,7 @@
 c0
 60
 06
-36
+3b
 20
 20
 13
@@ -283,7 +283,7 @@
 20
 40
 05
-ec
+f1
 20
 40
 3d
@@ -515,27 +515,27 @@
 c0
 19
 06
-20
+25
 c0
 0a
 86
-1a
+1f
 c0
 0a
 06
-17
+1c
 c0
 22
 06
-27
+2c
 c0
 20
 06
-31
+36
 c0
 00
 86
-66
+6b
 20
 20
 43
@@ -6024,10 +6024,30 @@
 40
 46
 e4
+6f
+e0
+cb
+b3
+2f
+ef
+fe
+01
 20
 40
-05
-e3
+c3
+df
+6f
+e0
+cb
+b3
+2f
+ef
+fe
+00
+20
+40
+f8
+c4
 20
 20
 05
@@ -6039,11 +6059,11 @@
 c0
 00
 85
-e7
+ec
 c0
 01
 05
-e8
+ed
 20
 60
 00
@@ -6090,8 +6110,8 @@
 0b
 24
 21
-05
-fe
+06
+03
 d8
 c0
 4c
@@ -6143,7 +6163,7 @@
 20
 40
 06
-14
+19
 6f
 e0
 cc
@@ -6283,7 +6303,7 @@
 c0
 00
 86
-24
+29
 70
 4b
 76
@@ -6371,7 +6391,7 @@
 c0
 02
 06
-39
+3e
 20
 20
 19
@@ -6387,11 +6407,11 @@
 c0
 05
 06
-3e
+43
 c0
 09
 06
-4d
+52
 20
 20
 1c
@@ -6419,7 +6439,7 @@
 c2
 81
 86
-48
+4d
 6f
 e1
 44
@@ -6447,11 +6467,11 @@
 24
 22
 86
-44
+49
 24
 34
 06
-44
+49
 20
 20
 1e
@@ -6539,7 +6559,7 @@
 c0
 03
 86
-63
+68
 20
 20
 57
@@ -6599,7 +6619,7 @@
 c0
 04
 86
-72
+77
 20
 20
 4d
@@ -6652,8 +6672,8 @@
 20
 78
 71
-df
-e9
+12
+7c
 aa
 55
 40
@@ -6902,7 +6922,7 @@
 ff
 07
 06
-88
+0a
 ff
 ff
 aa
@@ -6918,7 +6938,7 @@
 00
 24
 49
-03
+00
 00
 00
 aa
@@ -6972,7 +6992,7 @@
 48
 4c
 08
-0a
+8a
 8a
 aa
 55
@@ -7108,7 +7128,7 @@
 00
 fd
 48
-02
+00
 aa
 55
 01
@@ -7122,12 +7142,12 @@
 00
 e3
 48
-0f
+28
 01
-a2
-00
-b4
+f9
 00
+21
+01
 aa
 55
 0a
@@ -7898,30 +7918,10 @@
 aa
 aa
 55
-83
+5e
 73
-1a
-f9
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+99
+44
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-0e
-fe
+16
+4f
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/program.lis	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/program.lis	(working copy)
@@ -27,9 +27,9 @@
 0018 c070835a beq patch1c_1 ,p_mouse_led_off 
 0019 c0710356 beq patch1c_2 ,p_mouse_led_on 
 001a c06d05be beq patch1b_2 ,p_mouse_start_discovery 
-001b c06d85e9 beq patch1b_3 ,p_mouse_stop_discovery 
+001b c06d85ee beq patch1b_3 ,p_mouse_stop_discovery 
 001c c04f83cf beq patch13_7 ,p_init_param 
-001d c074066a beq patch1d_0 ,p_hid_rx_process 
+001d c074066f beq patch1d_0 ,p_hid_rx_process 
 001e 2020137c branch loop 
 
 pf_patch_ext:
@@ -45,10 +45,10 @@
 0028 c074853c beq patch3d_1 ,p_g24_reconn_dispatch 
 0029 c0750453 beq patch3d_2 ,p_g24_transmit_no_interrupt 
 002a c07604bf beq patch3d_4 ,p_g24_lpm_wait 
-002b c00d065c beq patch23_2 ,p_send_lmp 
+002b c00d0661 beq patch23_2 ,p_send_lmp 
 002c c05083d1 beq patch34_1 ,p_le_slave_match 
 002d c05183db beq patch34_3 ,p_le_slave_unsync 
-002e c0600636 beq patch38_0 ,p_le_parse_l2cap 
+002e c060063b beq patch38_0 ,p_le_parse_l2cap 
 002f 2020137c branch loop 
 
 p_lpm_dispatch:
@@ -77,7 +77,7 @@
 0042 204022ff call g24_chmap_param_init 
 0043 20400511 call p_send_time_long_wake 
 0044 20403f1e call mouse_gpio_init 
-0045 204005ec call p_mouse_le_name_load 
+0045 204005f1 call p_mouse_le_name_load 
 0046 20403d13 call mouse_param_init 
 0047 204002c2 call p_mouse_g24_report_setting 
 0048 20400162 call p_mouse_logo_led_off 
@@ -153,12 +153,12 @@
 007c c01e0575 beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
 007d c01c856e beq bt_evt_24g_pairing_complete ,p_mouse_24g_pairing_complete 
 007e c01d0586 beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
-007f c0190620 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
-0080 c00a861a beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
-0081 c00a0617 beq bt_evt_le_connected ,p_mouse_le_bb_event_connected 
-0082 c0220627 beq bt_evt_le_parse_conn_param_accepted ,p_mouse_le_parse_conn_param_accepted 
-0083 c0200631 beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
-0084 c0008666 beq bt_evt_bb_connected ,p_mouse_bb_event_connected 
+007f c0190625 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+0080 c00a861f beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
+0081 c00a061c beq bt_evt_le_connected ,p_mouse_le_bb_event_connected 
+0082 c022062c beq bt_evt_le_parse_conn_param_accepted ,p_mouse_le_parse_conn_param_accepted 
+0083 c0200636 beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
+0084 c000866b beq bt_evt_bb_connected ,p_mouse_bb_event_connected 
 0085 20204336 branch mouse_priority_bb_event + 2 
 
 p_mouse_start_work:
@@ -1999,213 +1999,218 @@
 05de d8e00002 arg mouse_store_eeprom_flag ,queue 
 05df 204046f0 call mouse_enable_function_flag 
 05e0 204046e4 call mouse_bt_discovery_button_down_disable 
-05e1 204005e3 call p_mouse_select_bt_adv_mode 
-05e2 2020056b branch p_mouse_device_discover_led_config 
+05e1 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+05e2 2feffe01 isolate1 mode_4_mouse ,pdata 
+05e3 2040c3df call mouse_check_51cmd_adv ,true 
+05e4 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+05e5 2feffe00 isolate1 mode_3_mouse ,pdata 
+05e6 2040f8c4 call check_51cmd_start_discovery ,true 
+05e7 2020056b branch p_mouse_device_discover_led_config 
 
 p_mouse_select_bt_adv_mode:
-05e3 6fe0c938 fetch 1 ,mem_device_flag 
-05e4 c00085e7 beq mode_bt_device1 ,p_mouse_current_classic_mode 
-05e5 c00105e8 beq mode_bt_device2 ,p_mouse_current_ble_mode 
-05e6 20600000 rtn 
+05e8 6fe0c938 fetch 1 ,mem_device_flag 
+05e9 c00085ec beq mode_bt_device1 ,p_mouse_current_classic_mode 
+05ea c00105ed beq mode_bt_device2 ,p_mouse_current_ble_mode 
+05eb 20600000 rtn 
 
 p_mouse_current_classic_mode:
-05e7 202078c4 branch check_51cmd_start_discovery 
+05ec 202078c4 branch check_51cmd_start_discovery 
 
 p_mouse_current_ble_mode:
-05e8 202043df branch mouse_check_51cmd_adv 
+05ed 202043df branch mouse_check_51cmd_adv 
 
 p_mouse_stop_discovery:
-05e9 58000000 setarg 0 
-05ea 67e14ac2 store 2 ,mem_mouse_discovery_timer 
-05eb 20204577 branch mouse_stop_discovery + 1 
+05ee 58000000 setarg 0 
+05ef 67e14ac2 store 2 ,mem_mouse_discovery_timer 
+05f0 20204577 branch mouse_stop_discovery + 1 
 
 p_mouse_le_name_load:
-05ec 6fe44c1f fetch 8 ,mem_le_name_patch 
-05ed 207a0000 rtn blank 
-05ee 6fe0cc1e fetch 1 ,mem_le_name_patch_len 
-05ef 1fe22200 copy pdata ,rega 
-05f0 1fe67c0b sub pdata ,11 ,null 
-05f1 242105fe nbranch p_mouse_le_name_patch_len_overflow ,positive 
-05f2 d8c04c1f arg mem_le_name_patch ,contr 
-05f3 d8a04adb arg mem_le_adv_swift_pair + 9 ,contw 
-05f4 1a227200 copy rega ,loopcnt 
-05f5 20407d5f call memcpy 
-05f6 d8c04c1f arg mem_le_name_patch ,contr 
-05f7 d8a0440a arg mem_le_scan_data + 2 ,contw 
-05f8 1a227200 copy rega ,loopcnt 
-05f9 20407d5f call memcpy 
-05fa d8c04c1f arg mem_le_name_patch ,contr 
-05fb d8a042f8 arg mem_le_name ,contw 
-05fc 1a227200 copy rega ,loopcnt 
-05fd 20207d5f branch memcpy 
+05f1 6fe44c1f fetch 8 ,mem_le_name_patch 
+05f2 207a0000 rtn blank 
+05f3 6fe0cc1e fetch 1 ,mem_le_name_patch_len 
+05f4 1fe22200 copy pdata ,rega 
+05f5 1fe67c0b sub pdata ,11 ,null 
+05f6 24210603 nbranch p_mouse_le_name_patch_len_overflow ,positive 
+05f7 d8c04c1f arg mem_le_name_patch ,contr 
+05f8 d8a04adb arg mem_le_adv_swift_pair + 9 ,contw 
+05f9 1a227200 copy rega ,loopcnt 
+05fa 20407d5f call memcpy 
+05fb d8c04c1f arg mem_le_name_patch ,contr 
+05fc d8a0440a arg mem_le_scan_data + 2 ,contw 
+05fd 1a227200 copy rega ,loopcnt 
+05fe 20407d5f call memcpy 
+05ff d8c04c1f arg mem_le_name_patch ,contr 
+0600 d8a042f8 arg mem_le_name ,contw 
+0601 1a227200 copy rega ,loopcnt 
+0602 20207d5f branch memcpy 
 
 p_mouse_le_name_patch_len_overflow:
-05fe 20400614 call p_mouse_le_swift_pair_disable 
-05ff 6fe0cc1e fetch 1 ,mem_le_name_patch_len 
-0600 1fe0fe01 increase 1 ,pdata 
-0601 67e0cad2 store 1 ,mem_le_adv_swift_pair 
-0602 704ad309 jam 9 ,mem_le_adv_swift_pair + 1 
-0603 d8c04c1f arg mem_le_name_patch ,contr 
-0604 d8a04ad4 arg mem_le_adv_swift_pair + 2 ,contw 
-0605 1a227200 copy rega ,loopcnt 
-0606 20407d5f call memcpy 
-0607 6fe0cc1e fetch 1 ,mem_le_name_patch_len 
-0608 1fe0fe01 increase 1 ,pdata 
-0609 67e0c408 store 1 ,mem_le_scan_data 
-060a 70440909 jam 9 ,mem_le_scan_data + 1 
-060b d8c04c1f arg mem_le_name_patch ,contr 
-060c d8a0440a arg mem_le_scan_data + 2 ,contw 
-060d 1a227200 copy rega ,loopcnt 
-060e 20407d5f call memcpy 
-060f d8c04c1e arg mem_le_name_patch_len ,contr 
-0610 d8a042f7 arg mem_le_name_len ,contw 
-0611 1a227200 copy rega ,loopcnt 
-0612 1f20f201 increase 1 ,loopcnt 
-0613 20207d5f branch memcpy 
+0603 20400619 call p_mouse_le_swift_pair_disable 
+0604 6fe0cc1e fetch 1 ,mem_le_name_patch_len 
+0605 1fe0fe01 increase 1 ,pdata 
+0606 67e0cad2 store 1 ,mem_le_adv_swift_pair 
+0607 704ad309 jam 9 ,mem_le_adv_swift_pair + 1 
+0608 d8c04c1f arg mem_le_name_patch ,contr 
+0609 d8a04ad4 arg mem_le_adv_swift_pair + 2 ,contw 
+060a 1a227200 copy rega ,loopcnt 
+060b 20407d5f call memcpy 
+060c 6fe0cc1e fetch 1 ,mem_le_name_patch_len 
+060d 1fe0fe01 increase 1 ,pdata 
+060e 67e0c408 store 1 ,mem_le_scan_data 
+060f 70440909 jam 9 ,mem_le_scan_data + 1 
+0610 d8c04c1f arg mem_le_name_patch ,contr 
+0611 d8a0440a arg mem_le_scan_data + 2 ,contw 
+0612 1a227200 copy rega ,loopcnt 
+0613 20407d5f call memcpy 
+0614 d8c04c1e arg mem_le_name_patch_len ,contr 
+0615 d8a042f7 arg mem_le_name_len ,contw 
+0616 1a227200 copy rega ,loopcnt 
+0617 1f20f201 increase 1 ,loopcnt 
+0618 20207d5f branch memcpy 
 
 p_mouse_le_swift_pair_disable:
-0614 d8a04ad2 arg mem_le_adv_swift_pair ,contw 
-0615 df200014 arg 20 ,loopcnt 
-0616 20207d26 branch clear_mem 
+0619 d8a04ad2 arg mem_le_adv_swift_pair ,contw 
+061a df200014 arg 20 ,loopcnt 
+061b 20207d26 branch clear_mem 
 
 p_mouse_le_bb_event_connected:
-0617 6fe0cc40 fetch 1 ,mem_mouse_1io2led_led_enable 
-0618 245a0120 ncall p_mouse_multi_led_on_enable ,blank 
-0619 20204350 branch mouse_le_bb_event_connected 
+061c 6fe0cc40 fetch 1 ,mem_mouse_1io2led_led_enable 
+061d 245a0120 ncall p_mouse_multi_led_on_enable ,blank 
+061e 20204350 branch mouse_le_bb_event_connected 
 
 p_mouse_le_bb_disconnected:
-061a 58000000 setarg 0 
-061b 67e14af2 store 2 ,mem_le_battery_level_updata_timer 
-061c 67e0cca7 store 1 ,mem_mouse_le_send_conn_param_update 
-061d 67e0cca8 store 1 ,mem_mouse_le_send_conn_param_update_timer 
-061e 67e0cac6 store 1 ,mem_mouse_le_bb_connected_flag 
-061f 20204366 branch mouse_le_bb_disconnected + 7 
+061f 58000000 setarg 0 
+0620 67e14af2 store 2 ,mem_le_battery_level_updata_timer 
+0621 67e0cca7 store 1 ,mem_mouse_le_send_conn_param_update 
+0622 67e0cca8 store 1 ,mem_mouse_le_send_conn_param_update_timer 
+0623 67e0cac6 store 1 ,mem_mouse_le_bb_connected_flag 
+0624 20204366 branch mouse_le_bb_disconnected + 7 
 
 p_mouse_le_ll_start_encryt:
-0620 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
-0621 c0008624 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
-0622 704b7614 jam 20 ,mem_le_start_encrypt_timer 
-0623 20204373 branch mouse_le_ll_enable_start_enc_flag 
+0625 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+0626 c0008629 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+0627 704b7614 jam 20 ,mem_le_start_encrypt_timer 
+0628 20204373 branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_ll_reconn_start_encryt:
-0624 2040436c call mouse_updata_le_param 
-0625 704b760a jam 10 ,mem_le_start_encrypt_timer 
-0626 20204373 branch mouse_le_ll_enable_start_enc_flag 
+0629 2040436c call mouse_updata_le_param 
+062a 704b760a jam 10 ,mem_le_start_encrypt_timer 
+062b 20204373 branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_parse_conn_param_accepted:
-0627 6fe082c1 fetch 1 ,mem_le_new_conninterval 
-0628 1fe67c0c sub pdata ,le_interval_15ms ,null 
-0629 24214384 nbranch mouse_le_conn_param_lpm_disable ,positive 
-062a 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
-062b 6848cb8a fetcht 1 ,mem_lpm_mult_init 
-062c 98467c00 isub temp ,null 
-062d 2021439a branch mouse_le_lpm_mult_reinit ,positive 
-062e 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
-062f 67e0c177 store 1 ,mem_lpm_mult 
-0630 20204386 branch mouse_le_conn_param_lpm_enable 
+062c 6fe082c1 fetch 1 ,mem_le_new_conninterval 
+062d 1fe67c0c sub pdata ,le_interval_15ms ,null 
+062e 24214384 nbranch mouse_le_conn_param_lpm_disable ,positive 
+062f 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+0630 6848cb8a fetcht 1 ,mem_lpm_mult_init 
+0631 98467c00 isub temp ,null 
+0632 2021439a branch mouse_le_lpm_mult_reinit ,positive 
+0633 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+0634 67e0c177 store 1 ,mem_lpm_mult 
+0635 20204386 branch mouse_le_conn_param_lpm_enable 
 
 p_mouse_le_conn_param_update_rsp_recieved:
-0631 6fe0cca7 fetch 1 ,mem_mouse_le_send_conn_param_update 
-0632 247a0000 nrtn blank 
-0633 704ca701 jam 1 ,mem_mouse_le_send_conn_param_update 
-0634 704ca81e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
-0635 20600000 rtn 
+0636 6fe0cca7 fetch 1 ,mem_mouse_le_send_conn_param_update 
+0637 247a0000 nrtn blank 
+0638 704ca701 jam 1 ,mem_mouse_le_send_conn_param_update 
+0639 704ca81e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
+063a 20600000 rtn 
 
 p_le_parse_l2cap:
-0636 efe10006 ifetch 2 ,contr 
-0637 c0020639 beq le_l2cap_cid_att ,p_le_parse_att 
-0638 202019e4 branch le_parse_l2cap + 10 
+063b efe10006 ifetch 2 ,contr 
+063c c002063e beq le_l2cap_cid_att ,p_le_parse_att 
+063d 202019e4 branch le_parse_l2cap + 10 
 
 p_le_parse_att:
-0639 efe18006 ifetch 3 ,contr 
-063a 67e1c436 store 3 ,mem_le_att_opcode 
-063b c005063e beq attop_read_request ,p_le_parse_att_read_request 
-063c c009064d beq attop_write_request ,p_le_parse_att_write_request 
-063d 20201cd3 branch le_parse_att + 2 
+063e efe18006 ifetch 3 ,contr 
+063f 67e1c436 store 3 ,mem_le_att_opcode 
+0640 c0050643 beq attop_read_request ,p_le_parse_att_read_request 
+0641 c0090652 beq attop_write_request ,p_le_parse_att_write_request 
+0642 20201cd3 branch le_parse_att + 2 
 
 p_le_parse_att_read_request:
-063e 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-063f c31d9de7 bbit0 mouse_enable_le_battery_service_cancel ,le_parse_att_read_request 
-0640 20401e8d call le_check_encrypt_state 
-0641 68494437 fetcht 2 ,mem_le_att_handle 
-0642 6fe0c3c0 fetch 1 ,mem_le_configuration 
-0643 c2818648 bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
+0643 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0644 c31d9de7 bbit0 mouse_enable_le_battery_service_cancel ,le_parse_att_read_request 
+0645 20401e8d call le_check_encrypt_state 
+0646 68494437 fetcht 2 ,mem_le_att_handle 
+0647 6fe0c3c0 fetch 1 ,mem_le_configuration 
+0648 c281864d bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
 
 p_le_send_att_read_response:
-0644 6fe14437 fetch 2 ,mem_le_att_handle 
-0645 c0181ec8 beq 0x30 ,le_send_att_error_response_notfound 
-0646 68494437 fetcht 2 ,mem_le_att_handle 
-0647 20201deb branch le_send_att_read_response 
+0649 6fe14437 fetch 2 ,mem_le_att_handle 
+064a c0181ec8 beq 0x30 ,le_send_att_error_response_notfound 
+064b 68494437 fetcht 2 ,mem_le_att_handle 
+064c 20201deb branch le_send_att_read_response 
 
 p_le_send_att_read_response_check_auth:
-0648 6fe143d1 fetch 2 ,mem_le_pairing_handle 
-0649 98467c00 isub temp ,null 
-064a 24228644 nbranch p_le_send_att_read_response ,zero 
-064b 24340644 nbranch p_le_send_att_read_response ,user 
-064c 20201e10 branch le_send_att_read_response_error_insufficient_auth 
+064d 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+064e 98467c00 isub temp ,null 
+064f 24228649 nbranch p_le_send_att_read_response ,zero 
+0650 24340649 nbranch p_le_send_att_read_response ,user 
+0651 20201e10 branch le_send_att_read_response_error_insufficient_auth 
 
 p_le_parse_att_write_request:
-064d 18c22200 copy contr ,rega 
-064e 6fe143d4 fetch 2 ,mem_le_l2cap_size 
-064f 1fe0a5fd add pdata ,-3 ,regb 
-0650 20401a25 call le_writeatt_cb 
-0651 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
-0652 c07f9e73 beq 0xff ,le_send_att_write_response_check_auth 
-0653 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
-0654 203a1e73 branch le_send_att_write_response_check_auth ,blank 
-0655 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
-0656 c2809e73 bbit1 ll_start_enc_flag ,le_send_att_write_response_check_auth 
-0657 5800001a setarg 0x001a 
-0658 68494437 fetcht 2 ,mem_le_att_handle 
-0659 98467c00 isub temp ,null 
-065a 24229e73 nbranch le_send_att_write_response_check_auth ,zero 
-065b 20201e10 branch le_send_att_read_response_error_insufficient_auth 
+0652 18c22200 copy contr ,rega 
+0653 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+0654 1fe0a5fd add pdata ,-3 ,regb 
+0655 20401a25 call le_writeatt_cb 
+0656 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+0657 c07f9e73 beq 0xff ,le_send_att_write_response_check_auth 
+0658 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+0659 203a1e73 branch le_send_att_write_response_check_auth ,blank 
+065a 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+065b c2809e73 bbit1 ll_start_enc_flag ,le_send_att_write_response_check_auth 
+065c 5800001a setarg 0x001a 
+065d 68494437 fetcht 2 ,mem_le_att_handle 
+065e 98467c00 isub temp ,null 
+065f 24229e73 nbranch le_send_att_write_response_check_auth ,zero 
+0660 20201e10 branch le_send_att_read_response_error_insufficient_auth 
 
 p_send_lmp:
-065c 78547c00 disable user 
-065d 204059e6 call lmo_fifo_process 
-065e 6fe08049 fetch 1 ,mem_lmp_to_send 
-065f 207a0000 rtn blank 
-0660 c283d730 bbit1 7 ,send_lmp_escape 
+0661 78547c00 disable user 
+0662 204059e6 call lmo_fifo_process 
+0663 6fe08049 fetch 1 ,mem_lmp_to_send 
+0664 207a0000 rtn blank 
+0665 c283d730 bbit1 7 ,send_lmp_escape 
 
 p_send_lmp0:
-0661 c0038663 beq lmp_detach ,p_send_lmp_detach 
-0662 20205701 branch send_lmp0 
+0666 c0038668 beq lmp_detach ,p_send_lmp_detach 
+0667 20205701 branch send_lmp0 
 
 p_send_lmp_detach:
-0663 2040585d call send_lmp_detach 
-0664 70007378 jam 120 ,mem_conn_timer 
-0665 20600000 rtn 
+0668 2040585d call send_lmp_detach 
+0669 70007378 jam 120 ,mem_conn_timer 
+066a 20600000 rtn 
 
 p_mouse_bb_event_connected:
-0666 20404544 call mouse_no_data_timer_init 
-0667 6fe0cc40 fetch 1 ,mem_mouse_1io2led_led_enable 
-0668 245a0120 ncall p_mouse_multi_led_on_enable ,blank 
-0669 202043fa branch mouse_bb_event_connected 
+066b 20404544 call mouse_no_data_timer_init 
+066c 6fe0cc40 fetch 1 ,mem_mouse_1io2led_led_enable 
+066d 245a0120 ncall p_mouse_multi_led_on_enable ,blank 
+066e 202043fa branch mouse_bb_event_connected 
 
 p_hid_rx_process:
-066a 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
-066b 1fe20c00 copy pdata ,contr 
-066c efe08006 ifetch 1 ,contr 
-066d 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
-066e 1fe1040f and pdata ,0x0f ,temp 
-066f 1ff1fe00 rshift4 pdata ,pdata 
-0670 c0048672 beq hid_type_set_idle ,p_hid_rx_process_handshake 
-0671 20204d93 branch hid_rx_process + 7 
+066f 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+0670 1fe20c00 copy pdata ,contr 
+0671 efe08006 ifetch 1 ,contr 
+0672 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
+0673 1fe1040f and pdata ,0x0f ,temp 
+0674 1ff1fe00 rshift4 pdata ,pdata 
+0675 c0048677 beq hid_type_set_idle ,p_hid_rx_process_handshake 
+0676 20204d93 branch hid_rx_process + 7 
 
 p_hid_rx_process_handshake:
-0672 da200001 arg 1 ,rega 
-0673 20404dc0 call hid_malloc_tx_buff 
-0674 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
-0675 e7e10005 istore 2 ,contw 
-0676 58000000 setarg 0 
-0677 e7e08005 istore 1 ,contw 
-0678 70095001 jam 1 ,mem_ui_data_txbuff_length 
-0679 6fe0c4e2 fetch 1 ,mem_hid_control_state 
-067a 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
-067b 67e0c4e2 store 1 ,mem_hid_control_state 
-067c 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
-067d 20207871 branch ui_ipc_send_event 
+0677 da200001 arg 1 ,rega 
+0678 20404dc0 call hid_malloc_tx_buff 
+0679 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+067a e7e10005 istore 2 ,contw 
+067b 58000000 setarg 0 
+067c e7e08005 istore 1 ,contw 
+067d 70095001 jam 1 ,mem_ui_data_txbuff_length 
+067e 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+067f 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
+0680 67e0c4e2 store 1 ,mem_hid_control_state 
+0681 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
+0682 20207871 branch ui_ipc_send_event 
               org 0x800
 
 start:
Index: output/ramcode.rom
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/ramcode.rom	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/ramcode.rom	(working copy)
@@ -25,9 +25,9 @@
 c070835a
 c0710356
 c06d05be
-c06d85e9
+c06d85ee
 c04f83cf
-c074066a
+c074066f
 2020137c
 c0100079
 c01983a4
@@ -41,10 +41,10 @@
 c074853c
 c0750453
 c07604bf
-c00d065c
+c00d0661
 c05083d1
 c05183db
-c0600636
+c060063b
 2020137c
 6fe0cc43
 c1008000
@@ -67,7 +67,7 @@
 204022ff
 20400511
 20403f1e
-204005ec
+204005f1
 20403d13
 204002c2
 20400162
@@ -125,12 +125,12 @@
 c01e0575
 c01c856e
 c01d0586
-c0190620
-c00a861a
-c00a0617
-c0220627
-c0200631
-c0008666
+c0190625
+c00a861f
+c00a061c
+c022062c
+c0200636
+c000866b
 20204336
 6fe44bab
 c297c80a
@@ -1503,11 +1503,16 @@
 d8e00002
 204046f0
 204046e4
-204005e3
+6fe0cbb3
+2feffe01
+2040c3df
+6fe0cbb3
+2feffe00
+2040f8c4
 2020056b
 6fe0c938
-c00085e7
-c00105e8
+c00085ec
+c00105ed
 20600000
 202078c4
 202043df
@@ -1519,7 +1524,7 @@
 6fe0cc1e
 1fe22200
 1fe67c0b
-242105fe
+24210603
 d8c04c1f
 d8a04adb
 1a227200
@@ -1532,7 +1537,7 @@
 d8a042f8
 1a227200
 20207d5f
-20400614
+20400619
 6fe0cc1e
 1fe0fe01
 67e0cad2
@@ -1567,7 +1572,7 @@
 67e0cac6
 20204366
 6fe0cac7
-c0008624
+c0008629
 704b7614
 20204373
 2040436c
@@ -1589,27 +1594,27 @@
 704ca81e
 20600000
 efe10006
-c0020639
+c002063e
 202019e4
 efe18006
 67e1c436
-c005063e
-c009064d
+c0050643
+c0090652
 20201cd3
 6fe44bab
 c31d9de7
 20401e8d
 68494437
 6fe0c3c0
-c2818648
+c281864d
 6fe14437
 c0181ec8
 68494437
 20201deb
 6fe143d1
 98467c00
-24228644
-24340644
+24228649
+24340649
 20201e10
 18c22200
 6fe143d4
@@ -1631,7 +1636,7 @@
 6fe08049
 207a0000
 c283d730
-c0038663
+c0038668
 20205701
 2040585d
 70007378
@@ -1646,7 +1651,7 @@
 67e0c5f5
 1fe1040f
 1ff1fe00
-c0048672
+c0048677
 20204d93
 da200001
 20404dc0
Index: output/sched.rom
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/sched.rom	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/output/sched.rom	(working copy)
@@ -221,12 +221,12 @@
 mem_device_switch_gpio:ff
 mem_mouse_sensor_sclk_gpio:07
 mem_mouse_sensor_sdio_gpio:06
-mem_config_low_voltage_alarm_gpio:88
+mem_config_low_voltage_alarm_gpio:0a
 mem_config_device_bt2_led_gpio:ff
 mem_dpi_led_gpio:ff
 mem_firebutton_gpio:ff
 
-mem_sensor_angle_default:03	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_sensor_angle_default:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
 mem_sensor_angle_switch:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
 mem_config_sensor_dpi:00		#00--1200   01--1600
 
@@ -241,7 +241,7 @@
 mem_mouse_multi_led_powon2s_timer_init:14	#2s
 mem_mouse_multi_led_blink_timer_init:02
 mem_mouse_1io2led_multi_24gled:08
-mem_mouse_1io2led_multi_bt1led:0a
+mem_mouse_1io2led_multi_bt1led:8a
 mem_mouse_1io2led_multi_bt2led:8a
 #1io2led multi end
 
@@ -298,14 +298,14 @@
 mem_store_information_delay_timer_init:02
 
 #adc start
-mem_adc_config_flag_init:02 		#00-vinlpm   01-hvin   02-gpio
+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:0f 01		#1.5V
-a2 00#mem_mouse_vdd_empty_vol  :0.9V
-b4 00#mem_mouse_vdd_low_vol   :1.0V
-#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
+#mem_mouse_vdd_full_vol:0f 01		#1.5V
+#a2 00#mem_mouse_vdd_empty_vol  :0.9V
+#b4 00#mem_mouse_vdd_low_vol   :1.0V
+mem_mouse_vdd_full_vol: 28 01		#3.0
+f9 00#mem_mouse_vdd_empty_vol  :2.5V
+21 01#mem_mouse_vdd_low_vol   :2.9V
 mem_mouse_vdd_button_press_vol:10 00
 mem_mouse_vdd_switch_gnd_24g_vol:52 00
 mem_mouse_vdd_switch_gnd_full_vol:35 00
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/program/patch.prog	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/program/patch.prog	(working copy)
@@ -9,6 +9,7 @@
 //define RSSI_SORT
 //define SELECT_ANGLE
 //define DISABLE_24G_LED
+define BT_2MODE
 
 	bbit1 8,pf_patch_ext
 	beq patch00_0,p_soft_reset
@@ -2941,17 +2942,16 @@
 	arg MOUSE_STORE_EEPROM_FLAG,queue
 	call mouse_enable_function_flag
 	call mouse_bt_discovery_button_down_disable
-
-	call p_mouse_select_bt_adv_mode
-	/*
+ifdef BT_2MODE
 	fetch 1,mem_mouse_bluetooth_type
 	isolate1 MODE_4_MOUSE,pdata
 	call mouse_check_51cmd_adv,true
 	fetch 1,mem_mouse_bluetooth_type
 	isolate1 MODE_3_MOUSE,pdata
 	call check_51cmd_start_discovery,true
-	*/
-	//call mouse_low_voltage_led_blink_disable
+else
+	call p_mouse_select_bt_adv_mode
+endif	
 	branch p_mouse_device_discover_led_config
 
 p_mouse_select_bt_adv_mode:
Index: program_patch/ble_spec_code/patch_ble.prog
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/program_patch/ble_spec_code/patch_ble.prog	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/program_patch/ble_spec_code/patch_ble.prog	(working copy)
@@ -49,17 +49,16 @@
 	arg MOUSE_STORE_EEPROM_FLAG,queue
 	call mouse_enable_function_flag
 	call mouse_bt_discovery_button_down_disable
-
-	call p_mouse_select_bt_adv_mode
-	/*
+ifdef BT_2MODE
 	fetch 1,mem_mouse_bluetooth_type
 	isolate1 MODE_4_MOUSE,pdata
 	call mouse_check_51cmd_adv,true
 	fetch 1,mem_mouse_bluetooth_type
 	isolate1 MODE_3_MOUSE,pdata
 	call check_51cmd_start_discovery,true
-	*/
-	//call mouse_low_voltage_led_blink_disable
+else
+	call p_mouse_select_bt_adv_mode
+endif	
 	branch p_mouse_device_discover_led_config
 
 p_mouse_select_bt_adv_mode:
Index: program_patch/main_patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/program_patch/main_patch.prog	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/program_patch/main_patch.prog	(working copy)
@@ -9,6 +9,7 @@
 //define RSSI_SORT
 //define SELECT_ANGLE
 //define DISABLE_24G_LED
+define BT_2MODE
 
 	bbit1 8,pf_patch_ext
 	beq patch00_0,p_soft_reset
Index: sched/mouse.dat
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/sched/mouse.dat	(revision 1981)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/mouse_public_bt/mouse_public_multi_toggle/sched/mouse.dat	(working copy)
@@ -125,12 +125,12 @@
 mem_device_switch_gpio:ff
 mem_mouse_sensor_sclk_gpio:07
 mem_mouse_sensor_sdio_gpio:06
-mem_config_low_voltage_alarm_gpio:88
+mem_config_low_voltage_alarm_gpio:0a
 mem_config_device_bt2_led_gpio:ff
 mem_dpi_led_gpio:ff
 mem_firebutton_gpio:ff
 
-mem_sensor_angle_default:03	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_sensor_angle_default:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
 mem_sensor_angle_switch:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
 mem_config_sensor_dpi:00		#00--1200   01--1600
 
@@ -145,7 +145,7 @@
 mem_mouse_multi_led_powon2s_timer_init:14	#2s
 mem_mouse_multi_led_blink_timer_init:02
 mem_mouse_1io2led_multi_24gled:08
-mem_mouse_1io2led_multi_bt1led:0a
+mem_mouse_1io2led_multi_bt1led:8a
 mem_mouse_1io2led_multi_bt2led:8a
 #1io2led multi end
 
@@ -202,14 +202,14 @@
 mem_store_information_delay_timer_init:02
 
 #adc start
-mem_adc_config_flag_init:02 		#00-vinlpm   01-hvin   02-gpio
+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:0f 01		#1.5V
-a2 00#mem_mouse_vdd_empty_vol  :0.9V
-b4 00#mem_mouse_vdd_low_vol   :1.0V
-#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
+#mem_mouse_vdd_full_vol:0f 01		#1.5V
+#a2 00#mem_mouse_vdd_empty_vol  :0.9V
+#b4 00#mem_mouse_vdd_low_vol   :1.0V
+mem_mouse_vdd_full_vol: 28 01		#3.0
+f9 00#mem_mouse_vdd_empty_vol  :2.5V
+21 01#mem_mouse_vdd_low_vol   :2.9V
 mem_mouse_vdd_button_press_vol:10 00
 mem_mouse_vdd_switch_gnd_24g_vol:52 00
 mem_mouse_vdd_switch_gnd_full_vol:35 00
