Index: output/flash.dat
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/output/flash.dat	(revision 4609)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/output/flash.dat	(working copy)
@@ -99,7 +99,7 @@
 58
 00
 02
-77
+73
 60
 01
 41
@@ -339,7 +339,7 @@
 c0
 62
 02
-84
+80
 c0
 71
 85
@@ -655,7 +655,7 @@
 20
 40
 02
-7e
+7a
 58
 00
 f4
@@ -763,11 +763,11 @@
 20
 40
 02
-81
+7d
 20
 40
 02
-7e
+7a
 20
 40
 3e
@@ -1515,7 +1515,7 @@
 20
 40
 02
-35
+31
 18
 00
 2a
@@ -1547,7 +1547,7 @@
 20
 57
 82
-31
+2d
 20
 60
 00
@@ -2027,7 +2027,7 @@
 24
 2c
 02
-31
+2d
 78
 46
 fc
@@ -2047,7 +2047,7 @@
 20
 40
 02
-2e
+2a
 60
 00
 cf
@@ -2063,11 +2063,11 @@
 24
 22
 82
-31
+2d
 20
 40
 02
-2e
+2a
 60
 00
 cd
@@ -2087,11 +2087,11 @@
 24
 20
 82
-31
+2d
 20
 40
 02
-2e
+2a
 e0
 a0
 80
@@ -2111,7 +2111,7 @@
 20
 40
 02
-2e
+2a
 e0
 a0
 80
@@ -2127,7 +2127,7 @@
 20
 40
 02
-2e
+2a
 60
 00
 cf
@@ -2167,31 +2167,15 @@
 20
 23
 02
-31
+2d
 78
 37
 fc
 00
-68
-00
-80
-17
-1f
-e0
-a2
-00
-20
-40
-29
-81
-78
-46
-fc
-00
 20
 40
-29
-18
+54
+ba
 68
 00
 cf
@@ -2371,7 +2355,7 @@
 c2
 00
 02
-4d
+49
 78
 24
 7c
@@ -2487,7 +2471,7 @@
 c2
 00
 02
-6a
+66
 18
 49
 7e
@@ -2547,7 +2531,7 @@
 c3
 00
 02
-7e
+7a
 68
 00
 80
@@ -2618,8 +2602,12 @@
 01
 20
 40
+02
+8e
+20
 40
-83
+05
+39
 c0
 01
 82
@@ -2632,6 +2620,18 @@
 20
 07
 7a
+58
+03
+03
+03
+60
+01
+cd
+ee
+20
+60
+00
+00
 70
 47
 9f
@@ -5935,7 +5935,7 @@
 20
 40
 02
-24
+20
 20
 20
 54
@@ -6695,7 +6695,7 @@
 20
 40
 02
-24
+20
 20
 20
 25
@@ -7307,7 +7307,7 @@
 20
 40
 02
-67
+63
 60
 08
 cf
@@ -8196,8 +8196,8 @@
 20
 07
 fb
-cf
-22
+3f
+43
 aa
 55
 08
@@ -12669,7 +12669,7 @@
 20
 40
 02
-58
+54
 24
 74
 00
@@ -12910,5 +12910,5 @@
 55
 00
 00
-da
-87
+97
+2d
Index: output/program.lis
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/output/program.lis	(revision 4609)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/output/program.lis	(working copy)
@@ -31,7 +31,7 @@
 0014 600141f9 store 2 ,mem_cb_att_write 
 0015 580003b4 setarg p_mouse_bt 
 0016 600141f1 store 2 ,mem_cb_bt_process 
-0017 58000277 setarg p_mouse_before_lpm 
+0017 58000273 setarg p_mouse_before_lpm 
 0018 600141ed store 2 ,mem_cb_before_lpm 
 0019 58000401 setarg p_mouse_priority_bb_event 
 001a 600141f5 store 2 ,mem_cb_bb_event_process 
@@ -99,7 +99,7 @@
 0050 c0508080 beq patch14_1 ,p_init_param 
 0051 c0588085 beq patch16_1 ,p_lpm_check_wake_lock 
 0052 c0590093 beq patch16_2 ,p_g24_dispatch 
-0053 c0620284 beq patch18_4 ,p_device_init 
+0053 c0620280 beq patch18_4 ,p_device_init 
 0054 c0718506 beq patch1c_3 ,p_mouse_seting_dpi 
 0055 c073052b beq patch1c_6 ,p_mouse_motion 
 0056 c07505a6 beq patch1d_2 ,p_mouse_bb_event_discovery_btn 
