Index: output/flash.dat
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/flash.dat	(revision 6884)
+++ /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
-e6
+ee
 1f
 20
 20
@@ -55,7 +55,7 @@
 20
 40
 07
-9c
+9e
 20
 40
 00
@@ -71,7 +71,7 @@
 20
 20
 07
-6b
+6d
 58
 00
 03
@@ -279,7 +279,7 @@
 c0
 42
 87
-69
+6b
 c0
 44
 87
@@ -679,7 +679,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -687,7 +687,7 @@
 20
 20
 07
-6b
+6d
 20
 40
 02
@@ -1719,7 +1719,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -1727,7 +1727,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -1735,7 +1735,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -1743,7 +1743,7 @@
 20
 20
 07
-6b
+6d
 79
 3f
 80
@@ -2619,7 +2619,7 @@
 20
 20
 07
-6b
+6d
 68
 00
 cd
@@ -2695,7 +2695,7 @@
 20
 20
 07
-6b
+6d
 70
 47
 9e
@@ -3311,7 +3311,7 @@
 20
 20
 07
-6b
+6d
 58
 00
 00
@@ -3995,7 +3995,7 @@
 20
 20
 07
-6b
+6d
 70
 0a
 99
@@ -4011,7 +4011,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -4019,7 +4019,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -4027,7 +4027,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -4035,7 +4035,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -4043,7 +4043,7 @@
 20
 20
 07
-6b
+6d
 70
 4b
 cf
@@ -4071,7 +4071,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -4079,7 +4079,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -4087,7 +4087,7 @@
 20
 20
 07
-6b
+6d
 20
 40
 04
@@ -4103,7 +4103,7 @@
 20
 20
 07
-6b
+6d
 70
 4b
 cf
@@ -4127,7 +4127,7 @@
 20
 20
 07
-6b
+6d
 68
 00
 cb
@@ -5239,11 +5239,11 @@
 24
 34
 07
-9c
+9e
 20
 40
 07
-8c
+8e
 20
 40
 05
@@ -5479,7 +5479,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -5487,7 +5487,7 @@
 20
 20
 07
-6b
+6d
 d8
 a0
 43
@@ -5603,7 +5603,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -5611,7 +5611,7 @@
 20
 20
 07
-6b
+6d
 68
 00
 84
@@ -6279,7 +6279,7 @@
 20
 20
 07
-6b
+6d
 20
 40
 21
@@ -6399,7 +6399,7 @@
 20
 20
 07
-6b
+6d
 68
 00
 80
@@ -6695,7 +6695,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -6703,7 +6703,7 @@
 20
 20
 07
-6b
+6d
 68
 00
 85
@@ -6791,7 +6791,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -6799,7 +6799,7 @@
 20
 20
 07
-6b
+6d
 70
 11
 c5
@@ -6807,7 +6807,7 @@
 20
 20
 07
-6b
+6d
 70
 4b
 03
@@ -7578,15 +7578,23 @@
 00
 70
 89
-4b
-ba
+55
+b0
 70
 89
 56
-c2
+e3
 70
 89
-55
+57
+08
+70
+89
+58
+68
+70
+89
+59
 d0
 20
 60
@@ -7619,7 +7627,7 @@
 20
 22
 87
-8a
+8c
 60
 08
 cb
@@ -7695,7 +7703,7 @@
 24
 22
 87
-7b
+7d
 20
 40
 02
@@ -7751,7 +7759,7 @@
 20
 40
 07
-f1
+f3
 1f
 e2
 22
@@ -7767,7 +7775,7 @@
 20
 40
 07
-f1
+f3
 1f
 e2
 24
@@ -7779,7 +7787,7 @@
 20
 40
 07
-e4
+e6
 58
 00
 00
@@ -7787,7 +7795,7 @@
 20
 40
 07
-ea
+ec
 68
 00
 cb
@@ -7795,7 +7803,7 @@
 c0
 00
 87
-9f
+a1
 df
 20
 00
@@ -7855,7 +7863,7 @@
 20
 40
 07
-c0
+c2
 68
 01
 11
