Index: output/flash.dat
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/flash.dat	(revision 6172)
+++ /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
+ee
 1f
 20
 20
@@ -55,7 +55,7 @@
 20
 40
 07
-9b
+9e
 20
 40
 00
@@ -71,7 +71,7 @@
 20
 20
 07
-6a
+6d
 58
 00
 03
@@ -279,7 +279,7 @@
 c0
 42
 87
-68
+6b
 c0
 44
 87
@@ -679,7 +679,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -687,7 +687,7 @@
 20
 20
 07
-6a
+6d
 20
 40
 02
@@ -1631,7 +1631,7 @@
 70
 41
 de
-04
+20
 70
 4c
 5b
@@ -1719,7 +1719,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -1727,7 +1727,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -1735,7 +1735,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -1743,7 +1743,7 @@
 20
 20
 07
-6a
+6d
 79
 3f
 80
@@ -2619,7 +2619,7 @@
 20
 20
 07
-6a
+6d
 68
 00
 cd
@@ -2695,7 +2695,7 @@
 20
 20
 07
-6a
+6d
 70
 47
 9e
@@ -3311,7 +3311,7 @@
 20
 20
 07
-6a
+6d
 58
 00
 00
@@ -3995,7 +3995,7 @@
 20
 20
 07
-6a
+6d
 70
 0a
 99
@@ -4011,7 +4011,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -4019,7 +4019,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -4027,7 +4027,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -4035,7 +4035,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -4043,7 +4043,7 @@
 20
 20
 07
-6a
+6d
 70
 4b
 cf
@@ -4071,7 +4071,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -4079,7 +4079,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -4087,7 +4087,7 @@
 20
 20
 07
-6a
+6d
 20
 40
 04
@@ -4103,7 +4103,7 @@
 20
 20
 07
-6a
+6d
 70
 4b
 cf
@@ -4127,7 +4127,7 @@
 20
 20
 07
-6a
+6d
 68
 00
 cb
@@ -5239,11 +5239,11 @@
 24
 34
 07
-9b
+9e
 20
 40
 07
-8b
+8e
 20
 40
 05
@@ -5479,7 +5479,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -5487,7 +5487,7 @@
 20
 20
 07
-6a
+6d
 d8
 a0
 43
@@ -5603,7 +5603,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -5611,7 +5611,7 @@
 20
 20
 07
-6a
+6d
 68
 00
 84
@@ -6279,7 +6279,7 @@
 20
 20
 07
-6a
+6d
 20
 40
 21
@@ -6399,7 +6399,7 @@
 20
 20
 07
-6a
+6d
 68
 00
 80
@@ -6695,7 +6695,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -6703,7 +6703,7 @@
 20
 20
 07
-6a
+6d
 68
 00
 85
@@ -6791,7 +6791,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -6799,7 +6799,7 @@
 20
 20
 07
-6a
+6d
 70
 11
 c5
@@ -6807,7 +6807,7 @@
 20
 20
 07
-6a
+6d
 70
 4b
 03
@@ -7578,11 +7578,23 @@
 00
 70
 89
+55
+90
+70
+89
 56
-c2
+e3
 70
 89
-55
+57
+08
+70
+89
+58
+68
+70
+89
+59
 d0
 20
 60
@@ -7615,7 +7627,7 @@
 20
 22
 87
-89
+8c
 60
 08
 cb
@@ -7691,7 +7703,7 @@
 24
 22
 87
-7a
+7d
 20
 40
 02
@@ -7747,7 +7759,7 @@
 20
 40
 07
-f0
+f3
 1f
 e2
 22
@@ -7763,7 +7775,7 @@
 20
 40
 07
-f0
+f3
 1f
 e2
 24
@@ -7775,7 +7787,7 @@
 20
 40
 07
-e3
+e6
 58
 00
 00
@@ -7783,7 +7795,7 @@
 20
 40
 07
-e9
+ec
 68
 00
 cb
@@ -7791,7 +7803,7 @@
 c0
 00
 87
-9e
+a1
 df
 20
 00
@@ -7851,7 +7863,7 @@
 20
 40
 07
-bf
+c2
 68
 01
 11