@@ -198,7 +198,7 @@
 p_g24_short_sleep:
 00a0 204000b5 call p_g24_lpm_wait 
 00a1 24740000 nrtn user 
-00a2 2040027e call p_clear_wake 
+00a2 2040027a call p_clear_wake 
 00a3 5800f424 setarg 62500 
 00a4 20202b93 branch lpm_dispatch_sleep 
 
@@ -235,8 +235,8 @@
 00bc c000ffe9 beq g24_tx_timer_int_enable ,disable_user 
 
 p_mouse_setgpio_lpm:
-00bd 20400281 call p_mouse_set_sdio_high 
-00be 2040027e call p_clear_wake 
+00bd 2040027d call p_mouse_set_sdio_high 
+00be 2040027a call p_clear_wake 
 
 p_mouse_setgpio_hibernate:
 00bf 20403ebf call mouse_lpm_before_common 
@@ -489,7 +489,7 @@
 
 p_g24_transmit_receive_ack:
 0178 7857fc00 disable user3 
-0179 20400235 call p_g24_transmit 
+0179 20400231 call p_g24_transmit 
 017a 18002a00 force 0 ,radio_ctrl 
 017b 68024ead fetch 4 ,mem_24g_addr 
 017c 98001200 iforce access 
@@ -497,7 +497,7 @@
 017e 2040291f call set_freq_rx 
 017f 20402924 call rf_rx_enable 
 0180 204001f0 call p_g24_receive_rxon 
-0181 20578231 call p_g24_end_of_packet ,user3 
+0181 2057822d call p_g24_end_of_packet ,user3 
 0182 20600000 rtn 
 
 p_g24_retransmit:
@@ -661,38 +661,38 @@
 01f6 68014e88 fetch 2 ,mem_24g_rx_window 
 01f7 98003600 iforce stop_watch 
 01f8 37c18400 correlate null ,timeout 
-01f9 242c0231 nbranch p_g24_end_of_packet ,sync 
+01f9 242c022d nbranch p_g24_end_of_packet ,sync 
 01fa 7846fc00 disable decode_fec0 
 01fb 7825fc00 enable decode_fec1 
 01fc 7823fc00 enable enable_white 
 01fd 7824fc00 enable enable_crc 
-01fe 2040022e call p_g24_receive_byte 
+01fe 2040022a call p_g24_receive_byte 
 01ff 6000cf39 store 1 ,mem_24g_get_syncword_crc8 
 0200 6808cf38 fetcht 1 ,mem_24g_syncword_crc8 
 0201 98467c00 isub temp ,null 
-0202 24228231 nbranch p_g24_end_of_packet ,zero 
-0203 2040022e call p_g24_receive_byte 
+0202 2422822d nbranch p_g24_end_of_packet ,zero 
+0203 2040022a call p_g24_receive_byte 
 0204 6000cdff store 1 ,mem_24g_rxbuf 
 0205 6800cdff fetch 1 ,mem_24g_rxbuf 
 0206 6808ce86 fetcht 1 ,mem_24g_data_type 
 0207 a8400e00 icompare bits_data ,temp 
-0208 24208231 nbranch p_g24_end_of_packet ,true 
+0208 2420822d nbranch p_g24_end_of_packet ,true 
 
 p_g24_receive_skip:
-0209 2040022e call p_g24_receive_byte 
+0209 2040022a call p_g24_receive_byte 
 020a e0a08000 istore 1 ,contw 
 020b 1fe97e00 rshift3 pdata ,pdata 
 020c 1fe1721f and pdata ,0x1f ,loopcnt 
 020d 20228211 branch p_g24rx_nopayload ,zero 
 
 p_g24rx_loop:
-020e 2040022e call p_g24_receive_byte 
+020e 2040022a call p_g24_receive_byte 
 020f e0a08000 istore 1 ,contw 
 0210 c200020e loop p_g24rx_loop 
 
 p_g24rx_nopayload:
 0211 18a22200 copy contw ,rega 
-0212 2040022e call p_g24_receive_byte 
+0212 2040022a call p_g24_receive_byte 
 0213 6000cfc0 store 1 ,mem_rssi_hex_received 
 0214 1a220a00 copy rega ,contw 
 0215 09800018 parse demod ,bucket ,24 
@@ -702,151 +702,153 @@
 0219 1ff17e00 rshift16 pdata ,pdata 
 021a e0a18000 istore 3 ,contw 
 021b 7845fc00 disable decode_fec1 
