Index: output/flash.dat
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/flash.dat	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/flash.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-e2
+e6
 1f
 20
 20
@@ -55,7 +55,7 @@
 20
 40
 07
-9b
+9c
 20
 40
 00
@@ -71,7 +71,7 @@
 20
 20
 07
-6a
+6b
 58
 00
 03
@@ -279,7 +279,7 @@
 c0
 42
 87
-68
+69
 c0
 44
 87
@@ -679,7 +679,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -687,7 +687,7 @@
 20
 20
 07
-6a
+6b
 20
 40
 02
@@ -1631,7 +1631,7 @@
 70
 41
 de
-04
+20
 70
 4c
 5b
@@ -1719,7 +1719,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -1727,7 +1727,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -1735,7 +1735,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -1743,7 +1743,7 @@
 20
 20
 07
-6a
+6b
 79
 3f
 80
@@ -2609,8 +2609,8 @@
 05
 2c
 c0
-01
-82
+03
+02
 9f
 70
 11
@@ -2619,7 +2619,7 @@
 20
 20
 07
-6a
+6b
 68
 00
 cd
@@ -2695,7 +2695,7 @@
 20
 20
 07
-6a
+6b
 70
 47
 9e
@@ -3311,7 +3311,7 @@
 20
 20
 07
-6a
+6b
 58
 00
 00
@@ -3995,7 +3995,7 @@
 20
 20
 07
-6a
+6b
 70
 0a
 99
@@ -4011,7 +4011,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -4019,7 +4019,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -4027,7 +4027,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -4035,7 +4035,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -4043,7 +4043,7 @@
 20
 20
 07
-6a
+6b
 70
 4b
 cf
@@ -4071,7 +4071,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -4079,7 +4079,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -4087,7 +4087,7 @@
 20
 20
 07
-6a
+6b
 20
 40
 04
@@ -4103,7 +4103,7 @@
 20
 20
 07
-6a
+6b
 70
 4b
 cf
@@ -4127,7 +4127,7 @@
 20
 20
 07
-6a
+6b
 68
 00
 cb
@@ -5239,11 +5239,11 @@
 24
 34
 07
-9b
+9c
 20
 40
 07
-8b
+8c
 20
 40
 05
@@ -5479,7 +5479,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -5487,7 +5487,7 @@
 20
 20
 07
-6a
+6b
 d8
 a0
 43
@@ -5603,7 +5603,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -5611,7 +5611,7 @@
 20
 20
 07
-6a
+6b
 68
 00
 84
@@ -6279,7 +6279,7 @@
 20
 20
 07
-6a
+6b
 20
 40
 21
@@ -6399,7 +6399,7 @@
 20
 20
 07
-6a
+6b
 68
 00
 80
@@ -6695,7 +6695,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -6703,7 +6703,7 @@
 20
 20
 07
-6a
+6b
 68
 00
 85
@@ -6791,7 +6791,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -6799,7 +6799,7 @@
 20
 20
 07
-6a
+6b
 70
 11
 c5
@@ -6807,7 +6807,7 @@
 20
 20
 07
-6a
+6b
 70
 4b
 03
@@ -7578,6 +7578,10 @@
 00
 70
 89
+4b
+ba
+70
+89
 56
 c2
 70
@@ -7615,7 +7619,7 @@
 20
 22
 87
-89
+8a
 60
 08
 cb
@@ -7691,7 +7695,7 @@
 24
 22
 87
-7a
+7b
 20
 40
 02
@@ -7747,7 +7751,7 @@
 20
 40
 07
-f0
+f1
 1f
 e2
 22
@@ -7763,7 +7767,7 @@
 20
 40
 07
-f0
+f1
 1f
 e2
 24
@@ -7775,7 +7779,7 @@
 20
 40
 07
-e3
+e4
 58
 00
 00
@@ -7783,7 +7787,7 @@
 20
 40
 07
-e9
+ea
 68
 00
 cb
@@ -7791,7 +7795,7 @@
 c0
 00
 87
-9e
+9f
 df
 20
 00
@@ -7851,7 +7855,7 @@
 20
 40
 07
-bf
+c0
 68
 01
 11
@@ -7887,7 +7891,7 @@
 20
 40
 07
-b8
+b9
 68
 01
 11
@@ -7947,7 +7951,7 @@
 20
 20
 87
-c9
+ca
 68
 00
 91
@@ -7955,7 +7959,7 @@
 c0
 7f
 87
-d0
+d1
 68
 00
 91
@@ -7983,7 +7987,7 @@
 c0
 00
 07
-cd
+ce
 68
 01
 91
@@ -7991,7 +7995,7 @@
 20
 20
 07
-c5
+c6
 70
 11
 c4
@@ -8003,7 +8007,7 @@
 20
 20
 07
-c5
+c6
 68
 00
 91
@@ -8011,7 +8015,7 @@
 20
 40
 07
-db
+dc
 60
 00
 91
@@ -8023,7 +8027,7 @@
 20
 3a
 07
-d9
+da
 58
 00
 00
@@ -8047,7 +8051,7 @@
 20
 20
 07
-d6
+d7
 1f
 e6
 7e
@@ -8087,7 +8091,7 @@
 24
 21
 07
-ee
+ef
 9a
 46
 7c
@@ -8095,7 +8099,7 @@
 24
 21
 07
-ee
+ef
 70
 4b
 0d
@@ -8123,7 +8127,7 @@
 20
 20
 07
-e7
+e8
 70
 4b
 0d
@@ -8139,7 +8143,7 @@
 c0
 7f
 87
-f5
+f6
 68
 00
 91
@@ -8163,9 +8167,9 @@
 20
 20
 07
-f3
-2d
-27
+f4
+29
+01
 aa
 55
 08
@@ -8434,22 +8438,20 @@
 10
 aa
 55
-0c
+0a
 00
 15
 45
-0b
-42
-54
-33
-2e
-30
-20
-4d
+09
+45
+72
+67
 6f
-75
-73
-65
+20
+52
+47
+42
+31
 aa
 55
 05
@@ -8539,7 +8541,7 @@
 03
 aa
 55
-14
+12
 00
 12
 4b
@@ -8550,57 +8552,51 @@
 03
 00
 80
-0c
+0a
 09
-42
-54
-35
-2e
-30
-20
-4d
+45
+72
+67
 6f
-75
-73
-65
+20
+52
+47
+42
+32
 aa
 55
-0e
+0c
 00
 8f
 43
 1f
-0c
+0a
 09
-42
-54
-35
-2e
-30
-20
-4d
+45
+72
+67
 6f
-75
-73
-65
+20
+52
+47
+42
+32
 aa
 55
-0c
+0a
 00
 af
 43
-0b
-42
-54
-35
-2e
-30
-20
-4d
+09
+45
+72
+67
 6f
-75
-73
-65
+20
+52
+47
+42
+32
 aa
 55
 08
@@ -8761,7 +8757,7 @@
 e0
 46
 00
-02
+03
 03
 07
 02
@@ -8782,7 +8778,7 @@
 18
 ff
 b0
-02
+03
 ff
 ff
 aa
@@ -8831,7 +8827,7 @@
 03
 04
 15
-1a
+20
 2a
 3f
 aa
@@ -9276,15 +9272,15 @@
 00
 57
 4b
-4d
+49
 31
 00
 55
 aa
 aa
 55
-84
-29
+1d
+27
 ff
 20
 20
@@ -9298,6 +9294,10 @@
 00
 ad
 d4
+20
+40
+01
+96
 70
 11
 9e
@@ -9341,11 +9341,11 @@
 24
 2c
 00
-26
+23
 24
 37
 80
-26
+23
 20
 40
 01
@@ -9365,7 +9365,7 @@
 20
 22
 80
-16
+17
 68
 00
 cc
@@ -9398,22 +9398,6 @@
 22
 81
 a8
-68
-02
-4c
-84
-68
-0a
-4c
-93
-98
-46
-7c
-00
-20
-42
-80
-24
 70
 4b
 67
@@ -9455,13 +9439,9 @@
 cd
 9a
 c0
-00
-00
-2d
-c0
 01
 00
-37
+33
 20
 20
 01
@@ -9489,7 +9469,7 @@
 20
 40
 00
-35
+31
 60
 08
 cd
@@ -9509,7 +9489,7 @@
 70
 41
 de
-20
+04
 68
 02
 4d
@@ -9529,7 +9509,7 @@
 20
 40
 00
-35
+31
 60
 08
 cd