@@ -7887,7 +7899,7 @@
 20
 40
 07
-b8
+bb
 68
 01
 11
@@ -7947,7 +7959,7 @@
 20
 20
 87
-c9
+cc
 68
 00
 91
@@ -7955,7 +7967,7 @@
 c0
 7f
 87
-d0
+d3
 68
 00
 91
@@ -7983,7 +7995,7 @@
 c0
 00
 07
-cd
+d0
 68
 01
 91
@@ -7991,7 +8003,7 @@
 20
 20
 07
-c5
+c8
 70
 11
 c4
@@ -8003,7 +8015,7 @@
 20
 20
 07
-c5
+c8
 68
 00
 91
@@ -8011,7 +8023,7 @@
 20
 40
 07
-db
+de
 60
 00
 91
@@ -8023,7 +8035,7 @@
 20
 3a
 07
-d9
+dc
 58
 00
 00
@@ -8047,7 +8059,7 @@
 20
 20
 07
-d6
+d9
 1f
 e6
 7e
@@ -8087,7 +8099,7 @@
 24
 21
 07
-ee
+f1
 9a
 46
 7c
@@ -8095,7 +8107,7 @@
 24
 21
 07
-ee
+f1
 70
 4b
 0d
@@ -8123,7 +8135,7 @@
 20
 20
 07
-e7
+ea
 70
 4b
 0d
@@ -8139,7 +8151,7 @@
 c0
 7f
 87
-f5
+f8
 68
 00
 91
@@ -8163,9 +8175,9 @@
 20
 20
 07
-f3
-2d
-27
+f6
+91
+9a
 aa
 55
 08
@@ -9276,7 +9288,7 @@
 00
 57
 4b
-4d
+59
 31
 00
 55
@@ -9298,6 +9310,10 @@
 00
 ad
 d4
+20
+40
+01
+96
 70
 11
 9e
@@ -9341,11 +9357,11 @@
 24
 2c
 00
-26
+23
 24
 37
 80
-26
+23
 20
 40
 01
@@ -9365,7 +9381,7 @@
 20
 22
 80
-16
+17
 68
 00
 cc
@@ -9398,22 +9414,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 +9455,9 @@
 cd
 9a
 c0
-00
-00
-2d
-c0
 01
 00
-37
+33
 20
 20
 01
@@ -9489,7 +9485,7 @@
 20
 40
 00
-35
+31
 60
 08
 cd
@@ -9509,7 +9505,7 @@
 70
 41
 de
-20
+04
 68
 02
 4d
@@ -9529,7 +9525,7 @@
 20
 40
 00
-35
+31
 60
 08
 cd
@@ -9542,6 +9538,22 @@
 00
 00
 00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
 20
 20
 00
@@ -12618,5 +12630,5 @@
 55
 00
 00
-45
-0c
+0f
+44
Index: output/program.lis
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/program.lis	(revision 6172)
+++ /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 2040079e 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 2020076d 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 c042876b 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 2020076d branch p_zcode_entrance 
 
 p_g24_reconn_dispatch:
 00a9 7011c570 jam zcode_70 ,mem_zcode_temp_param0 
-00aa 2020076a branch p_zcode_entrance 
+00aa 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d branch p_zcode_entrance 
 
 p_g24_check_51cmd_stop_24g:
 01b3 793f8026 set0 mark_24g ,mark 
@@ -857,7 +857,7 @@
 
 p_mouse_check_reconn_target:
 028c 7011c501 jam zcode_01 ,mem_zcode_temp_param0 
-028d 2020076a branch p_zcode_entrance 
+028d 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2434079e nbranch p_drawing_optima_init ,user 
+051d 2040078e 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 2020076d branch p_zcode_entrance 
 
 p_mouse_start_discovery:
 0559 7011c550 jam zcode_50 ,mem_zcode_temp_param0 
-055a 2020076a branch p_zcode_entrance 
+055a 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d 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 2020076d branch p_zcode_entrance 
 
 p_hid_rx_process:
 0689 7011c511 jam zcode_11 ,mem_zcode_temp_param0 
-068a 2020076a branch p_zcode_entrance 
+068a 2020076d 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 2020076d branch p_zcode_entrance 
 
 p_send_lmp_accepted:
 06a1 7011c521 jam zcode_21 ,mem_zcode_temp_param0 
-06a2 2020076a branch p_zcode_entrance 
+06a2 2020076d branch p_zcode_entrance 
 
 p_send_lmp_detach:
 06a3 7011c522 jam zcode_22 ,mem_zcode_temp_param0 
-06a4 2020076a branch p_zcode_entrance 
+06a4 2020076d branch p_zcode_entrance 
 
 p_send_lmp_setup_complete:
 06a5 704b0301 jam 1 ,mem_bt_send_lmp_setup_complete 
@@ -2631,199 +2631,202 @@
 0764 20600000 rtn 
 
 p_set_tx_power_pair:
-0765 708956c2 jam 0xc2 ,0x8956 
-0766 708955d0 jam 0xd0 ,0x8955 
-0767 20600000 rtn 
+0765 70895590 jam 0x90 ,0x8955 
+0766 708956e3 jam 0xe3 ,0x8956 
+0767 70895708 jam 0x08 ,0x8957 
+0768 70895868 jam 0x68 ,0x8958 
+0769 708959d0 jam 0xd0 ,0x8959 
+076a 20600000 rtn 
 
 p_shutdown_radio:
-0768 18002a08 force 8 ,radio_ctrl 
-0769 202028fa branch shutdown_radio + 1 
+076b 18002a08 force 8 ,radio_ctrl 
+076c 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 
+076d 680891c5 fetcht 1 ,mem_zcode_temp_param0 
+076e 18518400 rshift4 temp ,temp 
+076f 6800cb56 fetch 1 ,mem_zcode_current_number 
+0770 98467c00 isub temp ,null 
+0771 2022878c branch p_zcode_run ,zero 
+0772 6008cb56 storet 1 ,mem_zcode_current_number 
+0773 18408401 increase 1 ,temp 
+0774 58000100 setarg zcode_buff_size 
+0775 984f8400 imul32 temp ,temp 
+0776 6801cb57 fetch 3 ,mem_xip_flash_offset 
+0777 98467e00 isub temp ,pdata 
+0778 6809cb5a fetcht 3 ,mem_flash_start_addr 
+0779 9840fe00 iadd temp ,pdata 
+077a 1fe0fffb increase -5 ,pdata 
+077b 6001cb5d store 3 ,mem_flash_address 
+077c 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 
+077d 6801cb5d fetch 3 ,mem_flash_address 
+077e d8400100 arg zcode_buff_size ,temp 
+077f da201f00 arg mem_zcode_buff ,rega 
+0780 20406562 call spid_read_flash 
+0781 68021f00 fetch 4 ,mem_zcode_buff 
+0782 680a4b60 fetcht 4 ,mem_zcode_head 
+0783 98467c00 isub temp ,null 
+0784 2422877d nbranch p_zcode_read_loop ,zero 
+0785 204002f9 call p_mouse_spi_init 
+0786 58001f00 setarg mem_zcode_buff 
+0787 60014199 store 2 ,mem_patch_ptr 
+0788 70419b40 jam zcode_code_size ,mem_patch_len 
+0789 204064ca call load_ucode 
+078a 58000000 setarg 0 
+078b 60024199 store 4 ,mem_patch_ptr 
 
 p_zcode_run:
-0789 680091c5 fetch 1 ,mem_zcode_temp_param0 
-078a 20200001 branch p_zcode 
+078c 680091c5 fetch 1 ,mem_zcode_temp_param0 
+078d 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 
+078e 6802469b fetch 4 ,mem_mouse_x 
+078f 207a0000 rtn blank 
+0790 6801469b fetch 2 ,mem_mouse_x 
+0791 600111c0 store 2 ,mem_data_current 
+0792 204007f3 call p_data_abs 
+0793 1fe22200 copy pdata ,rega 
+0794 6801469d fetch 2 ,mem_mouse_y 
+0795 600111c0 store 2 ,mem_data_current 
+0796 204007f3 call p_data_abs 
+0797 1fe22400 copy pdata ,regb 
+0798 58000006 setarg 0x06 
+0799 204007e6 call p_data_greater_than_check 
+079a 58000003 setarg 0x03 
+079b 204007ec call p_data_less_than_check 
+079c 6800cb0d fetch 1 ,mem_mouse_asm_flag 
+079d c00087a1 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 
+079e df200005 arg 5 ,loopcnt 
+079f d8a04b0d arg mem_mouse_asm_flag ,contw 
+07a0 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 
+07a1 68014b0e fetch 2 ,mem_mouse_x_pre 
+07a2 600111be store 2 ,mem_data_pre 
+07a3 6801469b fetch 2 ,mem_mouse_x 
+07a4 600111c0 store 2 ,mem_data_current 
+07a5 680111be fetch 2 ,mem_data_pre 
+07a6 680911c0 fetcht 2 ,mem_data_current 
+07a7 9840fe00 iadd temp ,pdata 
+07a8 6808cbb4 fetcht 1 ,mem_mouse_data_xtemp 
+07a9 9840fe00 iadd temp ,pdata 
+07aa 1fe10401 and pdata ,0x01 ,temp 
+07ab 6008cbb4 storet 1 ,mem_mouse_data_xtemp 
+07ac 204007c2 call p_drawing_optima_data 
+07ad 680111be fetch 2 ,mem_data_pre 
+07ae 60014b0e store 2 ,mem_mouse_x_pre 
+07af 680111c0 fetch 2 ,mem_data_current 
+07b0 6001469b store 2 ,mem_mouse_x 
+07b1 68014b10 fetch 2 ,mem_mouse_y_pre 
+07b2 600111be store 2 ,mem_data_pre 
+07b3 6801469d fetch 2 ,mem_mouse_y 
+07b4 600111c0 store 2 ,mem_data_current 
+07b5 204007bb call p_drawing_optima_data_y 
+07b6 680111be fetch 2 ,mem_data_pre 
+07b7 60014b10 store 2 ,mem_mouse_y_pre 
+07b8 680111c0 fetch 2 ,mem_data_current 
+07b9 6001469d store 2 ,mem_mouse_y 
+07ba 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 
+07bb 680111be fetch 2 ,mem_data_pre 
+07bc 680911c0 fetcht 2 ,mem_data_current 
+07bd 9840fe00 iadd temp ,pdata 
+07be 6808cbb5 fetcht 1 ,mem_mouse_data_ytemp 
+07bf 9840fe00 iadd temp ,pdata 
+07c0 1fe10401 and pdata ,0x01 ,temp 
+07c1 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 
+07c2 600191c2 store 3 ,mem_data_sum 
+07c3 2feffe10 isolate1 16 ,pdata 
+07c4 202087cc branch p_data_sum_overflow ,true 
+07c5 680091c3 fetch 1 ,mem_data_sum + 1 
+07c6 c07f87d3 beq 0xff ,p_data_sum_n 
+07c7 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 
+07c8 1fe37e00 rshift pdata ,pdata 
+07c9 600111be store 2 ,mem_data_pre 
+07ca 600111c0 store 2 ,mem_data_current 
+07cb 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 
+07cc 680091c3 fetch 1 ,mem_data_sum + 1 
+07cd c00007d0 beq 0 ,p_data_sum_overflow_p 
+07ce 680191c2 fetch 3 ,mem_data_sum 
+07cf 202007c8 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 
+07d0 7011c400 jam 0 ,mem_data_sum + 2 
+07d1 680091c2 fetch 1 ,mem_data_sum 
+07d2 202007c8 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 
+07d3 680091c2 fetch 1 ,mem_data_sum 
+07d4 204007de call p_pdata_get_half 
+07d5 600091be store 1 ,mem_data_pre 
+07d6 600091c0 store 1 ,mem_data_current 
+07d7 203a07dc branch p_data_zero ,blank 
+07d8 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 
+07d9 600091bf store 1 ,mem_data_pre + 1 
+07da 600091c1 store 1 ,mem_data_current + 1 
+07db 20600000 rtn 
 
 p_data_zero:
-07d9 58000000 setarg 0 
-07da 202007d6 branch p_data_set_direction 
+07dc 58000000 setarg 0 
+07dd 202007d9 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 
+07de 1fe67e00 sub pdata ,0 ,pdata 
 07df 60008aae store 1 ,mem_rega 
 07e0 68008aae fetch 1 ,mem_rega 
-07e1 1fe67e00 sub pdata ,0 ,pdata 
-07e2 20600000 rtn 
+07e1 1fe37e00 rshift pdata ,pdata 
+07e2 60008aae store 1 ,mem_rega 
+07e3 68008aae fetch 1 ,mem_rega 
+07e4 1fe67e00 sub pdata ,0 ,pdata 
+07e5 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 
+07e6 9a267c00 isub rega ,null 
+07e7 242107f1 nbranch p_enable_asm ,positive 
+07e8 9a467c00 isub regb ,null 
+07e9 242107f1 nbranch p_enable_asm ,positive 
 
 p_disable_asm:
-07e7 704b0d00 jam 0 ,mem_mouse_asm_flag 
-07e8 20600000 rtn 
+07ea 704b0d00 jam 0 ,mem_mouse_asm_flag 
+07eb 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 
+07ec 9a267c00 isub rega ,null 
+07ed 24610000 nrtn positive 
+07ee 9a467c00 isub regb ,null 
+07ef 24610000 nrtn positive 
+07f0 202007ea branch p_disable_asm 
 
 p_enable_asm:
-07ee 704b0d01 jam 1 ,mem_mouse_asm_flag 
-07ef 20600000 rtn 
+07f1 704b0d01 jam 1 ,mem_mouse_asm_flag 
+07f2 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 
+07f3 680091c1 fetch 1 ,mem_data_current + 1 
+07f4 c07f87f8 beq 0xff ,p_data_reversal 
+07f5 680091c0 fetch 1 ,mem_data_current 
 
 p_data_abs_store:
-07f3 1fe17eff and_into 0xff ,pdata 
-07f4 20600000 rtn 
+07f6 1fe17eff and_into 0xff ,pdata 
+07f7 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 
+07f8 680111c0 fetch 2 ,mem_data_current 
+07f9 1fe67e00 sub pdata ,0 ,pdata 
+07fa 202007f6 branch p_data_abs_store 
               org 0x2000
 
 start:
@@ -36230,78 +36233,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 6172)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/romcode.rom	(working copy)
@@ -25150,6 +25150,7 @@
 202041d9
 6800cda7
 c000add4
+20400196
 70119eff
 6800cc5d
 6000919f
@@ -25160,13 +25161,13 @@
 204001b8
 204001bc
 2040015e
-242c0026
-24378026
+242c0023
+24378023
 20400184
 68024c84
 680a4da1
 98467c00
-20228016
+20228017
 6800cc5a
 c1840000
 704dac00
@@ -25175,10 +25176,6 @@
 680a4c68
 98467c00
 202281a8
-68024c84
-680a4c93
-98467c00
-20428024
 704b6700
 20402f20
 2040015b
@@ -25189,25 +25186,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
+00000b03
Index: output/zcode.rom
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/zcode.rom	(revision 6172)
+++ /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
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/patch.prog	(revision 6172)
+++ /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
@@ -3517,9 +3517,15 @@
 //	rtn
 		
 p_set_tx_power_pair:	//50-100cm distance
-//	jam 0xba,0x894b
- 	jam 0xc2,0x8956
- 	jam 0xd0,0x8955
+//	jam 0xba,0x894b		//1.4m		-35db
+//	jam 0xc2,0x8956
+//	jam 0x80,0x8955
+
+	jam 0x90,0x8955		//30-50cm	   d0:-40db	c0:-48db   b0:-50db		80:-60db
+ 	jam 0xe3,0x8956
+ 	jam 0x08,0x8957
+ 	jam 0x68,0x8958
+ 	jam 0xd0,0x8959
 	rtn	
 
 p_shutdown_radio:
Index: program/z.prog
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/z.prog	(revision 6172)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/z.prog	(working copy)
@@ -890,6 +890,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 +920,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 +941,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 +960,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