-021c 20230231 branch p_g24_end_of_packet ,crc_failed 
+021c 2023022d branch p_g24_end_of_packet ,crc_failed 
 021d 7837fc00 enable user3 
-021e 68008017 fetch 1 ,mem_last_freq 
-021f 1fe0a200 add pdata ,0 ,rega 
-0220 20402981 call rf_write_freq 
-0221 7846fc00 disable decode_fec0 
-0222 20402918 call set_sync_on 
-0223 6800cfc0 fetch 1 ,mem_rssi_hex_received 
+021e 204054ba call lerx_nopayload2 
+021f 6800cfc0 fetch 1 ,mem_rssi_hex_received 
 
 p_rssi_signal:
-0224 1fe22200 copy pdata ,rega 
-0225 6808cf40 fetcht 1 ,mem_rssi_signal_index 
-0226 58004f47 setarg mem_rssi_signal_buf 
-0227 98408a00 iadd temp ,contw 
-0228 1a227e00 copy rega ,pdata 
-0229 e0a08000 istore 1 ,contw 
-022a 18408401 increase 1 ,temp 
-022b 18410407 and_into rssi_buf_len_signal ,temp 
-022c 6008cf40 storet 1 ,mem_rssi_signal_index 
-022d 20600000 rtn 
+0220 1fe22200 copy pdata ,rega 
+0221 6808cf40 fetcht 1 ,mem_rssi_signal_index 
+0222 58004f47 setarg mem_rssi_signal_buf 
+0223 98408a00 iadd temp ,contw 
+0224 1a227e00 copy rega ,pdata 
+0225 e0a08000 istore 1 ,contw 
+0226 18408401 increase 1 ,temp 
+0227 18410407 and_into rssi_buf_len_signal ,temp 
+0228 6008cf40 storet 1 ,mem_rssi_signal_index 
+0229 20600000 rtn 
 
 p_g24_receive_byte:
-022e 09800008 parse demod ,bucket ,8 
-022f 19897e00 rshift3 pwindow ,pdata 
-0230 20600000 rtn 
+022a 09800008 parse demod ,bucket ,8 
+022b 19897e00 rshift3 pwindow ,pdata 
+022c 20600000 rtn 
 
 p_g24_end_of_packet:
-0231 784dfc00 disable encode_fec1 
-0232 7845fc00 disable decode_fec1 
-0233 2040264d call end_of_packet 
-0234 20600000 rtn 
+022d 784dfc00 disable encode_fec1 
+022e 7845fc00 disable decode_fec1 
+022f 2040264d call end_of_packet 
+0230 20600000 rtn 
 
 p_g24_transmit:
-0235 204053c4 call le_enable 
-0236 68024ead fetch 4 ,mem_24g_addr 
-0237 98001200 iforce access 
-0238 204001ed call p_g24_prep 
-0239 20402918 call set_sync_on 
-023a 6808ce8f fetcht 1 ,mem_24g_ch 
-023b 20402933 call set_freq_tx 
-023c 79202a00 set1 txgfsk ,radio_ctrl 
-023d 782efc00 enable encode_fec0 
-023e 78307c00 enable is_tx 
-023f 7850fc00 disable is_rx 
-0240 19317e00 rshift16 access ,pdata 
-0241 1fecfe00 rshift8 pdata ,pdata 
-0242 1ff1fe00 rshift4 pdata ,pdata 
-0243 08008628 inject mod ,40 
-0244 784efc00 disable encode_fec0 
-0245 782dfc00 enable encode_fec1 
-0246 7823fc00 enable enable_white 
-0247 7824fc00 enable enable_crc 
-0248 6800cf38 fetch 1 ,mem_24g_syncword_crc8 
-0249 08008608 inject mod ,8 
-024a 6800ce87 fetch 1 ,mem_24g_txlen 
-024b 98007200 iforce loopcnt 
-024c d8c04e41 arg mem_24g_txpayload ,contr 
+0231 204053c4 call le_enable 
+0232 68024ead fetch 4 ,mem_24g_addr 
+0233 98001200 iforce access 
+0234 204001ed call p_g24_prep 
+0235 20402918 call set_sync_on 
+0236 6808ce8f fetcht 1 ,mem_24g_ch 
+0237 20402933 call set_freq_tx 
+0238 79202a00 set1 txgfsk ,radio_ctrl 
+0239 782efc00 enable encode_fec0 
+023a 78307c00 enable is_tx 
+023b 7850fc00 disable is_rx 
+023c 19317e00 rshift16 access ,pdata 
+023d 1fecfe00 rshift8 pdata ,pdata 
+023e 1ff1fe00 rshift4 pdata ,pdata 
+023f 08008628 inject mod ,40 
+0240 784efc00 disable encode_fec0 
+0241 782dfc00 enable encode_fec1 
+0242 7823fc00 enable enable_white 
+0243 7824fc00 enable enable_crc 
+0244 6800cf38 fetch 1 ,mem_24g_syncword_crc8 
+0245 08008608 inject mod ,8 
+0246 6800ce87 fetch 1 ,mem_24g_txlen 
+0247 98007200 iforce loopcnt 
+0248 d8c04e41 arg mem_24g_txpayload ,contr 
 
 p_g24tr_loop:
-024d e8c08000 ifetch 1 ,contr 
-024e 08008608 inject mod ,8 
-024f c200024d loop p_g24tr_loop 
-0250 78247c00 enable enable_parity 
-0251 08008618 inject mod ,24 
-0252 78447c00 disable enable_parity 
-0253 37d38200 until null ,tx_clear 
-0254 20000064 nop 100 
-0255 784efc00 disable encode_fec0 
-0256 784dfc00 disable encode_fec1 
-0257 20600000 rtn 
+0249 e8c08000 ifetch 1 ,contr 
+024a 08008608 inject mod ,8 
+024b c2000249 loop p_g24tr_loop 
+024c 78247c00 enable enable_parity 
+024d 08008618 inject mod ,24 
+024e 78447c00 disable enable_parity 
+024f 37d38200 until null ,tx_clear 
+0250 20000064 nop 100 
+0251 784efc00 disable encode_fec0 
+0252 784dfc00 disable encode_fec1 
+0253 20600000 rtn 
 
 p_g24_timer_check:
-0258 20407fe9 call disable_user 
-0259 680a4ea6 fetcht 4 ,mem_24g_tx_btclk 
-025a 1c427e00 copy clkn_bt ,pdata 
-025b 98467c00 isub temp ,null 
-025c 24412d18 ncall g24_timer_timeout ,positive 
-025d 1fe22400 copy pdata ,regb 
-025e 68024ea6 fetch 4 ,mem_24g_tx_btclk 
-025f 6808ceaa fetcht 1 ,mem_24g_interval 
-0260 98408400 iadd temp ,temp 
-0261 1a427e00 copy regb ,pdata 
-0262 98467c00 isub temp ,null 
-0263 24610000 nrtn positive 
-0264 793ffe1c set0 28 ,pdata 
-0265 60024ea6 store 4 ,mem_24g_tx_btclk 
-0266 20207fe7 branch enable_user 
+0254 20407fe9 call disable_user 
+0255 680a4ea6 fetcht 4 ,mem_24g_tx_btclk 
+0256 1c427e00 copy clkn_bt ,pdata 
+0257 98467c00 isub temp ,null 
+0258 24412d18 ncall g24_timer_timeout ,positive 
+0259 1fe22400 copy pdata ,regb 
+025a 68024ea6 fetch 4 ,mem_24g_tx_btclk 
+025b 6808ceaa fetcht 1 ,mem_24g_interval 
+025c 98408400 iadd temp ,temp 
+025d 1a427e00 copy regb ,pdata 
+025e 98467c00 isub temp ,null 
+025f 24610000 nrtn positive 
+0260 793ffe1c set0 28 ,pdata 
+0261 60024ea6 store 4 ,mem_24g_tx_btclk 
+0262 20207fe7 branch enable_user 
 
 p_rssi_average:
-0267 d8400000 arg 0 ,temp 
-0268 df200008 arg rssi_buf_len_signal + 1 ,loopcnt 
-0269 1a220c00 copy rega ,contr 
+0263 d8400000 arg 0 ,temp 
+0264 df200008 arg rssi_buf_len_signal + 1 ,loopcnt 
+0265 1a220c00 copy rega ,contr 
 
 p_rssi_average_loop:
-026a e8c08000 ifetch 1 ,contr 
-026b 98408400 iadd temp ,temp 
-026c c200026a loop p_rssi_average_loop 
-026d 18497e00 rshift3 temp ,pdata 
-026e 1fe20400 copy pdata ,temp 
-026f c6930000 rtnmark0 mark_24g 
-0270 1fe6fc0a div pdata ,10 
-0271 20407f86 call wait_div_end 
-0272 1807fe00 quotient pdata 
-0273 1ff27e00 lshift4 pdata ,pdata 
-0274 18070400 remainder temp 
-0275 98418400 ior temp ,temp 
-0276 20600000 rtn 
+0266 e8c08000 ifetch 1 ,contr 
+0267 98408400 iadd temp ,temp 
+0268 c2000266 loop p_rssi_average_loop 
+0269 18497e00 rshift3 temp ,pdata 
+026a 1fe20400 copy pdata ,temp 
+026b c6930000 rtnmark0 mark_24g 
+026c 1fe6fc0a div pdata ,10 
+026d 20407f86 call wait_div_end 
+026e 1807fe00 quotient pdata 
+026f 1ff27e00 lshift4 pdata ,pdata 
+0270 18070400 remainder temp 
+0271 98418400 ior temp ,temp 
+0272 20600000 rtn 
 
 p_mouse_before_lpm:
-0277 c6130000 rtnmark1 mark_24g 
-0278 2040034c call p_mouse_le_txbuff_save 
-0279 204000bd call p_mouse_setgpio_lpm 
-027a 6800c040 fetch 1 ,mem_context 
-027b c300027e bbit0 state_inconn ,p_clear_wake 
-027c 680080a0 fetch 1 ,mem_lpm_current_mult 
-027d 247a0000 nrtn blank 
+0273 c6130000 rtnmark1 mark_24g 
+0274 2040034c call p_mouse_le_txbuff_save 
+0275 204000bd call p_mouse_setgpio_lpm 
+0276 6800c040 fetch 1 ,mem_context 
+0277 c300027a bbit0 state_inconn ,p_clear_wake 
+0278 680080a0 fetch 1 ,mem_lpm_current_mult 
+0279 247a0000 nrtn blank 
 
 p_clear_wake:
-027e 58000000 setarg 0 
-027f 600400a1 store 8 ,mem_gpio_wakeup_low 
-0280 20600000 rtn 
+027a 58000000 setarg 0 
+027b 600400a1 store 8 ,mem_gpio_wakeup_low 
+027c 20600000 rtn 
 
 p_mouse_set_sdio_high:
-0281 6800ccd9 fetch 1 ,mem_mouse_init_sensor_reset_flag 
-0282 207a0000 rtn blank 
-0283 20200506 branch p_mouse_seting_sensor_type 
+027d 6800ccd9 fetch 1 ,mem_mouse_init_sensor_reset_flag 
+027e 207a0000 rtn blank 
+027f 20200506 branch p_mouse_seting_sensor_type 
 
 p_device_init:
-0284 70895b86 jam 0x86 ,0x895b 
-0285 70895ca0 jam 0xa0 ,0x895c 
-0286 2040296c call initialize_radio 
-0287 20403416 call app_lpm_mult_enable 
-0288 204074b9 call enable_authrom 
-0289 20358302 branch p_mouse_spi_init ,wake 
+0280 70895b86 jam 0x86 ,0x895b 
+0281 70895ca0 jam 0xa0 ,0x895c 
+0282 2040296c call initialize_radio 
+0283 20403416 call app_lpm_mult_enable 
+0284 204074b9 call enable_authrom 
+0285 20358302 branch p_mouse_spi_init ,wake 
 
 p_device_wake_from_power:
-028a 6801c4a3 fetch 3 ,mem_le_lap + 3 
-028b 6001cd3f store 3 ,mem_le_lap_high_3b 
-028c 20400001 call p_wake_from_power 
-028d 20404083 call mouse_check_key_gpio 
-028e c0018299 beq mouse_lr_button ,p_mouse_24g_pairing_button 
+0286 6801c4a3 fetch 3 ,mem_le_lap + 3 
+0287 6001cd3f store 3 ,mem_le_lap_high_3b 
+0288 20400001 call p_wake_from_power 
+0289 2040028e call p_mouse_check_key_gpio_once 
+028a 20400539 call p_mouse_check_key_gpio 
+028b c0018299 beq mouse_lr_button ,p_mouse_24g_pairing_button 
 
 p_mouse_check_reconn_target:
-028f 7011c722 jam zcode_22 ,mem_zcode_temp_param0 
-0290 2020077a branch p_zcode_entrance 
+028c 7011c722 jam zcode_22 ,mem_zcode_temp_param0 
+028d 2020077a branch p_zcode_entrance 
+
+p_mouse_check_key_gpio_once:
+028e 58030303 setarg 0x030303 
+028f 6001cdee store 3 ,mem_mouse_lkey_press_status 
+0290 20600000 rtn 
 
 p_mouse_null_enter_hibernate_enable:
 0291 70479f01 jam 1 ,mem_mouse_null_enter_hibernate_flag 