@@ -7891,7 +7899,7 @@
 20
 40
 07
-b9
+bb
 68
 01
 11
@@ -7951,7 +7959,7 @@
 20
 20
 87
-ca
+cc
 68
 00
 91
@@ -7959,7 +7967,7 @@
 c0
 7f
 87
-d1
+d3
 68
 00
 91
@@ -7987,7 +7995,7 @@
 c0
 00
 07
-ce
+d0
 68
 01
 91
@@ -7995,7 +8003,7 @@
 20
 20
 07
-c6
+c8
 70
 11
 c4
@@ -8007,7 +8015,7 @@
 20
 20
 07
-c6
+c8
 68
 00
 91
@@ -8015,7 +8023,7 @@
 20
 40
 07
-dc
+de
 60
 00
 91
@@ -8027,7 +8035,7 @@
 20
 3a
 07
-da
+dc
 58
 00
 00
@@ -8051,7 +8059,7 @@
 20
 20
 07
-d7
+d9
 1f
 e6
 7e
@@ -8091,7 +8099,7 @@
 24
 21
 07
-ef
+f1
 9a
 46
 7c
@@ -8099,7 +8107,7 @@
 24
 21
 07
-ef
+f1
 70
 4b
 0d
@@ -8127,7 +8135,7 @@
 20
 20
 07
-e8
+ea
 70
 4b
 0d
@@ -8143,7 +8151,7 @@
 c0
 7f
 87
-f6
+f8
 68
 00
 91
@@ -8167,9 +8175,9 @@
 20
 20
 07
-f4
-29
-01
+f6
+49
+5e
 aa
 55
 08
@@ -8430,8 +8438,8 @@
 00
 a0
 40
-26
 10
+20
 19
 20
 18
@@ -9272,14 +9280,14 @@
 00
 57
 4b
-49
+51
 31
 00
 55
 aa
 aa
 55
-1d
+17
 27
 ff
 20
@@ -10702,6 +10710,14 @@
 40
 07
 0c
+68
+02
+47
+7b
+60
+02
+4c
+84
 79
 20
 00
@@ -10810,14 +10826,6 @@
 00
 00
 00
-00
-00
-00
-00
-00
-00
-00
-00
 20
 20
 00
@@ -12614,5 +12622,5 @@
 55
 00
 00
-76
-4d
+64
+1f
Index: output/program.lis
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/program.lis	(revision 6884)
+++ /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 2040079c 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 2020076b 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 c0428769 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 2020076b branch p_zcode_entrance 
+00a8 2020076d branch p_zcode_entrance 
 
 p_g24_reconn_dispatch:
 00a9 7011c570 jam zcode_70 ,mem_zcode_temp_param0 
-00aa 2020076b branch p_zcode_entrance 
+00aa 2020076d branch p_zcode_entrance 
 
 p_g24_transmit_by_interrupt:
 00ab 2040022f call p_g24_timer_check 
@@ -570,21 +570,21 @@
 
 p_g24_pairing_sm:
 01ab 7011c590 jam zcode_90 ,mem_zcode_temp_param0 
-01ac 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2434079c nbranch p_drawing_optima_init ,user 
-051d 2040078c 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 2020076b branch p_zcode_entrance 
+0558 2020076d branch p_zcode_entrance 
 
 p_mouse_start_discovery:
 0559 7011c550 jam zcode_50 ,mem_zcode_temp_param0 
-055a 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b 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 2020076b branch p_zcode_entrance 
+0688 2020076d branch p_zcode_entrance 
 
 p_hid_rx_process:
 0689 7011c511 jam zcode_11 ,mem_zcode_temp_param0 
-068a 2020076b 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 2020076b branch p_zcode_entrance 
+06a0 2020076d branch p_zcode_entrance 
 
 p_send_lmp_accepted:
 06a1 7011c521 jam zcode_21 ,mem_zcode_temp_param0 
-06a2 2020076b branch p_zcode_entrance 
+06a2 2020076d branch p_zcode_entrance 
 
 p_send_lmp_detach:
 06a3 7011c522 jam zcode_22 ,mem_zcode_temp_param0 