@@ -9542,6 +9522,22 @@
 00
 00
 00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
 20
 20
 00
@@ -10706,22 +10702,6 @@
 40
 07
 0c
-68
-00
-c2
-41
-c2
-81
-01
-af
-20
-40
-03
-40
-20
-34
-01
-b1
 79
 20
 00
@@ -10822,6 +10802,22 @@
 00
 00
 00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
 20
 20
 00
@@ -11180,6 +11176,10 @@
 98
 20
 40
+00
+33
+20
+40
 34
 18
 68
@@ -11225,7 +11225,7 @@
 20
 40
 80
-2b
+2c
 68
 00
 c0
@@ -11278,36 +11278,32 @@
 20
 7d
 f4
+70
+40
+92
+41
+68
 00
+c7
+20
+c0
+01
 00
+38
+70
+40
+92
+42
+20
+60
 00
 00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
+70
+40
+92
+41
+20
+60
 00
 00
 00
@@ -12618,5 +12614,5 @@
 55
 00
 00
-45
-0c
+76
+4d
Index: output/program.lis
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/program.lis	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/program.lis	(working copy)
@@ -18,13 +18,13 @@
 0009 6000cb34 store 1 ,mem_bt_ui_button_count 
 000a 204043ca call mouse_bt_discovery_button_down_disable 
 000b 204002f9 call p_mouse_spi_init 
-000c 2040079b call p_drawing_optima_init 
+000c 2040079c call p_drawing_optima_init 
 000d 20400011 call p_mouse_cb_fuction 
 000e 20400024 call p_mouse_wakeup_from_power 
 
 p_mouse_setting_config:
 000f 7011c580 jam zcode_80 ,mem_zcode_temp_param0 
-0010 2020076a branch p_zcode_entrance 
+0010 2020076b branch p_zcode_entrance 
 
 p_mouse_cb_fuction:
 0011 58000349 setarg p_mouse_g24_package_data 
@@ -86,7 +86,7 @@
 0041 c000006c beq patch00_0 ,p_soft_reset 
 0042 c0008070 beq patch00_1 ,p_soft_reset_1 
 0043 c001007b beq patch00_2 ,p_soft_reset_2 
-0044 c0428768 beq patch10_5 ,p_shutdown_radio 
+0044 c0428769 beq patch10_5 ,p_shutdown_radio 
 0045 c044873b beq patch11_1 ,p_set_freq_tx 
 0046 c00d861f beq patch03_3 ,p_page_wait_fhs_reply_ok 
 0047 c0130621 beq patch04_6 ,p_role_switch_master 
@@ -210,11 +210,11 @@
 
 p_g24_pair_dispatch:
 00a7 7011c5c0 jam zcode_c0 ,mem_zcode_temp_param0 
-00a8 2020076a branch p_zcode_entrance 
+00a8 2020076b branch p_zcode_entrance 
 
 p_g24_reconn_dispatch:
 00a9 7011c570 jam zcode_70 ,mem_zcode_temp_param0 
-00aa 2020076a branch p_zcode_entrance 
+00aa 2020076b branch p_zcode_entrance 
 
 p_g24_transmit_by_interrupt:
 00ab 2040022f call p_g24_timer_check 
@@ -536,7 +536,7 @@
 0195 20207f01 branch memcpy 
 
 p_g24_pair_init:
-0196 7041de04 jam tx_power_f5db ,mem_tx_power 
+0196 7041de20 jam tx_power_pair ,mem_tx_power 
 0197 704c5b00 jam 0 ,mem_24g_pid 
 0198 704c664e jam g24_pair_ch ,mem_24g_ch 
 0199 68024c68 fetch 4 ,mem_24g_paring_addr 
@@ -570,21 +570,21 @@
 
 p_g24_pairing_sm:
 01ab 7011c590 jam zcode_90 ,mem_zcode_temp_param0 
-01ac 2020076a branch p_zcode_entrance 
+01ac 2020076b branch p_zcode_entrance 
 
 p_g24_paring_mode_start:
 
 p_g24_paring_mode:
 01ad 7011c591 jam zcode_91 ,mem_zcode_temp_param0 
-01ae 2020076a branch p_zcode_entrance 
+01ae 2020076b branch p_zcode_entrance 
 
 p_g24_start_24g_mode:
 01af 7011c560 jam zcode_60 ,mem_zcode_temp_param0 
-01b0 2020076a branch p_zcode_entrance 
+01b0 2020076b branch p_zcode_entrance 
 
 p_g24_auto_pair_start:
 01b1 7011c561 jam zcode_61 ,mem_zcode_temp_param0 
-01b2 2020076a branch p_zcode_entrance 
+01b2 2020076b branch p_zcode_entrance 
 
 p_g24_check_51cmd_stop_24g:
 01b3 793f8026 set0 mark_24g ,mark 
@@ -853,11 +853,11 @@
 0288 6800c241 fetch 1 ,mem_power_on_flag 
 0289 c281028c bbit1 2 ,p_mouse_check_reconn_target 
 028a 2040052c call p_mouse_check_key_gpio 
-028b c001829f beq mouse_lr_button ,p_mouse_24g_pairing_button 
+028b c003029f beq mouse_rm_button ,p_mouse_24g_pairing_button 
 
 p_mouse_check_reconn_target:
 028c 7011c501 jam zcode_01 ,mem_zcode_temp_param0 
-028d 2020076a branch p_zcode_entrance 
+028d 2020076b branch p_zcode_entrance 
 
 p_mouse_tx_power_init:
 028e 6800cd13 fetch 1 ,mem_tx_power_temp 
@@ -888,7 +888,7 @@
 
 p_mouse_24g_pairing_button:
 029f 7011c562 jam zcode_62 ,mem_zcode_temp_param0 
-02a0 2020076a branch p_zcode_entrance 
+02a0 2020076b branch p_zcode_entrance 
 
 p_mouse_clear_sensor_data:
 02a1 70479e01 jam 1 ,mem_mouse_clear_sensor_data_flag 
@@ -1092,7 +1092,7 @@
 
 p_mouse_start_24g_mode:
 0339 7011c572 jam zcode_72 ,mem_zcode_temp_param0 
-033a 2020076a branch p_zcode_entrance 
+033a 2020076b branch p_zcode_entrance 
 
 p_g24_pair_timeout_clear:
 033b 58000000 setarg 0 
@@ -1321,7 +1321,7 @@
 
 p_mouse_le_bb_disconnected:
 03e4 7011c5a2 jam zcode_a2 ,mem_zcode_temp_param0 
-03e5 2020076a branch p_zcode_entrance 
+03e5 2020076b branch p_zcode_entrance 
 
 p_mouse_le_enc_info:
 
@@ -1331,25 +1331,25 @@
 
 p_mouse_le_ll_start_encryt:
 03e8 7011c5b3 jam zcode_b3 ,mem_zcode_temp_param0 
-03e9 2020076a branch p_zcode_entrance 
+03e9 2020076b branch p_zcode_entrance 
 
 p_mouse_le_conn_param_update_rsp_recieved:
 03ea 7011c5a1 jam zcode_a1 ,mem_zcode_temp_param0 
-03eb 2020076a branch p_zcode_entrance 
+03eb 2020076b branch p_zcode_entrance 
 
 p_mouse_bb_event_reconn_timeout:
 
 p_mouse_bb_event_reconn_failed:
 03ec 7011c5a3 jam zcode_a3 ,mem_zcode_temp_param0 
-03ed 2020076a branch p_zcode_entrance 
+03ed 2020076b branch p_zcode_entrance 
 
 p_mouse_irtual_cable_unplug:
 03ee 7011c571 jam zcode_71 ,mem_zcode_temp_param0 
-03ef 2020076a branch p_zcode_entrance 
+03ef 2020076b branch p_zcode_entrance 
 
 p_mouse_sniff_not_accept:
 03f0 7011c5b1 jam zcode_b1 ,mem_zcode_temp_param0 
-03f1 2020076a branch p_zcode_entrance 
+03f1 2020076b branch p_zcode_entrance 
 
 p_mouse_bb_event_connected:
 03f2 704bcf01 jam 1 ,mem_mouse_rgb_on_enable 
@@ -1360,21 +1360,21 @@
 
 p_mouse_bb_event_disconnected:
 03f7 7011c5b4 jam zcode_b4 ,mem_zcode_temp_param0 
-03f8 2020076a branch p_zcode_entrance 
+03f8 2020076b branch p_zcode_entrance 
 
 p_mouse_enter_sniff_check:
 03f9 7011c5b2 jam zcode_b2 ,mem_zcode_temp_param0 
-03fa 2020076a branch p_zcode_entrance 
+03fa 2020076b branch p_zcode_entrance 
 
 p_mouse_24g_pairing_complete:
 03fb 7011c592 jam zcode_92 ,mem_zcode_temp_param0 
-03fc 2020076a branch p_zcode_entrance 
+03fc 2020076b branch p_zcode_entrance 
 
 p_mouse_24g_attempt_fail:
 03fd 20400407 call p_mouse_sensor_powerdown_check 
 03fe 704b5200 jam 0 ,mem_retry_count 
 03ff 7011c5a0 jam zcode_a0 ,mem_zcode_temp_param0 
-0400 2020076a branch p_zcode_entrance 
+0400 2020076b branch p_zcode_entrance 
 
 p_mouse_24g_attempt_success:
 0401 704bcf01 jam 1 ,mem_mouse_rgb_on_enable 
@@ -1386,7 +1386,7 @@
 
 p_mouse_before_hibernate:
 0405 7011c5a4 jam zcode_a4 ,mem_zcode_temp_param0 
-0406 2020076a branch p_zcode_entrance 
+0406 2020076b branch p_zcode_entrance 
 
 p_mouse_sensor_powerdown_check:
 0407 6800cb00 fetch 1 ,mem_mouse_init_sensor_reset_flag 
@@ -1782,8 +1782,8 @@
 0519 20403fb5 call mouse_cheak_sensor_data 
 051a 20404079 call mouse_zwheel 
 051b 2040052a call p_mouse_key 
-051c 2434079b nbranch p_drawing_optima_init ,user 
-051d 2040078b call p_drawing_optima 
+051c 2434079c nbranch p_drawing_optima_init ,user 
+051d 2040078c call p_drawing_optima 
 051e 20400523 call p_mouse_rgb_1min_init 
 051f 20203fa0 branch mouse_motion + 9 
 
@@ -1878,11 +1878,11 @@
 
 p_le_addr_random_config:
 0557 7011c581 jam zcode_81 ,mem_zcode_temp_param0 
-0558 2020076a branch p_zcode_entrance 
+0558 2020076b branch p_zcode_entrance 
 
 p_mouse_start_discovery:
 0559 7011c550 jam zcode_50 ,mem_zcode_temp_param0 
-055a 2020076a branch p_zcode_entrance 
+055a 2020076b branch p_zcode_entrance 
 
 p_le_adv_data_update:
 055b d8a0437b arg mem_le_adv_data + 11 ,contw 
@@ -1923,11 +1923,11 @@
 
 p_le_update_param:
 0576 7011c540 jam zcode_40 ,mem_zcode_temp_param0 
-0577 2020076a branch p_zcode_entrance 
+0577 2020076b branch p_zcode_entrance 
 
 p_le_update_channel_map:
 0578 7011c541 jam zcode_41 ,mem_zcode_temp_param0 
-0579 2020076a branch p_zcode_entrance 
+0579 2020076b branch p_zcode_entrance 
 
 p_le_prepare_tx:
 057a 68008456 fetch 1 ,mem_le_arq 
@@ -2152,7 +2152,7 @@
 
 p_page_wait_fhs_reply_ok:
 061f 7011c500 jam zcode_00 ,mem_zcode_temp_param0 
-0620 2020076a branch p_zcode_entrance 
+0620 2020076b branch p_zcode_entrance 
 
 p_role_switch_master:
 0621 204021c9 call role_switch_check 
@@ -2196,7 +2196,7 @@
 
 p_quit_connection_cont:
 063d 7011c512 jam zcode_12 ,mem_zcode_temp_param0 
-063e 2020076a branch p_zcode_entrance 
+063e 2020076b branch p_zcode_entrance 
 
 p_prepare_tx:
 063f 68008030 fetch 1 ,mem_state 
@@ -2290,11 +2290,11 @@
 
 p_mouse_bb_disconnected:
 0687 7011c510 jam zcode_10 ,mem_zcode_temp_param0 
-0688 2020076a branch p_zcode_entrance 
+0688 2020076b branch p_zcode_entrance 
 
 p_hid_rx_process:
 0689 7011c511 jam zcode_11 ,mem_zcode_temp_param0 
-068a 2020076a branch p_zcode_entrance 
+068a 2020076b branch p_zcode_entrance 
 
 p_parse_lmp_accepted:
 068b 68008552 fetch 1 ,mem_rxbuf + 1 
@@ -2324,15 +2324,15 @@
 
 p_send_lmp_escape:
 069f 7011c520 jam zcode_20 ,mem_zcode_temp_param0 
-06a0 2020076a branch p_zcode_entrance 
+06a0 2020076b branch p_zcode_entrance 
 
 p_send_lmp_accepted:
 06a1 7011c521 jam zcode_21 ,mem_zcode_temp_param0 
-06a2 2020076a branch p_zcode_entrance 
+06a2 2020076b branch p_zcode_entrance 
 
 p_send_lmp_detach:
 06a3 7011c522 jam zcode_22 ,mem_zcode_temp_param0 
-06a4 2020076a branch p_zcode_entrance 
+06a4 2020076b branch p_zcode_entrance 
 
 p_send_lmp_setup_complete:
 06a5 704b0301 jam 1 ,mem_bt_send_lmp_setup_complete 
@@ -2631,199 +2631,200 @@
 0764 20600000 rtn 
 
 p_set_tx_power_pair:
-0765 708956c2 jam 0xc2 ,0x8956 
-0766 708955d0 jam 0xd0 ,0x8955 
-0767 20600000 rtn 
+0765 70894bba jam 0xba ,0x894b 
+0766 708956c2 jam 0xc2 ,0x8956 
+0767 708955d0 jam 0xd0 ,0x8955 
+0768 20600000 rtn 
 
 p_shutdown_radio:
-0768 18002a08 force 8 ,radio_ctrl 
-0769 202028fa branch shutdown_radio + 1 
+0769 18002a08 force 8 ,radio_ctrl 
+076a 202028fa branch shutdown_radio + 1 
 
 p_zcode_entrance:
-076a 680891c5 fetcht 1 ,mem_zcode_temp_param0 
-076b 18518400 rshift4 temp ,temp 
-076c 6800cb56 fetch 1 ,mem_zcode_current_number 
-076d 98467c00 isub temp ,null 
-076e 20228789 branch p_zcode_run ,zero 
-076f 6008cb56 storet 1 ,mem_zcode_current_number 
-0770 18408401 increase 1 ,temp 
-0771 58000100 setarg zcode_buff_size 
-0772 984f8400 imul32 temp ,temp 
-0773 6801cb57 fetch 3 ,mem_xip_flash_offset 
-0774 98467e00 isub temp ,pdata 
-0775 6809cb5a fetcht 3 ,mem_flash_start_addr 
-0776 9840fe00 iadd temp ,pdata 
-0777 1fe0fffb increase -5 ,pdata 
-0778 6001cb5d store 3 ,mem_flash_address 
-0779 20400330 call p_flash_release_deep_power_down 
+076b 680891c5 fetcht 1 ,mem_zcode_temp_param0 
+076c 18518400 rshift4 temp ,temp 
+076d 6800cb56 fetch 1 ,mem_zcode_current_number 
+076e 98467c00 isub temp ,null 
+076f 2022878a branch p_zcode_run ,zero 
+0770 6008cb56 storet 1 ,mem_zcode_current_number 
+0771 18408401 increase 1 ,temp 
+0772 58000100 setarg zcode_buff_size 
+0773 984f8400 imul32 temp ,temp 
+0774 6801cb57 fetch 3 ,mem_xip_flash_offset 
+0775 98467e00 isub temp ,pdata 
+0776 6809cb5a fetcht 3 ,mem_flash_start_addr 
+0777 9840fe00 iadd temp ,pdata 
+0778 1fe0fffb increase -5 ,pdata 
+0779 6001cb5d store 3 ,mem_flash_address 
+077a 20400330 call p_flash_release_deep_power_down 
 
 p_zcode_read_loop:
-077a 6801cb5d fetch 3 ,mem_flash_address 
-077b d8400100 arg zcode_buff_size ,temp 
-077c da201f00 arg mem_zcode_buff ,rega 
-077d 20406562 call spid_read_flash 
-077e 68021f00 fetch 4 ,mem_zcode_buff 
-077f 680a4b60 fetcht 4 ,mem_zcode_head 
-0780 98467c00 isub temp ,null 
-0781 2422877a nbranch p_zcode_read_loop ,zero 
-0782 204002f9 call p_mouse_spi_init 
-0783 58001f00 setarg mem_zcode_buff 
-0784 60014199 store 2 ,mem_patch_ptr 
-0785 70419b40 jam zcode_code_size ,mem_patch_len 
-0786 204064ca call load_ucode 
-0787 58000000 setarg 0 
-0788 60024199 store 4 ,mem_patch_ptr 
+077b 6801cb5d fetch 3 ,mem_flash_address 
+077c d8400100 arg zcode_buff_size ,temp 
+077d da201f00 arg mem_zcode_buff ,rega 
+077e 20406562 call spid_read_flash 
+077f 68021f00 fetch 4 ,mem_zcode_buff 
+0780 680a4b60 fetcht 4 ,mem_zcode_head 
+0781 98467c00 isub temp ,null 
+0782 2422877b nbranch p_zcode_read_loop ,zero 
+0783 204002f9 call p_mouse_spi_init 
+0784 58001f00 setarg mem_zcode_buff 
+0785 60014199 store 2 ,mem_patch_ptr 
+0786 70419b40 jam zcode_code_size ,mem_patch_len 
+0787 204064ca call load_ucode 
+0788 58000000 setarg 0 
+0789 60024199 store 4 ,mem_patch_ptr 
 
 p_zcode_run:
-0789 680091c5 fetch 1 ,mem_zcode_temp_param0 
-078a 20200001 branch p_zcode 
+078a 680091c5 fetch 1 ,mem_zcode_temp_param0 
+078b 20200001 branch p_zcode 
 
 p_drawing_optima:
-078b 6802469b fetch 4 ,mem_mouse_x 
-078c 207a0000 rtn blank 
-078d 6801469b fetch 2 ,mem_mouse_x 
-078e 600111c0 store 2 ,mem_data_current 
-078f 204007f0 call p_data_abs 
-0790 1fe22200 copy pdata ,rega 
-0791 6801469d fetch 2 ,mem_mouse_y 
-0792 600111c0 store 2 ,mem_data_current 
-0793 204007f0 call p_data_abs 
-0794 1fe22400 copy pdata ,regb 
-0795 58000006 setarg 0x06 
-0796 204007e3 call p_data_greater_than_check 
-0797 58000003 setarg 0x03 
-0798 204007e9 call p_data_less_than_check 
-0799 6800cb0d fetch 1 ,mem_mouse_asm_flag 
-079a c000879e beq 1 ,p_drawing_optima_modify 
+078c 6802469b fetch 4 ,mem_mouse_x 
+078d 207a0000 rtn blank 
+078e 6801469b fetch 2 ,mem_mouse_x 
+078f 600111c0 store 2 ,mem_data_current 
+0790 204007f1 call p_data_abs 
+0791 1fe22200 copy pdata ,rega 
+0792 6801469d fetch 2 ,mem_mouse_y 
+0793 600111c0 store 2 ,mem_data_current 
+0794 204007f1 call p_data_abs 
+0795 1fe22400 copy pdata ,regb 
+0796 58000006 setarg 0x06 
+0797 204007e4 call p_data_greater_than_check 
+0798 58000003 setarg 0x03 
+0799 204007ea call p_data_less_than_check 
+079a 6800cb0d fetch 1 ,mem_mouse_asm_flag 
+079b c000879f beq 1 ,p_drawing_optima_modify 
 
 p_drawing_optima_init:
-079b df200005 arg 5 ,loopcnt 
-079c d8a04b0d arg mem_mouse_asm_flag ,contw 
-079d 20207ed4 branch clear_mem 
+079c df200005 arg 5 ,loopcnt 
+079d d8a04b0d arg mem_mouse_asm_flag ,contw 
+079e 20207ed4 branch clear_mem 
 
 p_drawing_optima_modify:
-079e 68014b0e fetch 2 ,mem_mouse_x_pre 
-079f 600111be store 2 ,mem_data_pre 
-07a0 6801469b fetch 2 ,mem_mouse_x 
-07a1 600111c0 store 2 ,mem_data_current 
-07a2 680111be fetch 2 ,mem_data_pre 
-07a3 680911c0 fetcht 2 ,mem_data_current 
-07a4 9840fe00 iadd temp ,pdata 
-07a5 6808cbb4 fetcht 1 ,mem_mouse_data_xtemp 
-07a6 9840fe00 iadd temp ,pdata 
-07a7 1fe10401 and pdata ,0x01 ,temp 
-07a8 6008cbb4 storet 1 ,mem_mouse_data_xtemp 
-07a9 204007bf call p_drawing_optima_data 
-07aa 680111be fetch 2 ,mem_data_pre 
-07ab 60014b0e store 2 ,mem_mouse_x_pre 
-07ac 680111c0 fetch 2 ,mem_data_current 
-07ad 6001469b store 2 ,mem_mouse_x 
-07ae 68014b10 fetch 2 ,mem_mouse_y_pre 
-07af 600111be store 2 ,mem_data_pre 
-07b0 6801469d fetch 2 ,mem_mouse_y 
-07b1 600111c0 store 2 ,mem_data_current 
-07b2 204007b8 call p_drawing_optima_data_y 
-07b3 680111be fetch 2 ,mem_data_pre 
-07b4 60014b10 store 2 ,mem_mouse_y_pre 
-07b5 680111c0 fetch 2 ,mem_data_current 
-07b6 6001469d store 2 ,mem_mouse_y 
-07b7 20600000 rtn 
+079f 68014b0e fetch 2 ,mem_mouse_x_pre 
+07a0 600111be store 2 ,mem_data_pre 
+07a1 6801469b fetch 2 ,mem_mouse_x 
+07a2 600111c0 store 2 ,mem_data_current 
+07a3 680111be fetch 2 ,mem_data_pre 
+07a4 680911c0 fetcht 2 ,mem_data_current 
+07a5 9840fe00 iadd temp ,pdata 
+07a6 6808cbb4 fetcht 1 ,mem_mouse_data_xtemp 
+07a7 9840fe00 iadd temp ,pdata 
+07a8 1fe10401 and pdata ,0x01 ,temp 
+07a9 6008cbb4 storet 1 ,mem_mouse_data_xtemp 
+07aa 204007c0 call p_drawing_optima_data 
+07ab 680111be fetch 2 ,mem_data_pre 
+07ac 60014b0e store 2 ,mem_mouse_x_pre 
+07ad 680111c0 fetch 2 ,mem_data_current 
+07ae 6001469b store 2 ,mem_mouse_x 
+07af 68014b10 fetch 2 ,mem_mouse_y_pre 
+07b0 600111be store 2 ,mem_data_pre 
+07b1 6801469d fetch 2 ,mem_mouse_y 
+07b2 600111c0 store 2 ,mem_data_current 
+07b3 204007b9 call p_drawing_optima_data_y 
+07b4 680111be fetch 2 ,mem_data_pre 
+07b5 60014b10 store 2 ,mem_mouse_y_pre 
+07b6 680111c0 fetch 2 ,mem_data_current 
+07b7 6001469d store 2 ,mem_mouse_y 
+07b8 20600000 rtn 
 
 p_drawing_optima_data_y:
-07b8 680111be fetch 2 ,mem_data_pre 
-07b9 680911c0 fetcht 2 ,mem_data_current 
-07ba 9840fe00 iadd temp ,pdata 
-07bb 6808cbb5 fetcht 1 ,mem_mouse_data_ytemp 
-07bc 9840fe00 iadd temp ,pdata 
-07bd 1fe10401 and pdata ,0x01 ,temp 
-07be 6008cbb5 storet 1 ,mem_mouse_data_ytemp 
+07b9 680111be fetch 2 ,mem_data_pre 
+07ba 680911c0 fetcht 2 ,mem_data_current 
+07bb 9840fe00 iadd temp ,pdata 
+07bc 6808cbb5 fetcht 1 ,mem_mouse_data_ytemp 
+07bd 9840fe00 iadd temp ,pdata 
+07be 1fe10401 and pdata ,0x01 ,temp 
+07bf 6008cbb5 storet 1 ,mem_mouse_data_ytemp 
 
 p_drawing_optima_data:
-07bf 600191c2 store 3 ,mem_data_sum 
-07c0 2feffe10 isolate1 16 ,pdata 
-07c1 202087c9 branch p_data_sum_overflow ,true 
-07c2 680091c3 fetch 1 ,mem_data_sum + 1 
-07c3 c07f87d0 beq 0xff ,p_data_sum_n 
-07c4 680091c2 fetch 1 ,mem_data_sum 
+07c0 600191c2 store 3 ,mem_data_sum 
+07c1 2feffe10 isolate1 16 ,pdata 
+07c2 202087ca branch p_data_sum_overflow ,true 
+07c3 680091c3 fetch 1 ,mem_data_sum + 1 
+07c4 c07f87d1 beq 0xff ,p_data_sum_n 
+07c5 680091c2 fetch 1 ,mem_data_sum 
 
 p_data_store_pre:
-07c5 1fe37e00 rshift pdata ,pdata 
-07c6 600111be store 2 ,mem_data_pre 
-07c7 600111c0 store 2 ,mem_data_current 
-07c8 20600000 rtn 
+07c6 1fe37e00 rshift pdata ,pdata 
+07c7 600111be store 2 ,mem_data_pre 
+07c8 600111c0 store 2 ,mem_data_current 
+07c9 20600000 rtn 
 
 p_data_sum_overflow:
-07c9 680091c3 fetch 1 ,mem_data_sum + 1 
-07ca c00007cd beq 0 ,p_data_sum_overflow_p 
-07cb 680191c2 fetch 3 ,mem_data_sum 
-07cc 202007c5 branch p_data_store_pre 
+07ca 680091c3 fetch 1 ,mem_data_sum + 1 
+07cb c00007ce beq 0 ,p_data_sum_overflow_p 
+07cc 680191c2 fetch 3 ,mem_data_sum 
+07cd 202007c6 branch p_data_store_pre 
 
 p_data_sum_overflow_p:
-07cd 7011c400 jam 0 ,mem_data_sum + 2 
-07ce 680091c2 fetch 1 ,mem_data_sum 
-07cf 202007c5 branch p_data_store_pre 
+07ce 7011c400 jam 0 ,mem_data_sum + 2 
+07cf 680091c2 fetch 1 ,mem_data_sum 
+07d0 202007c6 branch p_data_store_pre 
 
 p_data_sum_n:
-07d0 680091c2 fetch 1 ,mem_data_sum 
-07d1 204007db call p_pdata_get_half 
-07d2 600091be store 1 ,mem_data_pre 
-07d3 600091c0 store 1 ,mem_data_current 
-07d4 203a07d9 branch p_data_zero ,blank 
-07d5 580000ff setarg 0xff 
+07d1 680091c2 fetch 1 ,mem_data_sum 
+07d2 204007dc call p_pdata_get_half 
+07d3 600091be store 1 ,mem_data_pre 
+07d4 600091c0 store 1 ,mem_data_current 
+07d5 203a07da branch p_data_zero ,blank 
+07d6 580000ff setarg 0xff 
 
 p_data_set_direction:
-07d6 600091bf store 1 ,mem_data_pre + 1 
-07d7 600091c1 store 1 ,mem_data_current + 1 
-07d8 20600000 rtn 
+07d7 600091bf store 1 ,mem_data_pre + 1 
+07d8 600091c1 store 1 ,mem_data_current + 1 
+07d9 20600000 rtn 
 
 p_data_zero:
-07d9 58000000 setarg 0 
-07da 202007d6 branch p_data_set_direction 
+07da 58000000 setarg 0 
+07db 202007d7 branch p_data_set_direction 
 
 p_pdata_get_half:
-07db 1fe67e00 sub pdata ,0 ,pdata 
-07dc 60008aae store 1 ,mem_rega 
-07dd 68008aae fetch 1 ,mem_rega 
-07de 1fe37e00 rshift pdata ,pdata 
-07df 60008aae store 1 ,mem_rega 
-07e0 68008aae fetch 1 ,mem_rega 
-07e1 1fe67e00 sub pdata ,0 ,pdata 
-07e2 20600000 rtn 
+07dc 1fe67e00 sub pdata ,0 ,pdata 
+07dd 60008aae store 1 ,mem_rega 
+07de 68008aae fetch 1 ,mem_rega 
+07df 1fe37e00 rshift pdata ,pdata 
+07e0 60008aae store 1 ,mem_rega 
+07e1 68008aae fetch 1 ,mem_rega 
+07e2 1fe67e00 sub pdata ,0 ,pdata 
+07e3 20600000 rtn 
 
 p_data_greater_than_check:
-07e3 9a267c00 isub rega ,null 
-07e4 242107ee nbranch p_enable_asm ,positive 
-07e5 9a467c00 isub regb ,null 
-07e6 242107ee nbranch p_enable_asm ,positive 
+07e4 9a267c00 isub rega ,null 
+07e5 242107ef nbranch p_enable_asm ,positive 
+07e6 9a467c00 isub regb ,null 
+07e7 242107ef nbranch p_enable_asm ,positive 
 
 p_disable_asm:
-07e7 704b0d00 jam 0 ,mem_mouse_asm_flag 
-07e8 20600000 rtn 
+07e8 704b0d00 jam 0 ,mem_mouse_asm_flag 
+07e9 20600000 rtn 
 
 p_data_less_than_check:
-07e9 9a267c00 isub rega ,null 
-07ea 24610000 nrtn positive 
-07eb 9a467c00 isub regb ,null 
-07ec 24610000 nrtn positive 
-07ed 202007e7 branch p_disable_asm 
+07ea 9a267c00 isub rega ,null 
+07eb 24610000 nrtn positive 
+07ec 9a467c00 isub regb ,null 
+07ed 24610000 nrtn positive 
+07ee 202007e8 branch p_disable_asm 
 
 p_enable_asm:
-07ee 704b0d01 jam 1 ,mem_mouse_asm_flag 
-07ef 20600000 rtn 
+07ef 704b0d01 jam 1 ,mem_mouse_asm_flag 
+07f0 20600000 rtn 
 
 p_data_abs:
-07f0 680091c1 fetch 1 ,mem_data_current + 1 
-07f1 c07f87f5 beq 0xff ,p_data_reversal 
-07f2 680091c0 fetch 1 ,mem_data_current 
+07f1 680091c1 fetch 1 ,mem_data_current + 1 
+07f2 c07f87f6 beq 0xff ,p_data_reversal 
+07f3 680091c0 fetch 1 ,mem_data_current 
 
 p_data_abs_store:
-07f3 1fe17eff and_into 0xff ,pdata 
-07f4 20600000 rtn 
+07f4 1fe17eff and_into 0xff ,pdata 
+07f5 20600000 rtn 
 
 p_data_reversal:
-07f5 680111c0 fetch 2 ,mem_data_current 
-07f6 1fe67e00 sub pdata ,0 ,pdata 
-07f7 202007f3 branch p_data_abs_store 
+07f6 680111c0 fetch 2 ,mem_data_current 
+07f7 1fe67e00 sub pdata ,0 ,pdata 
+07f8 202007f4 branch p_data_abs_store 
               org 0x2000
 
 start:
@@ -35793,33 +35794,45 @@
 60016 6801cbae fetch 3 ,mem_le_lap_high_3b 
 60017 6001c4a3 store 3 ,mem_le_lap + 3 
 60018 20400298 call p_mouse_le_fast_conn_disable 
-60019 20403418 call app_lpm_mult_disable 
-6001a 68014687 fetch 2 ,mem_discovery_timeout 
-6001b 600146ac store 2 ,mem_mouse_discovery_timer 
-6001c 70016d06 jam 6 ,mem_connection_options 
-6001d 58000000 setarg 0 
-6001e 600146ae store 2 ,mem_mouse_direct_timer 
-6001f d8e00007 arg mouse_store_eeprom_flag ,queue 
-60020 204043ce call mouse_enable_function_flag 
-60021 204043ca call mouse_bt_discovery_button_down_disable 
-60022 6800c092 fetch 1 ,mem_device_option 
-60023 2feffe01 isolate1 mode_4_mouse ,pdata 
-60024 2040802b call z_check_51cmd_adv ,true 
-60025 6800c092 fetch 1 ,mem_device_option 
-60026 2feffe00 isolate1 mode_3_mouse ,pdata 
-60027 2040fddd call check_51cmd_start_discovery ,true 
-60028 704b5100 jam 0 ,mem_mouse_bt_reconnect_flag 
-60029 204042c4 call mouse_start_discovery_norandom + 13 
-6002a 20200711 branch p_mouse_discovery_multi_led_blink 
+60019 20400033 call z_mem_device_option_set 
+6001a 20403418 call app_lpm_mult_disable 
+6001b 68014687 fetch 2 ,mem_discovery_timeout 
+6001c 600146ac store 2 ,mem_mouse_discovery_timer 
+6001d 70016d06 jam 6 ,mem_connection_options 
+6001e 58000000 setarg 0 
+6001f 600146ae store 2 ,mem_mouse_direct_timer 
+60020 d8e00007 arg mouse_store_eeprom_flag ,queue 
+60021 204043ce call mouse_enable_function_flag 
+60022 204043ca call mouse_bt_discovery_button_down_disable 
+60023 6800c092 fetch 1 ,mem_device_option 
+60024 2feffe01 isolate1 mode_4_mouse ,pdata 
+60025 2040802c call z_check_51cmd_adv ,true 
+60026 6800c092 fetch 1 ,mem_device_option 
+60027 2feffe00 isolate1 mode_3_mouse ,pdata 
+60028 2040fddd call check_51cmd_start_discovery ,true 
+60029 704b5100 jam 0 ,mem_mouse_bt_reconnect_flag 
+6002a 204042c4 call mouse_start_discovery_norandom + 13 
+6002b 20200711 branch p_mouse_discovery_multi_led_blink 
 
 z_check_51cmd_adv:
-6002b 7047a100 jam 0 ,mem_mouse_le_reconnect_flag 
-6002c 20400291 call p_le_check_adv_flag 
-6002d 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
-6002e e0c08000 istore 1 ,contr 
-6002f d8c04b12 arg mem_le_adv_swift_pair ,contr 
-60030 2040055b call p_le_adv_data_update 
-60031 20207df4 branch check_51cmd_adv 
+6002c 7047a100 jam 0 ,mem_mouse_le_reconnect_flag 
+6002d 20400291 call p_le_check_adv_flag 
+6002e 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
+6002f e0c08000 istore 1 ,contr 
+60030 d8c04b12 arg mem_le_adv_swift_pair ,contr 
+60031 2040055b call p_le_adv_data_update 
+60032 20207df4 branch check_51cmd_adv 
+
+z_mem_device_option_set:
+60033 70409241 jam 0x41 ,mem_device_option 
+60034 6800c720 fetch 1 ,mem_device_flag 
+60035 c0010038 beq mode_bt_device2 ,p_mouse_set_bt_mode 
+60036 70409242 jam 0x42 ,mem_device_option 
+60037 20600000 rtn 
+
+p_mouse_set_bt_mode:
+60038 70409241 jam 0x41 ,mem_device_option 
+60039 20600000 rtn 
               org 0x70001
 
 z_entrance6:
@@ -35924,23 +35937,19 @@
 
 z_mouse_start_24g_mode:
 80022 2040070c call p_mouse_mode_24g_device_multi_led_on 
-80023 6800c241 fetch 1 ,mem_power_on_flag 
-80024 c28101af bbit1 2 ,p_g24_start_24g_mode 
 
 z_mouse_start_24g_reconn_check:
-80025 20400340 call p_g24_factory_check 
-80026 203401b1 branch p_g24_auto_pair_start ,user 
-80027 79200026 set1 mark_24g ,mark 
-80028 6800cdac fetch 1 ,mem_24g_conn_sm 
-80029 79207e02 set1 state_24g_reconn ,pdata 
-8002a 6000cdac store 1 ,mem_24g_conn_sm 
-8002b 2040019b call p_g24_syncword_crc8 
-8002c 2040010a call p_g24_ch 
+80023 79200026 set1 mark_24g ,mark 
+80024 6800cdac fetch 1 ,mem_24g_conn_sm 
+80025 79207e02 set1 state_24g_reconn ,pdata 
+80026 6000cdac store 1 ,mem_24g_conn_sm 
+80027 2040019b call p_g24_syncword_crc8 
+80028 2040010a call p_g24_ch 
 
 z_g24_reconn_timeout_init:
-8002d 5800001e setarg g24_reconn_nodata_timer 
-8002e 60014bb6 store 2 ,mem_g24_stop_g24_reconn_mode_timeout 
-8002f 2020033e branch p_g24_stop_g24_mode_set 
+80029 5800001e setarg g24_reconn_nodata_timer 
+8002a 60014bb6 store 2 ,mem_g24_stop_g24_reconn_mode_timeout 
+8002b 2020033e branch p_g24_stop_g24_mode_set 
               org 0x90001
 
 z_entrance8:
@@ -36230,78 +36239,74 @@
 z_g24_pair_dispatch:
 d0001 6800cda7 fetch 1 ,mem_24g_stop_g24_mode 
 d0002 c000add4 beq 1 ,g24_stop_24g_mode 
-d0003 70119eff jam 0xff ,mem_24g_common_temp 
-d0004 6800cc5d fetch 1 ,mem_24g_data_type 
-d0005 6000919f store 1 ,mem_24g_common_temp + 1 
-d0006 68024c93 fetch 4 ,mem_24g_device_addr 
-d0007 600211a0 store 4 ,mem_24g_common_temp + 2 
-d0008 d8400006 arg 6 ,temp 
-d0009 da20119e arg mem_24g_common_temp ,rega 
-d000a 204001b8 call p_g24_put_data_in_buff 
-d000b 204001bc call p_g24_transmit_prep 
-d000c 2040015e call p_g24_transmit_receive_ack 
-d000d 242c0026 nbranch z_g24_pair_txdata_retry ,sync 
-d000e 24378026 nbranch z_g24_pair_txdata_retry ,user3 
-d000f 20400184 call p_g24_ackpayload_parse 
-d0010 68024c84 fetch 4 ,mem_24g_addr 
-d0011 680a4da1 fetcht 4 ,mem_24g_allpowerful_addr 
-d0012 98467c00 isub temp ,null 
-d0013 20228016 branch z_g24_auto_pair_skip_rx_length ,zero 
-d0014 6800cc5a fetch 1 ,mem_24g_rxdata_length 
-d0015 c1840000 rtnne bind_ackpayload_length 
+d0003 20400196 call p_g24_pair_init 
+d0004 70119eff jam 0xff ,mem_24g_common_temp 
+d0005 6800cc5d fetch 1 ,mem_24g_data_type 
+d0006 6000919f store 1 ,mem_24g_common_temp + 1 
+d0007 68024c93 fetch 4 ,mem_24g_device_addr 
+d0008 600211a0 store 4 ,mem_24g_common_temp + 2 
+d0009 d8400006 arg 6 ,temp 
+d000a da20119e arg mem_24g_common_temp ,rega 
+d000b 204001b8 call p_g24_put_data_in_buff 
+d000c 204001bc call p_g24_transmit_prep 
+d000d 2040015e call p_g24_transmit_receive_ack 
+d000e 242c0023 nbranch z_g24_pair_txdata_retry ,sync 
+d000f 24378023 nbranch z_g24_pair_txdata_retry ,user3 
+d0010 20400184 call p_g24_ackpayload_parse 
+d0011 68024c84 fetch 4 ,mem_24g_addr 
+d0012 680a4da1 fetcht 4 ,mem_24g_allpowerful_addr 
+d0013 98467c00 isub temp ,null 
+d0014 20228017 branch z_g24_auto_pair_skip_rx_length ,zero 
+d0015 6800cc5a fetch 1 ,mem_24g_rxdata_length 
+d0016 c1840000 rtnne bind_ackpayload_length 
 
 z_g24_auto_pair_skip_rx_length:
-d0016 704dac00 jam 0 ,mem_24g_conn_sm 
-d0017 2040028e call p_mouse_tx_power_init 
-d0018 68024c84 fetch 4 ,mem_24g_addr 
-d0019 680a4c68 fetcht 4 ,mem_24g_paring_addr 
-d001a 98467c00 isub temp ,null 
-d001b 202281a8 branch p_g24_start_pairing_sm1 ,zero 
-d001c 68024c84 fetch 4 ,mem_24g_addr 
-d001d 680a4c93 fetcht 4 ,mem_24g_device_addr 
-d001e 98467c00 isub temp ,null 
-d001f 20428024 call z7_g24_store_dongle_addr ,zero 
-d0020 704b6700 jam 0 ,mem_mouse_long_mult_flag 
-d0021 20402f20 call g24_app_tx_attempt_success 
-d0022 2040015b call p_g24_txbuf_clear 
-d0023 2020034c branch p_g24_transmit_by_interrupt_enable 
+d0017 704dac00 jam 0 ,mem_24g_conn_sm 
+d0018 2040028e call p_mouse_tx_power_init 
+d0019 68024c84 fetch 4 ,mem_24g_addr 
+d001a 680a4c68 fetcht 4 ,mem_24g_paring_addr 
+d001b 98467c00 isub temp ,null 
+d001c 202281a8 branch p_g24_start_pairing_sm1 ,zero 
+d001d 704b6700 jam 0 ,mem_mouse_long_mult_flag 
+d001e 20402f20 call g24_app_tx_attempt_success 
+d001f 2040015b call p_g24_txbuf_clear 
+d0020 2020034c branch p_g24_transmit_by_interrupt_enable 
 
 z7_g24_store_dongle_addr:
-d0024 68024c3c fetch 4 ,mem_24g_rxpayload + 2 
-d0025 2020019a branch p_g24_update_addr_and_synccrc8 
+d0021 68024c3c fetch 4 ,mem_24g_rxpayload + 2 
+d0022 2020019a branch p_g24_update_addr_and_synccrc8 
 
 z_g24_pair_txdata_retry:
 
 z_g24_pair_txdata_switch:
-d0026 6800cd9a fetch 1 ,mem_24g_auto_paring_switch 
-d0027 1fe0fe01 increase 1 ,pdata 
-d0028 1fe17e03 and_into 3 ,pdata 
-d0029 6000cd9a store 1 ,mem_24g_auto_paring_switch 
-d002a c000002d beq 0 ,z_g24_auto_pair_first_attemp 
-d002b c0010037 beq 2 ,z_g24_auto_pair_all_powerful 
-d002c 20200196 branch p_g24_pair_init 
+d0023 6800cd9a fetch 1 ,mem_24g_auto_paring_switch 
+d0024 1fe0fe01 increase 1 ,pdata 
+d0025 1fe17e03 and_into 3 ,pdata 
+d0026 6000cd9a store 1 ,mem_24g_auto_paring_switch 
+d0027 c0010033 beq 2 ,z_g24_auto_pair_all_powerful 
+d0028 20200196 branch p_g24_pair_init 
 
 z_g24_auto_pair_first_attemp:
-d002d 2040028e call p_mouse_tx_power_init 
-d002e 68024c93 fetch 4 ,mem_24g_device_addr 
-d002f 60024c84 store 4 ,mem_24g_addr 
-d0030 6800cdaa fetch 1 ,mem_24g_pair_current_ch_num 
-d0031 6000cc67 store 1 ,mem_24g_current_ch_number 
-d0032 20400035 call z_g24_ch_syncword_crc8_init 
-d0033 6008cdaa storet 1 ,mem_24g_pair_current_ch_num 
-d0034 20600000 rtn 
+d0029 2040028e call p_mouse_tx_power_init 
+d002a 68024c93 fetch 4 ,mem_24g_device_addr 
+d002b 60024c84 store 4 ,mem_24g_addr 
+d002c 6800cdaa fetch 1 ,mem_24g_pair_current_ch_num 
+d002d 6000cc67 store 1 ,mem_24g_current_ch_number 
+d002e 20400031 call z_g24_ch_syncword_crc8_init 
+d002f 6008cdaa storet 1 ,mem_24g_pair_current_ch_num 
+d0030 20600000 rtn 
 
 z_g24_ch_syncword_crc8_init:
-d0035 2040019b call p_g24_syncword_crc8 
-d0036 2020010a branch p_g24_ch 
+d0031 2040019b call p_g24_syncword_crc8 
+d0032 2020010a branch p_g24_ch 
 
 z_g24_auto_pair_all_powerful:
-d0037 7041de20 jam tx_power_pair ,mem_tx_power 
-d0038 68024da1 fetch 4 ,mem_24g_allpowerful_addr 
-d0039 60024c84 store 4 ,mem_24g_addr 
-d003a 6800cdab fetch 1 ,mem_24g_powerful_current_ch_num 
-d003b 6000cc67 store 1 ,mem_24g_current_ch_number 
-d003c 20400035 call z_g24_ch_syncword_crc8_init 
-d003d 6008cdab storet 1 ,mem_24g_powerful_current_ch_num 
-d003e 20600000 rtn 
+d0033 7041de04 jam tx_power_f5db ,mem_tx_power 
+d0034 68024da1 fetch 4 ,mem_24g_allpowerful_addr 
+d0035 60024c84 store 4 ,mem_24g_addr 
+d0036 6800cdab fetch 1 ,mem_24g_powerful_current_ch_num 
+d0037 6000cc67 store 1 ,mem_24g_current_ch_number 
+d0038 20400031 call z_g24_ch_syncword_crc8_init 
+d0039 6008cdab storet 1 ,mem_24g_powerful_current_ch_num 
+d003a 20600000 rtn 
 
Index: output/romcode.rom
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/romcode.rom	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/romcode.rom	(working copy)
@@ -24818,6 +24818,7 @@
 6801cbae
 6001c4a3
 20400298
+20400033
 20403418
 68014687
 600146ac
@@ -24829,7 +24830,7 @@
 204043ca
 6800c092
 2feffe01
-2040802b
+2040802c
 6800c092
 2feffe00
 2040fddd
@@ -24843,6 +24844,13 @@
 d8c04b12
 2040055b
 20207df4
+70409241
+6800c720
+c0010038
+70409242
+20600000
+70409241
+20600000
 c0300005
 c0308018
 c031001f
@@ -24919,10 +24927,6 @@
 704721ff
 202002dd
 2040070c
-6800c241
-c28101af
-20400340
-203401b1
 79200026
 6800cdac
 79207e02
@@ -25150,6 +25154,7 @@
 202041d9
 6800cda7
 c000add4
+20400196
 70119eff
 6800cc5d
 6000919f
@@ -25160,13 +25165,13 @@
 204001b8
 204001bc
 2040015e
-242c0026
-24378026
+242c0023
+24378023
 20400184
 68024c84
 680a4da1
 98467c00
-20228016
+20228017
 6800cc5a
 c1840000
 704dac00
@@ -25175,10 +25180,6 @@
 680a4c68
 98467c00
 202281a8
-68024c84
-680a4c93
-98467c00
-20428024
 704b6700
 20402f20
 2040015b
@@ -25189,25 +25190,24 @@
 1fe0fe01
 1fe17e03
 6000cd9a
-c000002d
-c0010037
+c0010033
 20200196
 2040028e
 68024c93
 60024c84
 6800cdaa
 6000cc67
-20400035
+20400031
 6008cdaa
 20600000
 2040019b
 2020010a
-7041de20
+7041de04
 68024da1
 60024c84
 6800cdab
 6000cc67
-20400035
+20400031
 6008cdab
 20600000
-00002796
+00009e2f
Index: output/zcode.rom
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/zcode.rom	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/zcode.rom	(working copy)
@@ -1,6 +1,7 @@
 20200040
 6800cda7
 c000add4
+20400196
 70119eff
 6800cc5d
 6000919f
@@ -11,13 +12,13 @@
 204001b8
 204001bc
 2040015e
-242c0026
-24378026
+242c0023
+24378023
 20400184
 68024c84
 680a4da1
 98467c00
-20228016
+20228017
 6800cc5a
 c1840000
 704dac00
@@ -26,10 +27,6 @@
 680a4c68
 98467c00
 202281a8
-68024c84
-680a4c93
-98467c00
-20428024
 704b6700
 20402f20
 2040015b
@@ -40,28 +37,31 @@
 1fe0fe01
 1fe17e03
 6000cd9a
-c000002d
-c0010037
+c0010033
 20200196
 2040028e
 68024c93
 60024c84
 6800cdaa
 6000cc67
-20400035
+20400031
 6008cdaa
 20600000
 2040019b
 2020010a
-7041de20
+7041de04
 68024da1
 60024c84
 6800cdab
 6000cc67
-20400035
+20400031
 6008cdab
 20600000
 00000000
+00000000
+00000000
+00000000
+00000000
 20200040
 c0588006
 c059000c
@@ -353,10 +353,6 @@
 704721ff
 202002dd
 2040070c
-6800c241
-c28101af
-20400340
-203401b1
 79200026
 6800cdac
 79207e02
@@ -382,6 +378,10 @@
 00000000
 00000000
 00000000
+00000000
+00000000
+00000000
+00000000
 20200040
 c0300005
 c0308018
@@ -471,6 +471,7 @@
 6801cbae
 6001c4a3
 20400298
+20400033
 20403418
 68014687
 600146ac
@@ -482,7 +483,7 @@
 204043ca
 6800c092
 2feffe01
-2040802b
+2040802c
 6800c092
 2feffe00
 2040fddd
@@ -496,14 +497,13 @@
 d8c04b12
 2040055b
 20207df4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
+70409241
+6800c720
+c0010038
+70409242
+20600000
+70409241
+20600000
 00000000
 00000000
 00000000
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/patch.prog	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/patch.prog	(working copy)
@@ -652,7 +652,7 @@
 	branch memcpy
 
 p_g24_pair_init:
-	jam TX_POWER_f5DB,mem_tx_power
+	jam TX_POWER_PAIR,mem_tx_power
 	jam 0,mem_24g_pid
 	jam G24_PAIR_CH,mem_24g_ch
 	fetch 4,mem_24g_paring_addr
@@ -1145,7 +1145,7 @@
 	bbit1 2,p_mouse_check_reconn_target
 ifdef G24
 	call p_mouse_check_key_gpio
-	beq MOUSE_LR_BUTTON,p_mouse_24g_pairing_button
+	beq MOUSE_RM_BUTTON,p_mouse_24g_pairing_button
 endif	
 p_mouse_check_reconn_target:
 	jam ZCODE_01,mem_zcode_temp_param0
@@ -2390,14 +2390,14 @@
 	sub pdata,MOUSE_DPI_LEVEL2,null
 	call p_mouse_3205_dpi_recount,zero
 	fetch 1,mem_mouse_dpi
-	beq MOUSE_DPI_LEVEL1,mouse_set_p3212_cpi2		//1000
-	beq MOUSE_DPI_LEVEL4,mouse_set_p3212_cpi4		//2400
-	branch mouse_set_p3212_cpi3						//1600
+	beq MOUSE_DPI_LEVEL1,mouse_set_p3212_cpi1		//800
+	beq MOUSE_DPI_LEVEL4,mouse_set_p3212_cpi3		//1600
+	branch mouse_set_p3212_cpi2						//1200
 */
 p_mouse_3205_dpi_recount:
 	jam MOUSE_DPI_LEVEL3,mem_mouse_dpi
 	rtn	
-	
+
 p_mouse_seting_3065XY_dpi:
 	fetch 1,mem_mouse_dpi
 	sub pdata,MOUSE_DPI_LEVEL2,null
@@ -3517,10 +3517,15 @@
 //	rtn
 		
 p_set_tx_power_pair:	//50-100cm distance
-//	jam 0xba,0x894b
- 	jam 0xc2,0x8956
+	jam 0xba,0x894b
+	jam 0xc2,0x8956
  	jam 0xd0,0x8955
-	rtn	
+ //	jam 0xd0,0x8955
+ //	jam 0xe3,0x8956
+ //	jam 0x08,0x8957
+ //	jam 0x68,0x8958
+ //	jam 0xd0,0x8959
+	rtn
 
 p_shutdown_radio:
 	force 8,radio_ctrl
Index: program/z.prog
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/z.prog	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/z.prog	(working copy)
@@ -383,7 +383,7 @@
 	store 3,mem_le_lap+3
 	call p_mouse_le_fast_conn_disable
 endif
-//	call z_mem_device_option_set
+	call z_mem_device_option_set
 	call app_lpm_mult_disable
 	fetch 2,mem_discovery_timeout
 	store 2,mem_mouse_discovery_timer
@@ -414,13 +414,15 @@
 	call p_le_adv_data_update
 	branch check_51cmd_adv
 
-//z_mem_device_option_set:
-//	jam 0x41,mem_device_option
-//	fetch 1,mem_device_flag
-//	rtneq MODE_BT_DEVICE2
-//	jam 0x42,mem_device_option
-//	rtn
-
+z_mem_device_option_set:
+	jam 0x41,mem_device_option
+	fetch 1,mem_device_flag
+	beq MODE_BT_DEVICE2,p_mouse_set_bt_mode
+	jam 0x42,mem_device_option
+	rtn
+p_mouse_set_bt_mode:
+	jam 0x41,mem_device_option
+	rtn
 	
 
 org 0x70001
@@ -527,11 +529,11 @@
 	
 z_mouse_start_24g_mode:
 	call p_mouse_mode_24g_device_multi_led_on
-	fetch 1,mem_power_on_flag
-	bbit1 2,p_g24_start_24g_mode	//hibernate goto reconn	
+//	fetch 1,mem_power_on_flag
+//	bbit1 2,p_g24_start_24g_mode	//hibernate goto reconn	
 z_mouse_start_24g_reconn_check:
-	call p_g24_factory_check
-	branch p_g24_auto_pair_start,user
+//	call p_g24_factory_check
+//	branch p_g24_auto_pair_start,user
 	set1 mark_24g,mark
 	fetch 1,mem_24g_conn_sm
 	set1 STATE_24G_RECONN,pdata
@@ -890,6 +892,7 @@
 z_g24_pair_dispatch:
 	fetch 1,mem_24g_stop_g24_mode
 	beq 1,g24_stop_24g_mode
+	call p_g24_pair_init
 	jam 0xff,mem_24g_common_temp
 	fetch 1,mem_24g_data_type
 	store 1,mem_24g_common_temp+1
@@ -919,10 +922,12 @@
 	fetcht 4,mem_24g_paring_addr
 	isub temp,null
 	branch p_g24_start_pairing_sm1,zero
+/*
 	fetch 4,mem_24g_addr
 	fetcht 4,mem_24g_device_addr
 	isub temp,null
 	call z7_g24_store_dongle_addr,zero
+*/
 	jam 0,mem_mouse_long_mult_flag
 	call g24_app_tx_attempt_success
 	call p_g24_txbuf_clear
@@ -938,7 +943,7 @@
 	increase 1,pdata
 	and_into 3,pdata
 	store 1,mem_24g_auto_paring_switch
-	beq 0,z_g24_auto_pair_first_attemp
+//	beq 0,z_g24_auto_pair_first_attemp
 	beq 2,z_g24_auto_pair_all_powerful
 	branch p_g24_pair_init
 
@@ -957,7 +962,7 @@
 	branch p_g24_ch
 
 z_g24_auto_pair_all_powerful:
-	jam TX_POWER_PAIR,mem_tx_power
+	jam TX_POWER_f5DB,mem_tx_power
 	fetch 4,mem_24g_allpowerful_addr
 	store 4,mem_24g_addr
 	fetch 1,mem_24g_powerful_current_ch_num
Index: sched/mouse.dat
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/sched/mouse.dat	(revision 6855)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/sched/mouse.dat	(working copy)
@@ -62,7 +62,7 @@
 mem_app_connection_options:06
 mem_lap:26 10 19 20 18 10
 mem_local_name_length:
-'BT3.0 Mouse
+'Ergo RGB1
 mem_sniff_param_interval:
 0e 00 			##mem_sniff_param_interval:0e 00 report 115hz,0c 00 report 125hz	
 01 00 ##mem_sniff_param_attempt:01 00
@@ -99,17 +99,17 @@
 #microsoft swift pair
 06 ff 06 00 03 00 80
 #name
-'\09BT5.0 Mouse
+'\09Ergo RGB2
 
 mem_le_scan_data_len:1f
 mem_le_scan_data:
 #name
-'\09BT5.0 Mouse
+'\09Ergo RGB2
 
 
 #max 20bytes, att list data rom limits
 mem_le_name_len:
-'BT5.0 Mouse
+'Ergo RGB2
 
 
 mem_le_interval_min:
@@ -158,7 +158,7 @@
 #4c 01#mem_mouse_vdd_00_vol
 
 mem_config_sensor_type:00
-02 #mem_config_sensor_motion:01
+03 #mem_config_sensor_motion:01
 03 #mem_lbutton_gpio:16
 07 #mem_rbutton_gpio:14
 02 #mem_mbutton_gpio:15
@@ -179,7 +179,7 @@
 18 #mem_sensor_data_gpio:0c
 ff #mem_dpi_led_gpio:01
 b0 #mem_config_function_enable
-02 #mem_config_sensor_angle
+03 #mem_config_sensor_angle
 ff #mem_select_sensor_angle_gpio
 ff #mem_select_adc_gpio
 
@@ -209,7 +209,7 @@
 04##mem_320x_dpi_4
 
 15##mem_3212_dpi_1#800
-1a##mem_3212_dpi_2#1000
+20##mem_3212_dpi_2#1200
 2a##mem_3212_dpi_3#1600
 3f##mem_3212_dpi_4#2400
 