@@ -2038,7 +2040,7 @@
 
 p_le_receive_skip:
 05c9 204029bb call save_rssi 
-05ca 20400224 call p_rssi_signal 
+05ca 20400220 call p_rssi_signal 
 05cb 202054a3 branch le_receive_skip + 2 
 
 p_le_update_param:
@@ -2310,7 +2312,7 @@
 0685 204024f0 call slave_receive_master_slot 
 0686 242c28f9 nbranch shutdown_radio ,sync 
 0687 204029bb call save_rssi 
-0688 20400224 call p_rssi_signal 
+0688 20400220 call p_rssi_signal 
 0689 20202518 branch slave_conn_recv_packet + 4 
 
 p_lpm_dispatch:
@@ -2531,7 +2533,7 @@
 071e c3838000 rtnbit1 ui_state_bt_reconnect 
 071f c3830000 rtnbit1 ui_state_bt_discovery 
 0720 da204f47 arg mem_rssi_signal_buf ,rega 
-0721 20400267 call p_rssi_average 
+0721 20400263 call p_rssi_average 
 0722 6008cfbf storet 1 ,mem_rssi_avg_received 
 0723 58000082 setarg rssi_dis_max_24g 
 0724 c5130726 bmark1 mark_24g ,power_ctrl_start_next 
@@ -20981,6 +20983,8 @@
 54b7 e0a18000 istore 3 ,contw 
 54b8 2023264d branch end_of_packet ,crc_failed 
 54b9 7836fc00 enable match 
+
+lerx_nopayload2:
 54ba 68008017 fetch 1 ,mem_last_freq 
 54bb 1fe0a200 add pdata ,0 ,rega 
 54bc 20402981 call rf_write_freq 
@@ -35469,7 +35473,7 @@
 10003 20600000 rtn 
 
 z_g24_transmit_by_interrupt:
-10004 20400258 call p_g24_timer_check 
+10004 20400254 call p_g24_timer_check 
 10005 24740000 nrtn user 
 10006 20400019 call z_g24_interval_calibrate 
 10007 68014fc6 fetch 2 ,mem_24g_transmit_by_interrupt_exit_count 
Index: output/romcode.rom
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/output/romcode.rom	(revision 4609)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/output/romcode.rom	(working copy)
@@ -24575,7 +24575,7 @@
 c000001f
 c0008004
 20600000
-20400258
+20400254
 24740000
 20400019
 68014fc6
@@ -25191,4 +25191,4 @@
 204042fb
 704721ff
 202002f0
-0000c4f5
+0000d498
Index: program/le.prog
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/program/le.prog	(revision 4609)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/program/le.prog	(working copy)
@@ -534,6 +534,7 @@
 	istore 3,contw
 	branch end_of_packet,crc_failed
 	enable match
+lerx_nopayload2:
 	fetch 1,mem_last_freq
 	add pdata,0,rega				// ble 2M Medium Frequency
 	call rf_write_freq				/* set frequency to tx mode freq */
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/program/patch.prog	(revision 4609)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3MODE_2h_BD_DPI_CTRL_ALT_A_RK920/program/patch.prog	(working copy)
@@ -855,11 +855,7 @@
 endif
 
 	enable user3
-	fetch 1,mem_last_freq
-	add pdata,0,rega
-	call rf_write_freq
-	disable decode_fec0
-	call set_sync_on
+ 	call lerx_nopayload2
 //ifdef DONGLE
 //	rtn
 //endif
@@ -1092,13 +1088,17 @@
 
 //	call p_mouse_switch_Hwakeup_byPB
 ifdef G24
-	call mouse_check_key_gpio
+	call p_mouse_check_key_gpio_once
+	call p_mouse_check_key_gpio
 	beq MOUSE_LR_BUTTON,p_mouse_24g_pairing_button
 endif
 p_mouse_check_reconn_target:
 	jam ZCODE_22,mem_zcode_temp_param0
 	branch p_zcode_entrance
-
+p_mouse_check_key_gpio_once:
+	setarg 0x030303
+	store 3,mem_mouse_lkey_press_status
+	rtn
 p_mouse_null_enter_hibernate_enable:	//ble never connected
 	jam 1,mem_mouse_null_enter_hibernate_flag
 	jam 40,mem_mouse_null_enter_hibernate_timer	//lmr 3s