-06a4 2020076b 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,200 +2631,202 @@
 0764 20600000 rtn 
 
 p_set_tx_power_pair:
-0765 70894bba jam 0xba ,0x894b 
-0766 708956c2 jam 0xc2 ,0x8956 
-0767 708955d0 jam 0xd0 ,0x8955 
-0768 20600000 rtn 
+0765 708955b0 jam 0xb0 ,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:
-0769 18002a08 force 8 ,radio_ctrl 
-076a 202028fa branch shutdown_radio + 1 
+076b 18002a08 force 8 ,radio_ctrl 
+076c 202028fa branch shutdown_radio + 1 
 
 p_zcode_entrance:
-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 
+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:
-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 
+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:
-078a 680091c5 fetch 1 ,mem_zcode_temp_param0 
-078b 20200001 branch p_zcode 
+078c 680091c5 fetch 1 ,mem_zcode_temp_param0 
+078d 20200001 branch p_zcode 
 
 p_drawing_optima:
-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 
+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:
-079c df200005 arg 5 ,loopcnt 
-079d d8a04b0d arg mem_mouse_asm_flag ,contw 
-079e 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:
-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 
+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 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 
+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:
-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 
+07bb 680111be fetch 2 ,mem_data_pre 
+07bc 680911c0 fetcht 2 ,mem_data_current 
 07bd 9840fe00 iadd temp ,pdata 
-07be 1fe10401 and pdata ,0x01 ,temp 
-07bf 6008cbb5 storet 1 ,mem_mouse_data_ytemp 
+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:
-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 
+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:
-07c6 1fe37e00 rshift pdata ,pdata 
-07c7 600111be store 2 ,mem_data_pre 
-07c8 600111c0 store 2 ,mem_data_current 
-07c9 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:
-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 
+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:
-07ce 7011c400 jam 0 ,mem_data_sum + 2 
-07cf 680091c2 fetch 1 ,mem_data_sum 
-07d0 202007c6 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:
-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 
+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:
-07d7 600091bf store 1 ,mem_data_pre + 1 
-07d8 600091c1 store 1 ,mem_data_current + 1 
-07d9 20600000 rtn 
+07d9 600091bf store 1 ,mem_data_pre + 1 
+07da 600091c1 store 1 ,mem_data_current + 1 
+07db 20600000 rtn 
 
 p_data_zero:
-07da 58000000 setarg 0 
-07db 202007d7 branch p_data_set_direction 
+07dc 58000000 setarg 0 
+07dd 202007d9 branch p_data_set_direction 
 
 p_pdata_get_half:
-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 
+07de 1fe67e00 sub pdata ,0 ,pdata 
+07df 60008aae store 1 ,mem_rega 
+07e0 68008aae fetch 1 ,mem_rega 
+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:
-07e4 9a267c00 isub rega ,null 
-07e5 242107ef nbranch p_enable_asm ,positive 
-07e6 9a467c00 isub regb ,null 
-07e7 242107ef 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:
-07e8 704b0d00 jam 0 ,mem_mouse_asm_flag 
-07e9 20600000 rtn 
+07ea 704b0d00 jam 0 ,mem_mouse_asm_flag 
+07eb 20600000 rtn 
 
 p_data_less_than_check:
-07ea 9a267c00 isub rega ,null 
-07eb 24610000 nrtn positive 
-07ec 9a467c00 isub regb ,null 
+07ec 9a267c00 isub rega ,null 
 07ed 24610000 nrtn positive 
-07ee 202007e8 branch p_disable_asm 
+07ee 9a467c00 isub regb ,null 
+07ef 24610000 nrtn positive 
+07f0 202007ea branch p_disable_asm 
 
 p_enable_asm:
-07ef 704b0d01 jam 1 ,mem_mouse_asm_flag 
-07f0 20600000 rtn 
+07f1 704b0d01 jam 1 ,mem_mouse_asm_flag 
+07f2 20600000 rtn 
 
 p_data_abs:
-07f1 680091c1 fetch 1 ,mem_data_current + 1 
-07f2 c07f87f6 beq 0xff ,p_data_reversal 
-07f3 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:
-07f4 1fe17eff and_into 0xff ,pdata 
-07f5 20600000 rtn 
+07f6 1fe17eff and_into 0xff ,pdata 
+07f7 20600000 rtn 
 
 p_data_reversal:
-07f6 680111c0 fetch 2 ,mem_data_current 
-07f7 1fe67e00 sub pdata ,0 ,pdata 
-07f8 202007f4 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:
@@ -35937,19 +35939,21 @@
 
 z_mouse_start_24g_mode:
 80022 2040070c call p_mouse_mode_24g_device_multi_led_on 
+80023 6802477b fetch 4 ,mem_mouse_24g_addr 
+80024 60024c84 store 4 ,mem_24g_addr 
 
 z_mouse_start_24g_reconn_check:
-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 
+80025 79200026 set1 mark_24g ,mark 
+80026 6800cdac fetch 1 ,mem_24g_conn_sm 
+80027 79207e02 set1 state_24g_reconn ,pdata 
+80028 6000cdac store 1 ,mem_24g_conn_sm 
+80029 2040019b call p_g24_syncword_crc8 
+8002a 2040010a call p_g24_ch 
 
 z_g24_reconn_timeout_init:
-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 
+8002b 5800001e setarg g24_reconn_nodata_timer 
+8002c 60014bb6 store 2 ,mem_g24_stop_g24_reconn_mode_timeout 
+8002d 2020033e branch p_g24_stop_g24_mode_set 
               org 0x90001
 
 z_entrance8:
Index: output/romcode.rom
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/romcode.rom	(revision 6884)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/romcode.rom	(working copy)
@@ -24927,6 +24927,8 @@
 704721ff
 202002dd
 2040070c
+6802477b
+60024c84
 79200026
 6800cdac
 79207e02
@@ -25210,4 +25212,4 @@
 20400031
 6008cdab
 20600000
-00009e2f
+00009a11
Index: output/zcode.rom
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/zcode.rom	(revision 6884)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/output/zcode.rom	(working copy)
@@ -353,6 +353,8 @@
 704721ff
 202002dd
 2040070c
+6802477b
+60024c84
 79200026
 6800cdac
 79207e02
@@ -380,8 +382,6 @@
 00000000
 00000000
 00000000
-00000000
-00000000
 20200040
 c0300005
 c0308018
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/patch.prog	(revision 6884)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/patch.prog	(working copy)
@@ -3517,14 +3517,15 @@
 //	rtn
 		
 p_set_tx_power_pair:	//50-100cm distance
-	jam 0xba,0x894b
-	jam 0xc2,0x8956
- 	jam 0xd0,0x8955
- //	jam 0xd0,0x8955
- //	jam 0xe3,0x8956
- //	jam 0x08,0x8957
- //	jam 0x68,0x8958
- //	jam 0xd0,0x8959
+//	jam 0xba,0x894b		//1.4m		-35db
+//	jam 0xc2,0x8956
+//	jam 0xd0,0x8955
+
+	jam 0xb0,0x8955		//30-50cm	   d0:-40db	c0:-48db   b0:-50db
+ 	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 6884)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/program/z.prog	(working copy)
@@ -530,7 +530,9 @@
 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	
+//	bbit1 2,p_g24_start_24g_mode	//hibernate goto reconn
+	fetch 4,mem_mouse_24g_addr
+	store 4,mem_24g_addr
 z_mouse_start_24g_reconn_check:
 //	call p_g24_factory_check
 //	branch p_g24_auto_pair_start,user
Index: sched/mouse.dat
===================================================================
--- /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/sched/mouse.dat	(revision 6884)
+++ /branch/mouse_project/YJX_Project/YJX_1066/PBSwitch_3mode_3ch_New_24M_ADC_117_G30BL/sched/mouse.dat	(working copy)
@@ -60,7 +60,7 @@
 41
 
 mem_app_connection_options:06
-mem_lap:26 10 19 20 18 10
+mem_lap:10 20 19 20 18 10
 mem_local_name_length:
 'Ergo RGB1
 mem_sniff_param_interval:
