Index: output/otp.dat
===================================================================
--- /1121s/branch/mouse/YJX_Project/Only_24G_V98/output/otp.dat	(revision 2570)
+++ /1121s/branch/mouse/YJX_Project/Only_24G_V98/output/otp.dat	(working copy)
@@ -27,7 +27,7 @@
 1e
 aa
 55
-30
+80
 15
 4e
 06
@@ -5247,16 +5247,16 @@
 7b
 f1
 3d
-90
-04
+cd
+7b
 16
 94
 96
 f5
 7e
 b5
-96
-4c
+cb
+0d
 38
 3e
 9f
@@ -5264,195 +5264,275 @@
 43
 83
 ef
-c4
+e9
 bd
 b1
 5e
 96
+00
+7f
+b6
+45
+02
 b0
-34
-97
-3d
-52
-b9
-34
-8e
-b9
-43
-08
-eb
-97
+16
+f5
+a6
+e8
+3a
+68
+50
+90
+02
+87
 32
-26
-27
-c2
-8c
-4e
-7e
+84
 0c
-6e
-a7
-50
+3a
+7f
+cc
+1f
+17
 1d
 f2
 37
 ae
-d7
-45
-92
-da
-a8
-79
-e3
-8c
-5c
-e1
+d3
+06
+17
+ea
+a0
+7b
 6c
-94
-0a
-82
-de
-9d
-74
-5e
-f5
 47
-95
-59
-76
-8f
-ce
-5f
-de
-49
-13
-7e
+ab
+47
+d9
+16
+ea
+a0
+03
+c5
+dc
+16
+eb
+73
+3a
+b8
+e8
 bc
-e6
-97
-d1
-5d
-ce
-d4
+96
+18
+27
+64
+13
+3c
+39
+d9
+d8
+71
+c3
+b2
+34
+64
+92
+76
+4a
+17
+b6
+92
 24
+ca
+45
+c1
+aa
+86
+16
+fb
+65
+2d
+cb
+74
+45
+34
+a3
+97
+7c
+16
+d6
+5f
+6e
+73
 12
-03
-1a
-7e
-63
+2b
+47
+72
+54
 77
-6c
-a2
-db
-f6
-b5
-2f
-52
-b7
-dd
-4b
-ef
+95
+24
+4a
 06
-15
-5f
-0d
+eb
+93
+55
+83
+df
+ad
+2b
+ae
+90
+c1
+c3
+a8
+6b
+a6
+ec
+66
+86
+a6
+5d
+78
 41
-2c
+e2
+c4
+37
+c2
 1f
-fb
-b0
-3e
-1a
-6c
-6b
+2f
+77
+86
+62
 30
-d8
-b6
-32
-92
-8c
-4a
-05
-1c
+f7
+c1
+41
+98
+4d
+9a
+0f
+3d
+cf
+ae
 35
-ef
-c4
-67
-c9
-d2
-92
-90
-a3
+41
+99
+15
+2c
+da
+37
 43
-ab
-24
+b9
+3f
+a9
+55
+b3
+b8
+94
+a4
+cc
+58
+a1
+7c
+b6
+6c
+90
+4f
+ae
+c7
+82
+fd
+07
+b1
+9d
+35
 66
-2f
-00
-3e
-a0
-24
-3e
+5d
+63
+cc
+81
+e3
+a1
+b2
+f6
 41
-80
-44
-3e
-8a
-77
-be
-d7
-c9
+66
+fd
+9b
+57
+71
+9b
+21
+7f
+bd
+13
+07
+30
+31
+89
+7b
+21
+ad
+5c
 c2
-f3
-f2
-79
-47
-e1
-05
-9a
-0d
-ef
-7e
-94
-34
-68
-70
-15
-4c
+c9
+89
+c1
+de
+5e
+75
+f5
+11
+2e
 88
-9d
-79
-d8
-16
-46
-1d
-db
-29
+2b
+85
 27
-d1
-6d
-e0
-f8
+9d
+5c
+96
+ff
 c4
-d0
-47
-69
-75
-cd
-6e
-46
-fd
-67
-b1
-8d
+52
+ea
+04
+52
+ad
+28
+b0
+a7
+ba
+c2
+99
+49
+d1
+fe
+3a
+78
+5e
+4f
+9b
+48
+7c
+64
+9f
+60
+8a
+7c
+9a
+22
+65
 8c
-03
-58
-36
-a4
+5b
+24
+8c
+fb
+95
+c6
+46
+dc
 c9
-25
-e4
+44
 aa
 55
 40
@@ -5546,8 +5626,8 @@
 06
 07
 08
-08
 07
+08
 06
 12
 14
@@ -6708,6 +6788,6 @@
 55
 5f
 51
-4d
-3a
+2a
+a1
 20
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/YJX_Project/Only_24G_V98/output/program.lis	(revision 2570)
+++ /1121s/branch/mouse/YJX_Project/Only_24G_V98/output/program.lis	(working copy)
@@ -1720,84 +1720,113 @@
 p_mouse_key:
 0516 2040584c call mouse_check_firekey_gpio 
 0517 6fe0c987 fetch 1 ,mem_fire_key_flag 
-0518 243a5860 nbranch fire_key_press ,blank 
+0518 243a051f nbranch p_fire_key_press ,blank 
 0519 6fe0c982 fetch 1 ,mem_fire_key_status 
-051a 243a585f nbranch fire_key_process ,blank 
+051a 243a051e nbranch p_fire_key_process ,blank 
 051b 20405888 call mouse_check_key_gpio 
-051c 2040051e call p_mouse_ghost_key_check 
+051c 20400533 call p_mouse_ghost_key_check 
 051d 202057ad branch mouse_key + 7 
 
-p_mouse_ghost_key_check:
-051e 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
-051f 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
-0520 70497b00 jam 0 ,mem_mouse_ghost_flag 
-0521 1fe22400 copy pdata ,regb 
-0522 6848c644 fetcht 1 ,mem_lbutton_gpio 
-0523 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+p_fire_key_process:
+051e c0025878 beq 4 ,fire_key_process_end 
+
+p_fire_key_press:
+051f 2040587b call firekey_clkn_bt_timer_check 
+0520 6fe24983 fetch 4 ,mem_fire_key_delay 
+0521 d84000a0 arg 0xa0 ,temp 
+0522 98408400 iadd temp ,temp 
+0523 1c427e00 copy clkn_bt ,pdata 
 0524 98467c00 isub temp ,null 
-0525 20228530 branch p_mouse_matrix_ghost_key_l_bk ,zero 
-0526 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-0527 98467c00 isub temp ,null 
-0528 20228536 branch p_mouse_matrix_ghost_key_l_fw ,zero 
-0529 6848c645 fetcht 1 ,mem_mbutton_gpio 
-052a 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-052b 98467c00 isub temp ,null 
-052c 2022853f branch p_mouse_ghost_key_mbk_rfw ,zero 
+0525 24610000 nrtn positive 
+0526 67e24983 store 4 ,mem_fire_key_delay 
+0527 6fe0c982 fetch 1 ,mem_fire_key_status 
+0528 c000586e beq 0 ,fire_key_process_start 
+0529 c000d871 beq 1 ,fire_key_process_release1 
+052a c0015874 beq 2 ,fire_key_process_start2 
+052b c001852d beq 3 ,p_fire_key_process_release2 
+052c 20600000 rtn 
+
+p_fire_key_process_release2:
+052d 6fe0c987 fetch 1 ,mem_fire_key_flag 
+052e c0008531 beq 1 ,p_fire_key_status_set4 
+052f 70498200 jam 0 ,mem_fire_key_status 
+0530 20205872 branch fire_key_release 
+
+p_fire_key_status_set4:
+0531 70498204 jam 4 ,mem_fire_key_status 
+0532 20205872 branch fire_key_release 
+
+p_mouse_ghost_key_check:
+0533 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0534 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+0535 70497b00 jam 0 ,mem_mouse_ghost_flag 
+0536 1fe22400 copy pdata ,regb 
+0537 6848c644 fetcht 1 ,mem_lbutton_gpio 
+0538 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0539 98467c00 isub temp ,null 
+053a 20228545 branch p_mouse_matrix_ghost_key_l_bk ,zero 
+053b 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+053c 98467c00 isub temp ,null 
+053d 2022854b branch p_mouse_matrix_ghost_key_l_fw ,zero 
+053e 6848c645 fetcht 1 ,mem_mbutton_gpio 
+053f 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0540 98467c00 isub temp ,null 
+0541 20228554 branch p_mouse_ghost_key_mbk_rfw ,zero 
 
 p_mouse_ghost_key_mfw_rbk:
-052d 204057fb call mouse_ghost_key_check_m_fw 
+0542 204057fb call mouse_ghost_key_check_m_fw 
 
 p_mouse_ghost_key_rbk:
-052e 20400544 call p_mouse_ghost_key_check_r_bk 
-052f 202057e5 branch mouse_ghost_key_check_next 
+0543 20400559 call p_mouse_ghost_key_check_r_bk 
+0544 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_matrix_ghost_key_l_bk:
-0530 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0531 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-0532 98467c00 isub temp ,null 
-0533 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
+0545 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0546 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0547 98467c00 isub temp ,null 
+0548 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
 
 p_mouse_ghost_key_lbk_rfw:
-0534 204057ef call mouse_ghost_key_check_l_bk 
-0535 20200540 branch p_mouse_ghost_key_rfw 
+0549 204057ef call mouse_ghost_key_check_l_bk 
+054a 20200555 branch p_mouse_ghost_key_rfw 
 
 p_mouse_matrix_ghost_key_l_fw:
-0536 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0537 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0538 98467c00 isub temp ,null 
-0539 2022853c branch p_mouse_ghost_key_lfw_mbk ,zero 
+054b 6848c645 fetcht 1 ,mem_mbutton_gpio 
+054c 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+054d 98467c00 isub temp ,null 
+054e 20228551 branch p_mouse_ghost_key_lfw_mbk ,zero 
 
 p_mouse_ghost_key_lfw_rbk:
-053a 20400546 call p_mouse_ghost_key_check_l_fw 
-053b 2020052e branch p_mouse_ghost_key_rbk 
+054f 2040055b call p_mouse_ghost_key_check_l_fw 
+0550 20200543 branch p_mouse_ghost_key_rbk 
 
 p_mouse_ghost_key_lfw_mbk:
-053c 20400546 call p_mouse_ghost_key_check_l_fw 
-053d 20400542 call p_mouse_ghost_key_check_m_bk 
-053e 202057e5 branch mouse_ghost_key_check_next 
+0551 2040055b call p_mouse_ghost_key_check_l_fw 
+0552 20400557 call p_mouse_ghost_key_check_m_bk 
+0553 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_mbk_rfw:
-053f 20400542 call p_mouse_ghost_key_check_m_bk 
+0554 20400557 call p_mouse_ghost_key_check_m_bk 
 
 p_mouse_ghost_key_rfw:
-0540 20400548 call p_mouse_ghost_key_check_r_fw 
-0541 202057e5 branch mouse_ghost_key_check_next 
+0555 2040055d call p_mouse_ghost_key_check_r_fw 
+0556 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_check_m_bk:
-0542 1a417e12 and regb ,mouse_m_bk_button ,pdata 
-0543 202057f3 branch mouse_ghost_key_check_m_bk + 1 
+0557 1a417e12 and regb ,mouse_m_bk_button ,pdata 
+0558 202057f3 branch mouse_ghost_key_check_m_bk + 1 
 
 p_mouse_ghost_key_check_r_bk:
-0544 1a417e0a and regb ,mouse_r_bk_button ,pdata 
-0545 202057f6 branch mouse_ghost_key_check_r_bk + 1 
+0559 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+055a 202057f6 branch mouse_ghost_key_check_r_bk + 1 
 
 p_mouse_ghost_key_check_l_fw:
-0546 1a417e11 and regb ,mouse_l_fw_button ,pdata 
-0547 202057f9 branch mouse_ghost_key_check_l_fw + 1 
+055b 1a417e11 and regb ,mouse_l_fw_button ,pdata 
+055c 202057f9 branch mouse_ghost_key_check_l_fw + 1 
 
 p_mouse_ghost_key_check_r_fw:
-0548 1a417e12 and regb ,mouse_r_fw_button ,pdata 
-0549 202057ff branch mouse_ghost_key_check_r_fw + 1 
+055d 1a417e12 and regb ,mouse_r_fw_button ,pdata 
+055e 202057ff branch mouse_ghost_key_check_r_fw + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/branch/mouse/YJX_Project/Only_24G_V98/program/patch.prog	(revision 2570)
+++ /1121s/branch/mouse/YJX_Project/Only_24G_V98/program/patch.prog	(working copy)
@@ -26,7 +26,7 @@
 	beq patch0d_6,p_mouse_start_work
 	beq patch0e_3,p_mouse_setgpio_hibernate
 	beq patch0e_4,p_mouse_lpm_before_common
-ifdef ADC_1121SB	
+ifdef ADC_1121SB
 	beq patch0e_7,p_mouse_adc_read_start
 endif
 	beq patch0f_2,p_mouse_motion
@@ -46,7 +46,7 @@
 	beq patch12_5,p_mouse_24g_hibernate_set
 	beq patch12_6,p_mouse_24g_package_data
 	beq patch18_5,p_otp_read_data
-	beq patch1a_5,p_gpio_set_wake_by_current_state	
+	beq patch1a_5,p_gpio_set_wake_by_current_state
 	beq patch1a_6,p_gpio_set_wake
 	beq patch1b_2,p_sadc_calibration
 ifdef ADC_1121SB
@@ -91,32 +91,32 @@
 	call g24_dispatch
 	call lpm_dispatch
 	branch p_main_loop
-	
+
 p_shutdown_radio:
 	jam 0,0x8900
 	branch shutdown_radio+1
 
 p_set_sync_on:
-	jam 0x60,0x8a0f 
-	jam 0xaa,0x8a10 
-	jam 0x7a,0x8a12 
-	jam 0x00,0x8a25 
-	jam 0x00,0x8a26 
+	jam 0x60,0x8a0f
+	jam 0xaa,0x8a10
+	jam 0x7a,0x8a12
+	jam 0x00,0x8a25
+	jam 0x00,0x8a26
 	nop 60
-	jam 0x20,0x8a20 
-	jam 0xf5,0x8a23 
-	jam 0x12,0x8a24 
-	jam 0x10,0x8a24 
+	jam 0x20,0x8a20
+	jam 0xf5,0x8a23
+	jam 0x12,0x8a24
+	jam 0x10,0x8a24
 	nop 60
-	jam 0x60,0x8a12 
-	jam 0xdd,0x8a23 
+	jam 0x60,0x8a12
+	jam 0xdd,0x8a23
 	rtn
 
 p_initialize_radio_cont:
 	jam 0,mem_le_testtype
 	jam 0,mem_cmd_le_create_conn
 	until null,lpo_edge
-	
+
 	jam 0x0d,0x8946
 	jam 0x10,0x896f
 	jam 0xcd,0x8a13
@@ -130,9 +130,9 @@
 	call wdt_set_disable
 
 	until null,lpo_edge
-	jam 0x5f,0x813b 
+	jam 0x5f,0x813b
 	until null,lpo_edge
-	jam 0x88,0x813c 
+	jam 0x88,0x813c
 	until null,lpo_edge
 	fetch 1,mem_fcomp_div
 	beq XTAL_16M,p_initialize_radio_16m
@@ -143,10 +143,10 @@
 	jam 0x24,0x8a80
 	jam 0x62,0x8a81
 	setarg 0xe61212
-	store 3,0x8a73	
+	store 3,0x8a73
 p_initialize_radio2:
 	jam 0x60,0x8a86
-	jam 0x3b,0x8a8b 
+	jam 0x3b,0x8a8b
 	call p_dpll_on
 	jam 0,core_config
 	jam CLKSEL_DPLL,core_clksel
@@ -184,9 +184,9 @@
 	storet 2,mem_adc_current_value
 	jam 0x00,core_sadc_ctrl
 	rtn
-	
+
 p_set_xtal_cap:
-ifndef XTAL_CALP_SET 
+ifndef XTAL_CALP_SET
 	rtn wake
 endif
 	until null,lpo_edge
@@ -194,7 +194,7 @@
 p_set_xtal_cap_next:
 	store 1,core_xtal_cap
 	branch lpm_write_wait
-	
+
 p_dpll_on:
 	fetch 1,mem_fcomp_div
 	beq XTAL_24M,p_dpll_on_24m
@@ -202,7 +202,7 @@
 	or_into 0x06,pdata
 	store 1,0x8a02
 	jam 0xe0,0x8a05
-p_dpll_on_24m:	
+p_dpll_on_24m:
 	jam 0xd8,0x8a00
 	nop 60
 	jam 0xa0,0x8a01
@@ -211,7 +211,7 @@
 	nop 20
 	jam 0x9f,0x8a00
 	rtn
-	
+
 p_initialize_radio_16m:
 	fetch 1,mem_ring_ibias_trim
 	or_into 0x06,pdata
@@ -222,7 +222,7 @@
 	setarg 0xe40909
 	store 3,0x8a73
 	jam 0x2a,0x8a76
-	jam 0x04,0x8902	
+	jam 0x04,0x8902
 	branch p_initialize_radio2
 
 p_set_otp_config:
@@ -235,7 +235,7 @@
 	fetcht 1,mem_otp_core_ldo
 	ior temp,pdata
 	increase -3,pdata
-	store 1,0x8136 
+	store 1,0x8136
 	until null,lpo_edge
 
 	fetch 1,0x8138
@@ -243,7 +243,7 @@
 	fetcht 1,mem_otp_verf_bg
 	lshift3 temp,temp
 	ior temp,pdata
-	store 1,0x8138 
+	store 1,0x8138
 	until null,lpo_edge
 
 p_set_otp_config_wake:
@@ -264,7 +264,7 @@
 	fetch 1,0x8a06
 	setflag true,7,pdata
 	store 1,0x8a06
-	
+
 	fetch 1,mem_otp_dpll_ibais
 	and pdata,7,temp
 	lshift4 temp,temp
@@ -330,17 +330,17 @@
 	call p_power_ctrl_txpower_incrs
 	branch g24_tx_fast_hop+1
 endif
-	
+
 p_txon:
 	setarg 0x0aaa7e
 	store 3,0x8a0f
 	nop 60
-	jam 0x00,0x8a25 
-	jam 0x0d,0x8a26 
-	jam 0xf6,0x8a16 
+	jam 0x00,0x8a25
+	jam 0x0d,0x8a26
+	jam 0xf6,0x8a16
 	branch txon+7
 
-p_set_tx_power:	
+p_set_tx_power:
 	fetch 1,mem_tx_power
 	beq TX_POWER_6DB,set_tx_power_7db
 	beq TX_POWER_F30DB,p_set_tx_power_f30db
@@ -350,28 +350,28 @@
 	branch set_tx_power+2
 
 p_set_tx_power_factory:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	fetch 3,mem_tx_power_factory_param_new
 p_mouse_tx_power_set:
 	store 3,0x8a60
 	branch set_tx_power_8a63_28
 
 p_set_tx_power_f30db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x250300
 	branch p_mouse_tx_power_set
 /*
 p_set_tx_power_f35db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x250100
 	store 3,0x8a60
 	branch set_tx_power_8a63_28
 
 p_set_tx_power_f40db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x250000
 	store 3,0x8a60
-	branch set_tx_power_8a63_28	
+	branch set_tx_power_8a63_28
 
 p_set_tx_power_f45db:
 	jam 0x17,0x8a14
@@ -381,28 +381,28 @@
 	rtn
 
 p_set_tx_power_f50db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x000000
 	store 3,0x8a60
-	jam 0x25,0x8a63 
+	jam 0x25,0x8a63
 	rtn
 
 p_set_tx_power_f55db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x000000
 	store 3,0x8a60
-	jam 0x22,0x8a63 
+	jam 0x22,0x8a63
 	rtn
 
 p_set_tx_power_f60db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x000000
 	store 3,0x8a60
-	jam 0x21,0x8a63 
+	jam 0x21,0x8a63
 	rtn
 
 p_set_tx_power_f62db:
-	jam 0x17,0x8a14 
+	jam 0x17,0x8a14
 	setarg 0x000000
 	store 3,0x8a60
 	jam 0x20,0x8a63
@@ -413,7 +413,7 @@
 	rtn wake
 	call set_sync_on
 	arg 39,temp
-	call set_freq_rx	
+	call set_freq_rx
 	call rf_rx_enable
 	jam 0x7f,0x8a25
 	jam 0x1a,0x8a30
@@ -449,7 +449,7 @@
 	store 2,0x8984
 	jam 0x9,0x8981
 	jam 0x3,0x8981
-	jam 0x6,0x8980	
+	jam 0x6,0x8980
 	nop 60
 	arg 0,rega
 	arg 0,regb
@@ -501,7 +501,7 @@
 	arg 256,regc
 	iadd regc,pdata
 	rtn
-	
+
 p_le_slave_match:
 	call p_le_check_retransmit
 	branch le_slave_match+1
@@ -513,7 +513,7 @@
 	fetcht 1,mem_le_conn_first_rcv
 	fetch 1,mem_le_conn_rcv_new
 	isub temp,null
-	ncall p_le_check_retransmit_timesout,positive	
+	ncall p_le_check_retransmit_timesout,positive
 	isub temp,pdata
 	sub pdata,100,null
 	branch p_le_check_retransmit_count,positive
@@ -521,7 +521,7 @@
 	sub pdata,20,null
 	ncall p_app_ble_disconnect,positive
 	jam 1,mem_le_check_retransmit_flag
-	rtn 
+	rtn
 p_app_ble_disconnect:
 	jam 1,mem_le_check_retransmit_discon_flag
 	branch app_ble_disconnect
@@ -546,16 +546,16 @@
 	increase 1,pdata
 	store 1,mem_le_conn_rcv_new
 	branch le_got_first_packet+4
-	
+
 p_le_rx_dec:
-	call le_check_retransmit	
+	call le_check_retransmit
 	fetchr rega, 1,mem_le_rxbuf_data_length
 	increase -4,rega
 	nbranch le_crc_fail_consecutive,positive
 	branch le_rx_dec+6
 
 p_le_rx_nopayload:
-	parse demod,bucket,24	
+	parse demod,bucket,24
 	rshift32 pdata,pdata
 	rshift16 pdata,pdata
 	istore 3,contw
@@ -579,9 +579,9 @@
 	rtneq LLID_RESERVED
 	beq LLID_LE_LL,le_parse_ll
 	branch le_parse_l2cap
-	
+
 p_le_init_adv:
-	set0 mark_ble_crc_fail,mark	
+	set0 mark_ble_crc_fail,mark
 	branch le_init_adv+1
 
 p_le_receive_rxon:
@@ -627,7 +627,7 @@
 	copy clke,rege
 	copy clke_rt,pdata
 	iadd temp,pdata
-	copy pdata,clke_rt	
+	copy pdata,clke_rt
 	rtn
 
 p_lpm_adjust_clk:
@@ -657,8 +657,8 @@
 	ifetch 3,contr
 	store 3,mem_le_att_opcode
 	beq ATTOP_READ_REQUEST,p_le_parse_att_read_request
-	beq ATTOP_WRITE_REQUEST,p_le_parse_att_write_request	
-	branch le_parse_att2	
+	beq ATTOP_WRITE_REQUEST,p_le_parse_att_write_request
+	branch le_parse_att2
 
 p_le_parse_att_read_request:
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
@@ -687,12 +687,12 @@
 	add pdata,-3,regb
 	call le_writeatt_cb
 	fetch 1,mem_mouse_bluetooth_fast_conn_flag
-	beq 0xff,le_send_att_write_response_check_auth	
+	beq 0xff,le_send_att_write_response_check_auth
 	fetch 1,mem_mouse_le_reconnect_flag
 	branch le_send_att_write_response_check_auth,blank
 	fetch 1,mem_le_connect_status_flag
 	bbit1 LL_START_ENC_FLAG,le_send_att_write_response_check_auth
-	setarg 0x001a		
+	setarg 0x001a
 	fetcht 2,mem_le_att_handle
 	isub temp,null
 	nbranch le_send_att_write_response_check_auth,zero
@@ -710,8 +710,8 @@
 	fetch 1,mem_le_check_retransmit_flag
 	rtn blank
 	fetch 1,mem_le_check_retransmit_discon_flag
-	nrtn blank	
-p_mouse_le_next:	
+	nrtn blank
+p_mouse_le_next:
 	fetch 1,mem_mouse_clear_sensor_data_flag
 	call mouse_clear_sensor_data_by_reset,blank
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
@@ -743,7 +743,7 @@
 p_gpio_set_low_wake:
 	arg 3,debug
 	branch gpio_set_wake_high
-	
+
 p_gpio_set_qdec_mode:
 	jam 1,mem_mouse_qdec_set_flag
 p_mouse_qdec_lpm_cfg:
@@ -751,7 +751,7 @@
 	branch gpio_set_wake_high
 
 p_mouse_puchk_disable:
-	setarg 0x10			//bit0-1:key_delay	bit2-3:pu_delay		bit4-6:interval	bit7:enable 
+	setarg 0x10			//bit0-1:key_delay	bit2-3:pu_delay		bit4-6:interval	bit7:enable
 p_mouse_puchk_set:
 	store 1,core_puwakeup
 	branch lpm_write_wait
@@ -770,7 +770,7 @@
 	call gpio_set_high_impedance
 	fetcht 1,mem_whee_b_data_gpio
 	branch gpio_set_high_impedance
-	
+
 p_lpm_sleep:
 	//call xtal_fast_wake
 //	fetch 2,mem_cb_before_lpm_sleep
@@ -791,7 +791,7 @@
 	fetch 1,mem_mouse_qdec_set_flag
 	branch p_mouse_puchk_disable,blank
 p_mouse_puchk_enable:
-	setarg 0x80			//bit0-1:key_delay	bit2-3:pu_delay		bit4-6:interval	bit7:enable 
+	setarg 0x80			//bit0-1:key_delay	bit2-3:pu_delay		bit4-6:interval	bit7:enable
 	branch p_mouse_puchk_set
 
 p_lpm_save_context:
@@ -816,7 +816,7 @@
 	branch p_lpm_write_gpio_loop_next,zero
 	istore 1,regc
 	until null,lpo_edge
-p_lpm_write_gpio_loop_next:	
+p_lpm_write_gpio_loop_next:
 	increase 1,rega
 	increase 1,regc
 	loop p_lpm_write_gpio_loop
@@ -844,9 +844,9 @@
 	nbranch g24_reconn_device_fail,sync
 	nbranch g24_reconn_device_fail,user3
 	call g24_ackpayload_parse
-	fetch 1,mem_24g_rxdata_length	//ack payload length 
+	fetch 1,mem_24g_rxdata_length	//ack payload length
 	branch p_recv_addr_zero_skip,blank
-p_g24_reconn_dispatch_next_2:	
+p_g24_reconn_dispatch_next_2:
 	fetch 4,mem_24g_pair_addr
 	fetcht 4,mem_24g_addr
 	isub temp,null
@@ -923,14 +923,14 @@
 	fetch 1,mem_rssi_dis_min_24g
 	bmark1 mark_24g,p_power_ctrl_txpower_decrs_next
 	fetch 1,mem_rssi_dis_min_ble
-p_power_ctrl_txpower_decrs_next:	
+p_power_ctrl_txpower_decrs_next:
 	isub temp,null
 	nrtn positive
 	fetch 1,mem_power_ctrl_level
 	beq 0,power_ctrl_decrs_level0
 	increase -1,pdata
 	store 1,mem_power_ctrl_level
-ifdef MORE_POWER_CTRL	
+ifdef MORE_POWER_CTRL
 	beq 3,p_power_ctrl_decrs_level3
 endif
 	beq 2,p_power_ctrl_decrs_level2
@@ -941,7 +941,7 @@
 	jam 0,mem_power_ctrl_pac_succ_cnt
 p_power_ctrl_txpower_incrs:
 	fetch 1,mem_power_ctrl_level
-ifdef MORE_POWER_CTRL		
+ifdef MORE_POWER_CTRL
 	beq 4,p_power_ctrl_incrs_level4
 else
 	beq 3,p_power_ctrl_incrs_level3
@@ -950,17 +950,17 @@
 	store 1,mem_power_ctrl_level
 	beq 1,power_ctrl_incrs_level1	//0dBm
 	beq 2,p_power_ctrl_incrs_level2
-ifdef MORE_POWER_CTRL	
+ifdef MORE_POWER_CTRL
 	beq 3,p_power_ctrl_incrs_level3
 p_power_ctrl_incrs_level4:	//+7dBm
 	jam TX_POWER_7DB,mem_tx_power
-	rtn		
-p_power_ctrl_decrs_level3:	
+	rtn
+p_power_ctrl_decrs_level3:
 endif
 p_power_ctrl_incrs_level3:	//+5dBm
 	jam TX_POWER_5DB,mem_tx_power
-	rtn	
-p_power_ctrl_decrs_level2:	
+	rtn
+p_power_ctrl_decrs_level2:
 p_power_ctrl_incrs_level2:	//+6dBm
 	jam TX_POWER_3DB,mem_tx_power
 	rtn
@@ -995,13 +995,13 @@
 //	call gpio_config_input
 //	fetcht 1,mem_whee_b_data_gpio
 //	branch gpio_config_input
-	
-	
+
+
 //p_mouse_24g_before_lpm_sleep:
 //	rtn
 //	fetch 1,mem_device_flag
 //	rtnne MODE_24G_DEVICE
-//	branch mouse_24g_before_lpm_sleep+2	
+//	branch mouse_24g_before_lpm_sleep+2
 
 p_mouse_default_init:
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
@@ -1016,7 +1016,7 @@
 	fetch 1,mem_select_sensor_angle_gpio
 	rtneq GPIO_DISABLE
 	call p_mouse_select_angle
-p_mouse_set_sensor_gpio_sleep: 
+p_mouse_set_sensor_gpio_sleep:
 	fetch 1,mem_config_sensor_angle
 	beq MOUSE_3CLK_ANGLE,p_mouse_set_sensor_gnd_set
 	beq MOUSE_12CLK_ANGLE,p_mouse_set_sensor_vin_set
@@ -1027,13 +1027,13 @@
 	call mouse_gpio_config_output_low
 	fetcht 1,mem_select_sensor_angle_gpio
 	branch mouse_gpio_config_input_pd
-	
+
 p_mouse_set_sensor_vin_set:
 	fetch 1,mem_select_sensor_angle_gpio
 	call mouse_gpio_config_output_high
 	fetcht 1,mem_select_sensor_angle_gpio
 	branch mouse_gpio_config_input_pu
-	
+
 p_mouse_select_angle:
 	call p_mouse_set_sensor_vin_set
 	fetcht 1,mem_select_sensor_angle_gpio
@@ -1043,7 +1043,7 @@
 	call p_mouse_set_sensor_gnd_set
 	fetcht 1,mem_select_sensor_angle_gpio
 	call gpio_get_bit
-	branch p_mouse_set_sensor_angle_float,true	
+	branch p_mouse_set_sensor_angle_float,true
 p_mouse_set_sensor_angle_vin:
 	jam MOUSE_12CLK_ANGLE,mem_config_sensor_angle
 	rtn
@@ -1067,7 +1067,7 @@
 	call p_mouse_device_flag_temp_store
 	call mouse_read_otp_dpi
 	call mouse_read_otp_device_flag
-	
+
 	call p_mouse_device_flag_check		//reinit to load info
 
 	call p_mouse_select_device_by_switch_check
@@ -1083,7 +1083,7 @@
 p_mouse_device_flag_temp_store:		//can remove:before start work check once again
 	fetch 1,mem_device_flag
 	store 1,mem_mouse_device_flag_temp
-	rtn	
+	rtn
 
 p_mouse_read_otp_device_info:
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
@@ -1102,7 +1102,7 @@
 //	fetch 1,mem_device_flag_temp
 //	store 1,mem_device_flag
 	call mouse_load_default_dpi
-	
+
 	setarg 0x1122
 	store 2,mem_random_addr_increase_count
 p_mouse_device_flag_temp_load:
@@ -1128,7 +1128,7 @@
 p_mouse_read_otp_le_addr_increase_count_loop:
 	call mouse_read_otp_le_addr_increase_count_common
 	fetch 2,mem_random_addr_increase_count_temp
-	branch p_mouse_le_addr_increase_count_load,blank	
+	branch p_mouse_le_addr_increase_count_load,blank
 	store 2,mem_random_addr_increase_count_last
 	increase 2,regc
 	fetch 2,mem_otp_offset_le_addr_increase_count_end
@@ -1182,11 +1182,11 @@
 	and pdata,0xf0,pdata
 	branch p_mouse_device_flag_store_check,blank
 	fetch 1,mem_device_flag
-	
+
 	call p_mouse_device_flag_otp_store_judge			// add device_flag check
-	
+
 	store 1,mem_device_flag_value
-p_mouse_device_flag_store_end:	
+p_mouse_device_flag_store_end:
 	arg 1,loopcnt
 	copy regc,regb
 	arg mem_device_flag_value,rega
@@ -1201,12 +1201,12 @@
 	lshift4 pdata,pdata
 	iadd temp,pdata
 	store 1,mem_device_flag_value
-	
+
 	copy regc,pdata
 	fetcht 2,mem_otp_offset_device_flag
 	isub temp,null
 	branch p_mouse_device_flag_store_end,zero
-	
+
 	increase -1,regc
 	branch p_mouse_device_flag_store_end
 
@@ -1223,7 +1223,7 @@
 p_mouse_write_otp_le_locall_addr1_loop:
 	call mouse_read_otp_le_locall_addr1_common
 	fetch 6,mem_mouse_le_locall_addr1_temp
-	branch p_mouse_le_local_addr1_store,blank	
+	branch p_mouse_le_local_addr1_store,blank
 	store 6,mem_mouse_le_locall_addr1_last
 	increase 6,regc
 	fetch 2,mem_otp_offset_le_locall_addr1_end
@@ -1248,7 +1248,7 @@
 p_mouse_write_otp_le_locall_addr2_loop:
 	call mouse_read_otp_le_locall_addr2_common
 	fetch 6,mem_mouse_le_locall_addr2_temp
-	branch p_mouse_le_local_addr2_store,blank	
+	branch p_mouse_le_local_addr2_store,blank
 	store 6,mem_mouse_le_locall_addr2_last
 	increase 6,regc
 	fetch 2,mem_otp_offset_le_locall_addr2_end
@@ -1282,7 +1282,7 @@
 	beq 0,mouse_otp_load_dpi
 	beq 6,p_mouse_dpi_reinit
 	rtn
-	
+
 p_mouse_dpi_reinit:
 	jam MOUSE_DPI_LEVEL1,mem_mouse_dpi
 	rtn
@@ -1317,9 +1317,9 @@
 	fetch 1,mem_mouse_dpi
 
 	call p_mouse_dpi_otp_store_judge		//add dpi check
-	
+
 	store 1,mem_mouse_otp_dpi_value
-p_mouse_dpi_store_end:	
+p_mouse_dpi_store_end:
 	arg 1,loopcnt
 	copy regc,regb
 	arg mem_mouse_otp_dpi_value,rega
@@ -1334,12 +1334,12 @@
 	lshift4 pdata,pdata
 	iadd temp,pdata
 	store 1,mem_mouse_otp_dpi_value
-	
+
 	copy regc,pdata
 	fetcht 2,mem_otp_offset_dpi
 	isub temp,null
 	branch p_mouse_dpi_store_end,zero
-	
+
 	increase -1,regc
 	branch p_mouse_dpi_store_end
 
@@ -1390,7 +1390,7 @@
 	beq MODE_BT_DEVICE1,p_mouse_load_le_device1
 	beq MODE_BT_DEVICE2,p_mouse_load_le_device2
 	rtn
-	
+
 p_mouse_load_le_device1:
 	fetch 6,mem_device1_addr
 	store 6,mem_hci_plap
@@ -1464,7 +1464,7 @@
 	call mouse_wheel_trigger_timer
 	call mouse_store_information_delay_timer
 	branch mouse_check_no_data_timeout_timer
-	
+
 p_mouse_le_send_conn_param_update_timer:
 	arg mem_mouse_le_send_conn_param_update_timer,regc
 	arg mouse_updata_le_param,regb
@@ -1483,8 +1483,8 @@
 p_mouse_start_discovery:
 	call mouse_sensor_powerdown
 	branch mouse_start_discovery+1
-	
-p_mouse_priority_bb_event:	
+
+p_mouse_priority_bb_event:
 	copy regc,pdata
 	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,p_mouse_le_conn_param_update_rsp_recieved
 	beq BT_EVT_LE_DISCONNECTED,p_mouse_le_bb_disconnected
@@ -1509,12 +1509,12 @@
 p_mouse_le_ll_reconn_start_encryt:
 	call mouse_updata_le_param
 	jam 5,mem_le_start_encrypt_timer
-p_mouse_le_ll_reconn_start_encryt_new:	
+p_mouse_le_ll_reconn_start_encryt_new:
 	fetch 1,mem_le_conn_rcv_new
 	store 1,mem_le_conn_first_rcv
 	branch mouse_le_ll_enable_start_enc_flag
 
-	
+
 p_mouse_le_conn_param_update_rsp_recieved:
 	fetch 1,mem_mouse_le_send_conn_param_update
 	nrtn blank
@@ -1522,7 +1522,7 @@
 	jam 30,mem_mouse_le_send_conn_param_update_timer
 	rtn
 
-p_mouse_le_bb_disconnected:	
+p_mouse_le_bb_disconnected:
 	setarg 0
 	store 1,mem_mouse_le_send_conn_param_update
 	store 1,mem_mouse_le_send_conn_param_update_timer
@@ -1533,7 +1533,7 @@
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
 	bbit1 MOUSE_ENABLE_BT_125Hz,p_mouse_le_bb_disconnected_next
 	arg LE_INTERVAL_8_75MS,temp
-p_mouse_le_bb_disconnected_next:	
+p_mouse_le_bb_disconnected_next:
 	storet 2,mem_le_interval_min
 	storet 2,mem_le_interval_min+2
 	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
@@ -1574,7 +1574,7 @@
 	rtn zero
 	call p_mouse_fetch_normal_tx_power
 	branch mouse_24g_first_store_reconn_info
-	
+
 p_mouse_24g_pairing_complete:
 	call p_mouse_fetch_normal_tx_power
 	branch mouse_24g_pairing_complete
@@ -1598,7 +1598,7 @@
 	branch mouse_24g_attempt_fail+2
 
 p_mouse_24g_fast_conn_attempt_fail:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
 	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,p_mouse_24g_start_auto_pair
 	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,p_mouse_24g_start_auto_pair
 	branch mouse_24g_fast_conn_attempt_fail+3
@@ -1610,7 +1610,7 @@
 	branch g24_reconn_start
 
 p_mouse_24g_auto_pair_attempt_fail:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
 	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_attempt_fail_enter_hibernate
 	fetch 1,mem_device_number
 	beq 1,mouse_24g_attempt_fail_enter_hibernate		//24g first mode and only 2.4g device
@@ -1634,9 +1634,9 @@
 	beq MODE_24G_DEVICE,p_mouse_24g_start_mode
 	branch mouse_le_fast_conn_judge
 
-p_mouse_24g_first_start_auto_pair_mode:	
+p_mouse_24g_first_start_auto_pair_mode:
 	call mouse_wakeup_from_power_check
-	branch p_mouse_24g_first_start_reconn,user 
+	branch p_mouse_24g_first_start_reconn,user
 p_mouse_24g_reconn_general_dongle:
 	jam MODE_24G_DEVICE,mem_device_flag
 	fetch 2,mem_mouse_24g_power_on_fast_conn_timer
@@ -1659,12 +1659,12 @@
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
 	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,p_mouse_24g_reconn_general_dongle
 	branch mouse_24g_start_mode+7
-	
+
 p_mouse_store_normal_tx_power:
 	fetch 1,mem_tx_power
 	store 1,mem_normal_tx_power
 	rtn
-	
+
 p_mouse_idle:
 	call mouse_low_voltage_led_no_enter_lpm
 	call ui_check_paring_button
@@ -1697,7 +1697,7 @@
 	call mouse_gpio_config_output_low
 	fetcht 1,mem_dpi_button_gpio
 	branch p_mouse_3io6key_check
-	
+
 p_mouse_3io6key_check:
 	copy regc,pdata
 	store 1,mem_mouse_key_status
@@ -1718,14 +1718,14 @@
 	call p_clear_wake
 	fetch 3,mem_24g_short_sleep_set
 	branch g24_long_seep2
-	
+
 
 p_clear_wake:
 	setarg 0
 	store 8,mem_gpio_wakeup_cfg	//gpio5(ice)enable wake
 	store 4,mem_gpio_wakeup_cfg+8
 	rtn
-	
+
 p_mouse_24g_hibernate_set:
 	jam 0,mem_24g_attempt_fail_flag
 	call g24_transmit_next_packet
@@ -1744,12 +1744,12 @@
 	call mouse_before_hibernate_wheel_gpio_set
 	fetch 1,mem_mouse_sensor_sdio_gpio
 	call mouse_gpio_config_output_high
-	
+
 	fetcht 1,mem_device_switch_gpio
 	call mouse_gpio_set_pupd_by_input
-	arg 21,temp	//ice band gpio			
+	arg 21,temp	//ice band gpio
 	call mouse_gpio_config_input_pu
-	
+
 	call mouse_logo_led_off
 	call p_mouse_lpm_before_common
 //	fetcht 1,mem_mouse_reuse_2ice_gpio
@@ -1762,7 +1762,7 @@
 	store 3,mem_pdatatemp
 	arg 24,loopcnt
 	arg 0,temp
-p_mouse_gpio_set_high_impedance_bit_loop:	
+p_mouse_gpio_set_high_impedance_bit_loop:
 	fetch 3,mem_pdatatemp
 	isolate1 0,pdata
 	call p_gpio_set_analog,true
@@ -1821,7 +1821,7 @@
 	call gpio_out_inactive
 	fetcht 1,mem_device_switch_gpio
 	branch mouse_gpio_config_input_pu
-	
+
 p_mouse_switch_gpio_connect_vin:
 	fetcht 1,mem_device_switch_gpio
 	call gpio_get_bit
@@ -1836,7 +1836,7 @@
 	call gpio_out_active
 	fetcht 1,mem_device_switch_gpio
 	branch mouse_gpio_config_input_pd
-	
+
 p_mouse_init_sensor:
 	call mouse_read_sensor_id
 	beq P32XX_ID1,mouse_init_p32xx_id2_judge
@@ -1880,7 +1880,7 @@
 	store 6,mem_mouse_x
 	call p_mouse_check_sensor_data
 	setarg 0x0089
-	call twspi_write	
+	call twspi_write
 	call mouse_setting_sensor_type
 	call mouse_zwheel
 	call mouse_t_zwheel
@@ -1890,14 +1890,43 @@
 p_mouse_key:
 	call mouse_check_firekey_gpio
 	fetch 1,mem_fire_key_flag
-	nbranch fire_key_press,blank
+	nbranch p_fire_key_press,blank
 	fetch 1,mem_fire_key_status
-	nbranch fire_key_process,blank
-	
+	nbranch p_fire_key_process,blank
+
 	call mouse_check_key_gpio
 	call p_mouse_ghost_key_check
 	branch mouse_key+7
 
+p_fire_key_process:
+	beq 4,fire_key_process_end
+p_fire_key_press:
+	call firekey_clkn_bt_timer_check
+	fetch 4,mem_fire_key_delay
+	arg 0xa0,temp
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	store 4,mem_fire_key_delay
+	fetch 1,mem_fire_key_status
+	beq 0,fire_key_process_start
+	beq 1,fire_key_process_release1
+	beq 2,fire_key_process_start2
+	beq 3,p_fire_key_process_release2
+	rtn
+p_fire_key_process_release2:
+	fetch 1,mem_fire_key_flag
+	beq 1,p_fire_key_status_set4
+	jam 0,mem_fire_key_status
+	branch fire_key_release
+
+p_fire_key_status_set4:
+	jam 4,mem_fire_key_status
+	branch fire_key_release
+
+
+
 p_mouse_ghost_key_check:			//lbk_mfw
 	jam 0,mem_mouse_matrix_key_cow_count
 	jam 0,mem_mouse_matrix_key_row_count
@@ -1942,7 +1971,7 @@
 	call p_mouse_ghost_key_check_L_FW
 	call p_mouse_ghost_key_check_M_BK
 	branch mouse_ghost_key_check_next
-	
+
 p_mouse_ghost_key_MBK_RFW:
 	call p_mouse_ghost_key_check_M_BK
 p_mouse_ghost_key_RFW:
@@ -1990,8 +2019,8 @@
 	rtn blank
 	store 8,mem_adc_reference3v_gpio1v_ft_data
 	ifetch 2,contr
-	istore 2,contw	
-	//call  eut_test_data_init	
+	istore 2,contw
+	//call  eut_test_data_init
 	rtn
 
 p_sadc_cal_write:
@@ -2004,9 +2033,9 @@
 	arg 8,loopcnt	//rg_gpadc_sar_dat_sel c0-c7
 	call sadc_cal_write+4
 	storer regb,1,mem_spi_write_addr
-	fetch 1,core_gpadc_cfg2	
-	set0 4,pdata//caliberation write disable	
-	store 1,core_gpadc_cfg2	
+	fetch 1,core_gpadc_cfg2
+	set0 4,pdata//caliberation write disable
+	store 1,core_gpadc_cfg2
 	rtn
 
 p_vdd_calculate_by_mode:
@@ -2022,7 +2051,7 @@
 	beq ADC_CONFIG_HVIN,p_vdd_reference_inter3V_calculate_by_mode_vdcdc
 	beq ADC_CONFIG_GPIO,p_vdd_reference_inter3V_calculate_by_mode_gpio
 	rtn
-	
+
 p_vdd_reference_inter3V_calculate_by_mode_vdcdc:
 	setarg 1000
 	store 2,mem_reference_voltage
@@ -2031,7 +2060,7 @@
 	arg 3600,regc
 	call vdd_calculate
 	branch p_mul1V_div1V_to_cal
-	
+
 p_vdd_reference_inter3V_calculate_by_mode_gpio:
 	setarg 1000
 	store 2,mem_reference_voltage
@@ -2045,7 +2074,7 @@
 	fetcht 2,mem_adc_reference3v_inter1v_now_data
 	idiv temp
 	branch get_div_result
-	
+
 p_enable_adc_init_config:
 	call p_sadc_cal_write
 	fetch 1,core_gpadc_cfg1
@@ -2063,7 +2092,7 @@
 	beq SADC_REFERENCE_INTER3V,p_enable_adc_reference_source_inter3V
 	beq SADC_REFERENCE_INTER1P8V_DIV2,p_enable_adc_reference_source_inter1p8V
 	branch p_enable_adc_reference_source_inter3V
-endif		
+endif
 p_enable_adc_reference_source_inter3V:
 	call p_enable_adc_init_config
 	call sadc_channel
@@ -2071,9 +2100,9 @@
 	store 1,core_sadc_clkdiv
 	call sadc_read
 	jam 0x60,core_vtest_ctrl0
-	jam 0x00,core_sadc_clkdiv	
+	jam 0x00,core_sadc_clkdiv
 //	rtn
-	
+
 p_read_adc_inter1V:
 	call p_enable_adc_init_config
 	fetch 1,mem_adc_clkdiv
@@ -2083,13 +2112,13 @@
 
 	arg 0xb,regext_index
 	fetchr regext, 2,mem_adc_current_value
-	
-	jam 0x03,core_sadc_ctrl	
+
+	jam 0x03,core_sadc_ctrl
 	call p_sar_adc_read_wait
 	fetcht 2,core_sadc_data
-	storet 2,mem_adc_reference3v_inter1v_now_data 
+	storet 2,mem_adc_reference3v_inter1v_now_data
 	call sadc_read_wait+4
-	
+
 	arg 0xb,regext_index
 	storer regext,2,mem_adc_current_value
 
@@ -2110,7 +2139,7 @@
 	beq ADC_CONFIG_HVIN,p_vdd_reference_inter1p8V_calculate_by_mode_vdcdc
 	beq ADC_CONFIG_GPIO,p_vdd_reference_inter1p8V_div2_calculate_by_mode_gpio
 	rtn
-	
+
 p_vdd_reference_inter1p8V_calculate_by_mode_vdcdc:
 	setarg 2000
 	store 2,mem_reference_voltage
@@ -2126,7 +2155,7 @@
 	fetch 2,mem_reference_inter1p8v_1v_adc_io_data
 	arg 2000,regc
 	branch p_vdd_calculate00
-	
+
 p_vdd_calculate00:
 	isub temp,rega
 	fetch 2,mem_adc_current_value
@@ -2139,7 +2168,7 @@
 	isub regb,pdata
 	nbranch set_pdata_0,positive
 	branch vdd_calculate2
-	
+
 p_vdd_calculate11:
 	copy temp,pdata
 	fetcht 2,mem_adc_current_value
@@ -2151,10 +2180,10 @@
 	iadd regb,pdata
 	branch vdd_calculate2
 
-p_enable_adc_reference_source_inter1p8V:	
+p_enable_adc_reference_source_inter1p8V:
 	fetch 1,mem_adc_config_flag
 	beq ADC_CONFIG_HVIN,p_enable_adc_reference_source_inter1p8V_vdcdc
-p_enable_adc_reference_source_inter1p8V_div2_gpio:	
+p_enable_adc_reference_source_inter1p8V_div2_gpio:
 	call p_sadc_cal_write
 	fetch 1,core_gpadc_cfg1
 	set0 7,pdata
@@ -2171,7 +2200,7 @@
 	jam 0x00,core_sadc_clkdiv
 	jam 0x00,0x8ac6
 	rtn
-	
+
 p_enable_adc_reference_source_inter1p8V_vdcdc:
 	call p_sadc_cal_write
 	fetch 1,core_gpadc_cfg1
@@ -2185,7 +2214,7 @@
 	fetch 1,mem_adc_clkdiv
 	store 1,core_sadc_clkdiv
 	call  sadc_read
-	
+
 	jam 0x00,core_sadc_clkdiv
 	jam 0x00,0x8ac6
 	rtn
@@ -2198,7 +2227,7 @@
 /*
 core_clksel
 [7:6]pwm clock select
-	0:sysclk 
+	0:sysclk
 	1:sysclk undivided
 	2:rc2M
 	3:lpo
Index: sched/mouse.dat
===================================================================
--- /1121s/branch/mouse/YJX_Project/Only_24G_V98/sched/mouse.dat	(revision 2570)
+++ /1121s/branch/mouse/YJX_Project/Only_24G_V98/sched/mouse.dat	(working copy)
@@ -52,7 +52,7 @@
 #bit6 MOUSE_ENABLE_DPI_LOW_FOR_LED
 00
 
-#mouse flag byte6 
+#mouse flag byte6
 #bit0 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
 #bit1 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON
 #bit2 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO
@@ -89,8 +89,8 @@
 06 #mem_lbutton_gpio
 07 #mem_mbutton_gpio
 08 #mem_rbutton_gpio
-08 #mem_bk_button_gpio
-07 #mem_fw_button_gpio
+07 #mem_bk_button_gpio
+08 #mem_fw_button_gpio
 06 #mem_dpi_button_gpio
 12 #mem_whee_a_data_gpio
 14 #mem_whee_b_data_gpio
@@ -185,7 +185,7 @@
 mem_24g_ch_map_update:00   #00--disable   01--enable
 mem_24g_long_sleep_set_level:02    #00--30ms   01--50ms  02--80ms  03--100ms
 mem_24g_disable_fec1:00	 	#00--default mode  01--new process
-mem_mouse_sleep_deal_type:00	#00:old version	01 new version	
+mem_mouse_sleep_deal_type:00	#00:old version	01 new version
 mem_24g_rx_window:c0 12     #400us  ## e0 2e#1ms #transmitter long range min:520us
 
 mem_mouse_24g_short_sleep_set_4ms:ee 4d 00	#1662us
@@ -221,15 +221,15 @@
 mem_le_adv_data_len:1f
 mem_le_adv_data:
 #flag
-02 01 05 
+02 01 05
 #uuid
-03 03 12 18 
+03 03 12 18
 #appearance
 03 19 c2 03
 
 mem_le_adv_swift_pair:
 #microsoft swift pair
-06 ff 06 00 03 00 80	
+06 ff 06 00 03 00 80
 #name
 '\09BT5.2 Mouse
 
@@ -259,7 +259,7 @@
 mem_eeprom_block_size:80
 
 #otp write info offset
-mem_otp_offset_dpi:b9 1a										#6841 begin		3level:99count	----------info begin	
+mem_otp_offset_dpi:b9 1a										#6841 begin		3level:99count	----------info begin
 mem_otp_offset_dpi_end:ea 1a								#6890 end
 
 mem_otp_offset_device_flag:eb 1a							#6891 begin		400 count
@@ -281,7 +281,7 @@
 mem_otp_offset_le_locall_addr2_end:fa 1e					#7930  end
 
 mem_otp_offset_le_addr_increase_count:fb 1e			#7931 begin		100 count
-mem_otp_offset_le_addr_increase_count_end:ac 1f		#8108 end					----------info over	
+mem_otp_offset_le_addr_increase_count_end:ac 1f		#8108 end					----------info over
 
 mem_otp_offset_app_initflag:ae 1f		#8110 end
 
@@ -292,7 +292,7 @@
 
 #rf
 mem_tx_power:03	#00--0db 01--3db  02--5db  03--f3db  04--f5db
-mem_mouse_24g_pair_tx_power:94 #94: -20dBm  9e: -30dBm  9f: -35dBm a0: -40dBm 
+mem_mouse_24g_pair_tx_power:94 #94: -20dBm  9e: -30dBm  9f: -35dBm a0: -40dBm
 mem_rssi_buff_index:07
 mem_rssi_signal_buf_ptr:mem_mouse_rssi_signal_buf
 mem_rssi_dis_min_24g_init:85
