Index: output/auth.rom
===================================================================
--- /1121s/branch/mouse/YJX_Project/mouse_public_yjx/output/auth.rom	(nonexistent)
+++ /1121s/branch/mouse/YJX_Project/mouse_public_yjx/output/auth.rom	(working copy)
@@ -0,0 +1,1773 @@
+01
+00
+02
+00
+28
+02
+00
+18
+02
+00
+02
+03
+28
+01
+0a
+03
+00
+02
+00
+2a
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+02
+03
+28
+01
+02
+05
+00
+02
+01
+2a
+02
+c2
+03
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+08
+00
+02
+00
+28
+02
+01
+18
+09
+00
+02
+03
+28
+01
+20
+0a
+00
+02
+05
+2a
+00
+0b
+00
+02
+02
+29
+02
+00
+00
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+29
+2a
+06
+59
+69
+43
+68
+69
+70
+0f
+00
+02
+03
+28
+01
+02
+10
+00
+02
+50
+2a
+07
+02
+35
+12
+22
+aa
+01
+00
+11
+00
+02
+00
+28
+02
+12
+18
+12
+00
+02
+03
+28
+01
+06
+13
+00
+02
+4e
+2a
+01
+01
+14
+00
+02
+03
+28
+01
+12
+15
+00
+02
+4d
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+02
+02
+29
+02
+00
+00
+17
+00
+02
+08
+29
+02
+02
+01
+18
+00
+02
+03
+28
+01
+1a
+19
+00
+02
+4d
+2a
+07
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+02
+02
+29
+02
+00
+00
+1b
+00
+02
+08
+29
+02
+01
+01
+1c
+00
+02
+03
+28
+01
+12
+1d
+00
+02
+4d
+2a
+02
+00
+00
+1e
+00
+02
+02
+29
+02
+00
+00
+1f
+00
+02
+08
+29
+02
+03
+01
+20
+00
+02
+03
+28
+01
+12
+21
+00
+02
+4d
+2a
+02
+00
+00
+22
+00
+02
+02
+29
+02
+00
+00
+23
+00
+02
+08
+29
+02
+04
+01
+24
+00
+02
+03
+28
+01
+0e
+25
+00
+02
+4d
+2a
+02
+00
+00
+26
+00
+02
+08
+29
+02
+02
+02
+27
+00
+02
+03
+28
+01
+02
+28
+00
+02
+4b
+2a
+bd
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+08
+15
+00
+25
+01
+75
+01
+95
+08
+81
+02
+05
+01
+09
+30
+09
+31
+16
+01
+f8
+26
+ff
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+05
+01
+09
+06
+a1
+01
+85
+02
+75
+01
+95
+08
+05
+07
+19
+e0
+29
+e7
+15
+00
+25
+01
+81
+02
+95
+01
+75
+08
+81
+03
+95
+05
+75
+01
+05
+08
+19
+01
+29
+05
+91
+02
+95
+01
+75
+03
+91
+03
+95
+06
+75
+08
+15
+00
+26
+ff
+00
+05
+07
+19
+00
+29
+ff
+81
+00
+c0
+05
+0c
+09
+01
+a1
+01
+85
+03
+19
+00
+2a
+ff
+03
+15
+00
+26
+ff
+03
+95
+01
+75
+10
+81
+00
+c0
+05
+01
+09
+80
+A1
+01
+85
+04
+15
+00
+25
+01
+75
+01
+95
+03
+19
+81
+29
+83
+81
+02
+95
+01
+75
+05
+81
+03
+C0
+29
+00
+02
+03
+28
+01
+1a
+2a
+00
+02
+33
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+02
+02
+29
+02
+01
+00
+2c
+00
+02
+03
+28
+01
+02
+2d
+00
+02
+4a
+2a
+04
+01
+01
+00
+03
+2e
+00
+02
+00
+28
+02
+0f
+18
+2f
+00
+02
+03
+28
+01
+12
+30
+00
+02
+19
+2a
+01
+64
+31
+00
+02
+02
+29
+02
+00
+00
+32
+00
+02
+03
+28
+01
+04
+33
+00
+02
+4c
+2a
+00
+00
+00
+1a
+06
+bc
+ff
+09
+88
+a1
+01
+85
+04
+19
+00
+2a
+ff
+00
+15
+00
+26
+ff
+00
+75
+08
+95
+01
+81
+00
+c0
+3f
+05
+01
+09
+06
+a1
+01
+75
+01
+95
+08
+05
+07
+19
+e0
+29
+e7
+15
+00
+25
+01
+81
+02
+95
+01
+75
+08
+81
+03
+95
+05
+75
+01
+05
+08
+19
+01
+29
+05
+91
+02
+95
+01
+75
+03
+91
+03
+95
+06
+75
+08
+15
+00
+25
+ff
+05
+07
+19
+00
+29
+ff
+81
+00
+c0
+a3
+05
+01
+09
+02
+a1
+01
+85
+01
+09
+01
+a1
+00
+05
+09
+19
+01
+29
+05
+15
+00
+25
+01
+95
+05
+75
+01
+81
+02
+95
+01
+75
+03
+81
+01
+05
+01
+09
+30
+09
+31
+16
+01
+F8
+26
+FF
+07
+75
+10
+95
+02
+81
+06
+09
+38
+15
+81
+25
+7f
+75
+08
+95
+01
+81
+06
+05
+0c
+0a
+38
+02
+95
+01
+81
+06
+c0
+c0
+05
+01
+09
+80
+a1
+01
+85
+02
+05
+01
+19
+81
+29
+88
+15
+00
+25
+01
+95
+08
+75
+01
+81
+06
+c0
+05
+0c
+09
+01
+a1
+01
+85
+03
+15
+00
+26
+80
+03
+19
+00
+2a
+80
+03
+75
+10
+95
+01
+81
+00
+c0
+06
+00
+ff
+09
+0e
+a1
+01
+85
+BA
+95
+1f
+75
+08
+26
+ff
+00
+15
+00
+09
+01
+91
+02
+85
+BA
+95
+1f
+75
+08
+26
+ff
+00
+15
+00
+09
+01
+81
+02
+C0
+12
+12
+01
+00
+02
+00
+00
+00
+40
+51
+31
+20
+10
+02
+00
+01
+02
+00
+01
+3b
+09
+02
+3b
+00
+02
+01
+00
+a0
+32
+09
+04
+00
+00
+01
+03
+01
+01
+00
+09
+21
+00
+02
+00
+01
+22
+1a
+00
+07
+05
+81
+03
+40
+00
+02
+09
+04
+01
+00
+01
+03
+01
+02
+00
+09
+21
+00
+02
+00
+01
+22
+a3
+00
+07
+05
+82
+03
+40
+00
+02
+01
+00
+02
+00
+28
+02
+01
+18
+02
+00
+02
+03
+28
+01
+20
+03
+00
+02
+05
+2a
+01
+00
+04
+00
+02
+02
+29
+02
+00
+00
+05
+00
+02
+00
+28
+02
+00
+18
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+00
+2a
+13
+43
+68
+69
+70
+73
+65
+61
+2d
+42
+4c
+45
+20
+20
+20
+20
+20
+20
+20
+20
+08
+00
+02
+03
+28
+01
+02
+09
+00
+02
+01
+2a
+02
+c1
+03
+0a
+00
+02
+03
+28
+01
+02
+0b
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+50
+2a
+07
+02
+8a
+24
+66
+82
+01
+00
+0f
+00
+02
+00
+28
+02
+12
+18
+10
+00
+02
+03
+28
+01
+06
+11
+00
+02
+4e
+2a
+01
+01
+12
+00
+02
+03
+28
+01
+12
+13
+00
+02
+4d
+2a
+02
+00
+00
+14
+00
+02
+02
+29
+02
+00
+00
+15
+00
+02
+08
+29
+02
+02
+01
+16
+00
+02
+03
+28
+01
+12
+17
+00
+02
+4d
+2a
+02
+00
+00
+18
+00
+02
+02
+29
+02
+00
+00
+19
+00
+02
+08
+29
+02
+03
+01
+1a
+00
+02
+03
+28
+01
+02
+1b
+00
+02
+4b
+2a
+1b
+05
+0c
+09
+01
+a1
+01
+85
+02
+09
+e9
+09
+ea
+09
+e2
+09
+30
+15
+01
+25
+0c
+75
+10
+95
+01
+81
+00
+c0
+1c
+00
+02
+03
+28
+01
+02
+1d
+00
+02
+4a
+2a
+04
+11
+01
+00
+01
+1e
+00
+02
+03
+28
+01
+04
+1f
+00
+02
+4c
+2a
+01
+00
+20
+00
+02
+00
+28
+02
+0f
+18
+21
+00
+02
+03
+28
+01
+12
+22
+00
+02
+19
+2a
+01
+63
+00
+00
+02
+13
+00
+02
+00
+02
+13
+00
+01
+00
+02
+13
+00
+04
+00
+02
+13
+00
+06
+00
+02
+13
+00
+05
+00
+02
+13
+00
+00
+00
+02
+17
+00
+00
+28
+02
+17
+00
+00
+00
+01
+00
+02
+00
+28
+02
+01
+18
+02
+00
+02
+03
+28
+01
+20
+03
+00
+02
+05
+2a
+01
+00
+04
+00
+02
+02
+29
+02
+00
+00
+05
+00
+02
+00
+28
+02
+00
+18
+06
+00
+02
+03
+28
+01
+02
+07
+00
+02
+00
+2a
+11
+55
+43
+48
+4f
+4e
+20
+30
+31
+20
+20
+20
+20
+20
+20
+20
+20
+20
+08
+00
+02
+03
+28
+01
+02
+09
+00
+02
+01
+2a
+02
+c8
+00
+0a
+00
+02
+03
+28
+01
+02
+0b
+00
+02
+04
+2a
+08
+06
+00
+06
+00
+64
+00
+2c
+01
+0c
+00
+02
+00
+28
+02
+0a
+18
+0d
+00
+02
+03
+28
+01
+02
+0e
+00
+02
+50
+2a
+07
+02
+8a
+24
+66
+82
+01
+00
+0f
+00
+02
+00
+28
+02
+f0
+ff
+10
+00
+02
+03
+28
+01
+12
+11
+00
+02
+f1
+ff
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+02
+02
+29
+02
+00
+00
+13
+00
+02
+03
+28
+01
+08
+14
+00
+02
+f2
+ff
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+2f
+8a
+42
+91
+44
+37
+71
+cf
+fb
+c0
+b5
+a5
+db
+b5
+e9
+5b
+c2
+56
+39
+f1
+11
+f1
+59
+a4
+82
+3f
+92
+d5
+5e
+1c
+ab
+98
+aa
+07
+d8
+01
+5b
+83
+12
+be
+85
+31
+24
+c3
+7d
+0c
+55
+74
+5d
+be
+72
+fe
+b1
+de
+80
+a7
+06
+dc
+9b
+74
+f1
+9b
+c1
+c1
+69
+9b
+e4
+86
+47
+be
+ef
+c6
+9d
+c1
+0f
+cc
+a1
+0c
+24
+6f
+2c
+e9
+2d
+aa
+84
+74
+4a
+dc
+a9
+b0
+5c
+da
+88
+f9
+76
+52
+51
+3e
+98
+6d
+c6
+31
+a8
+c8
+27
+03
+b0
+c7
+7f
+59
+bf
+f3
+0b
+e0
+c6
+47
+91
+a7
+d5
+51
+63
+ca
+06
+67
+29
+29
+14
+85
+0a
+b7
+27
+38
+21
+1b
+2e
+fc
+6d
+2c
+4d
+13
+0d
+38
+53
+54
+73
+0a
+65
+bb
+0a
+6a
+76
+2e
+c9
+c2
+81
+85
+2c
+72
+92
+a1
+e8
+bf
+a2
+4b
+66
+1a
+a8
+70
+8b
+4b
+c2
+a3
+51
+6c
+c7
+19
+e8
+92
+d1
+24
+06
+99
+d6
+85
+35
+0e
+f4
+70
+a0
+6a
+10
+16
+c1
+a4
+19
+08
+6c
+37
+1e
+4c
+77
+48
+27
+b5
+bc
+b0
+34
+b3
+0c
+1c
+39
+4a
+aa
+d8
+4e
+4f
+ca
+9c
+5b
+f3
+6f
+2e
+68
+ee
+82
+8f
+74
+6f
+63
+a5
+78
+14
+78
+c8
+84
+08
+02
+c7
+8c
+fa
+ff
+be
+90
+eb
+6c
+50
+a4
+f7
+a3
+f9
+be
+f2
+78
+71
+c6
Index: output/otp.dat
===================================================================
--- /1121s/branch/mouse/YJX_Project/mouse_public_yjx/output/otp.dat	(revision 1498)
+++ /1121s/branch/mouse/YJX_Project/mouse_public_yjx/output/otp.dat	(working copy)
@@ -11,7 +11,7 @@
 00
 aa
 55
-e6
+fe
 14
 c2
 84
@@ -88,11 +88,11 @@
 c0
 3d
 05
-34
+23
 c0
 3e
-85
-03
+84
+f2
 c0
 3f
 84
@@ -100,7 +100,7 @@
 c0
 40
 84
-dd
+cc
 c0
 42
 03
@@ -144,7 +144,7 @@
 c0
 48
 04
-d2
+c1
 c0
 4a
 84
@@ -152,11 +152,11 @@
 c0
 4b
 04
-bb
+aa
 c0
 58
 85
-11
+00
 c0
 62
 82
@@ -2020,7 +2020,7 @@
 20
 40
 04
-c7
+b6
 20
 20
 5b
@@ -2780,7 +2780,7 @@
 20
 40
 04
-d2
+c1
 6f
 e0
 c6
@@ -4779,10 +4779,6 @@
 b5
 20
 40
-04
-ab
-20
-40
 54
 e5
 68
@@ -4793,70 +4789,6 @@
 20
 6e
 d3
-6f
-e1
-c7
-3c
-67
-e1
-86
-70
-df
-20
-00
-18
-d8
-40
-00
-00
-6f
-e1
-86
-70
-2f
-ef
-fe
-00
-20
-40
-84
-b8
-6f
-e1
-86
-70
-1f
-e3
-7e
-00
-67
-e1
-86
-70
-18
-40
-84
-01
-c2
-00
-04
-af
-20
-60
-00
-00
-18
-46
-7c
-ff
-20
-62
-80
-00
-20
-20
-6f
-0b
 c6
 93
 00
@@ -4880,7 +4812,7 @@
 24
 5a
 04
-d0
+bf
 6f
 e4
 47
@@ -4888,7 +4820,7 @@
 c3
 0b
 04
-c5
+b4
 6f
 e0
 c9
@@ -4900,7 +4832,7 @@
 20
 40
 04
-c7
+b6
 20
 20
 60
@@ -5000,7 +4932,7 @@
 c0
 18
 04
-e2
+d1
 c0
 18
 d9
@@ -5008,7 +4940,7 @@
 c0
 2c
 04
-ed
+dc
 20
 20
 59
@@ -5020,7 +4952,7 @@
 c0
 2d
 04
-e5
+d4
 20
 20
 59
@@ -5036,7 +4968,7 @@
 c0
 61
 04
-e9
+d8
 20
 20
 59
@@ -5068,7 +5000,7 @@
 c0
 2c
 84
-f1
+e0
 20
 20
 59
@@ -5100,7 +5032,7 @@
 c0
 05
 84
-f9
+e8
 20
 20
 59
@@ -5116,7 +5048,7 @@
 c0
 7f
 84
-ff
+ee
 68
 48
 c6
@@ -5151,8 +5083,8 @@
 57
 c0
 06
-85
-06
+84
+f5
 20
 20
 57
@@ -5163,16 +5095,16 @@
 90
 c0
 00
-05
-0b
+04
+fa
 c0
 00
-85
-0d
+84
+fc
 c0
 01
-05
-0f
+04
+fe
 20
 60
 00
@@ -5207,8 +5139,8 @@
 96
 20
 40
-54
-10
+05
+03
 20
 20
 53
@@ -5244,7 +5176,7 @@
 20
 40
 05
-20
+0f
 68
 48
 c6
@@ -5256,7 +5188,7 @@
 20
 40
 05
-30
+1f
 20
 20
 54
@@ -5356,13 +5288,105 @@
 20
 40
 04
-f4
+e3
+58
+00
+00
+89
 20
+40
+69
+e4
 20
+40
+57
+47
+20
+40
 56
-06
-65
-7d
+12
+20
+40
+56
+17
+20
+40
+05
+2e
+20
+20
+56
+0c
+20
+40
+58
+4c
+6f
+e0
+c9
+87
+24
+3a
+58
+60
+6f
+e0
+c9
+82
+24
+3a
+58
+5f
+20
+40
+58
+88
+20
+40
+05
+36
+20
+20
+57
+ad
+70
+49
+79
+00
+70
+49
+7a
+00
+70
+49
+7b
+00
+1f
+e2
+24
+00
+20
+40
+57
+fb
+20
+40
+05
+3d
+20
+20
+57
+e5
+1a
+41
+7e
+0a
+20
+20
+57
+f6
+f8
+dc
 aa
 55
 40
@@ -6766,6 +6790,6 @@
 55
 6d
 7e
-3d
-51
+a0
+0a
 20
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/YJX_Project/mouse_public_yjx/output/program.lis	(revision 1498)
+++ /1121s/branch/mouse/YJX_Project/mouse_public_yjx/output/program.lis	(working copy)
@@ -18,10 +18,10 @@
 000f c0398491 beq patch0e_3 ,p_mouse_setgpio_hibernate 
 0010 c03a0216 beq patch0e_4 ,p_mouse_lpm_before_common 
 0011 c03b8038 beq patch0e_7 ,p_mouse_adc_read_start 
-0012 c03d0534 beq patch0f_2 ,p_mouse_motion 
-0013 c03e8503 beq patch0f_5 ,p_mouse_setting_sensor_type 
+0012 c03d0523 beq patch0f_2 ,p_mouse_motion 
+0013 c03e84f2 beq patch0f_5 ,p_mouse_setting_sensor_type 
 0014 c03f8471 beq patch0f_7 ,p_mouse_3io6key_check 
-0015 c04084dd beq patch10_1 ,p_mouse_init_sensor 
+0015 c04084cc beq patch10_1 ,p_mouse_init_sensor 
 0016 c042038c beq patch10_4 ,p_mouse_buletooth_fast_conn_end 
 0017 c04283d8 beq patch10_5 ,p_mouse_priority_bb_event 
 0018 c04301df beq patch10_6 ,p_mouse_le 
@@ -32,10 +32,10 @@
 001d c04602e1 beq patch11_4 ,p_mouse_store_device_info 
 001e c0468349 beq patch11_5 ,p_mouse_store_dpi_info_check 
 001f c047045b beq patch11_6 ,p_mouse_idle 
-0020 c04804d2 beq patch12_0 ,p_mouse_check_select_device_by_switch 
+0020 c04804c1 beq patch12_0 ,p_mouse_check_select_device_by_switch 
 0021 c04a8488 beq patch12_5 ,p_mouse_24g_hibernate_set 
-0022 c04b04bb beq patch12_6 ,p_mouse_24g_package_data 
-0023 c0588511 beq patch16_1 ,p_mouse_init 
+0022 c04b04aa beq patch12_6 ,p_mouse_24g_package_data 
+0023 c0588500 beq patch16_1 ,p_mouse_init 
 0024 c062823c beq patch18_5 ,p_otp_read_data 
 0025 c06a81fe beq patch1a_5 ,p_gpio_set_wake_by_current_state 
 0026 c06b01f7 beq patch1a_6 ,p_gpio_set_wake 
@@ -613,7 +613,7 @@
 01f2 20405ab2 call mouse_check_125hz 
 01f3 24740000 nrtn user 
 01f4 20405abc call mouse_current_mult_update 
-01f5 204004c7 call p_mouse_data_xy_release 
+01f5 204004b6 call p_mouse_data_xy_release 
 01f6 20205b37 branch mouse_le_next + 12 
 
 p_gpio_set_wake:
@@ -887,7 +887,7 @@
 p_mouse_select_device_by_switch_check:
 02b1 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
 02b2 c4150000 rtnbit0 mouse_enable_select_device_by_switch_gpio 
-02b3 204004d2 call p_mouse_check_select_device_by_switch 
+02b3 204004c1 call p_mouse_check_select_device_by_switch 
 
 p_mouse_device_flag_temp_store:
 02b4 6fe0c666 fetch 1 ,mem_device_flag 
@@ -1553,208 +1553,218 @@
 04a4 20406f0f call gpio_set_high_impedance 
 04a5 6848c65b fetcht 1 ,mem_mouse_reuse_2ice_gpio 
 04a6 204055b5 call mouse_gpio_config_input_pu 
-04a7 204004ab call p_mouse_gpio_set_high_impedance 
-04a8 204054e5 call mouse_setgpio_hibernate_next 
-04a9 6848c654 fetcht 1 ,mem_matrix_public_gpio 
-04aa 20206ed3 branch gpio_clr_wake 
-
-p_mouse_gpio_set_high_impedance:
-04ab 6fe1c73c fetch 3 ,mem_mouse_set_high_impedance_bit_set 
-04ac 67e18670 store 3 ,mem_pdatatemp 
-04ad df200018 arg 24 ,loopcnt 
-04ae d8400000 arg 0 ,temp 
-
-p_mouse_gpio_set_high_impedance_bit_loop:
-04af 6fe18670 fetch 3 ,mem_pdatatemp 
-04b0 2feffe00 isolate1 0 ,pdata 
-04b1 204084b8 call p_gpio_set_analog ,true 
-04b2 6fe18670 fetch 3 ,mem_pdatatemp 
-04b3 1fe37e00 rshift pdata ,pdata 
-04b4 67e18670 store 3 ,mem_pdatatemp 
-04b5 18408401 increase 1 ,temp 
-04b6 c20004af loop p_mouse_gpio_set_high_impedance_bit_loop 
-04b7 20600000 rtn 
-
-p_gpio_set_analog:
-04b8 18467cff sub temp ,ui_button_gpio_disable ,null 
-04b9 20628000 rtn zero 
-04ba 20206f0b branch gpio_set_analog 
+04a7 204054e5 call mouse_setgpio_hibernate_next 
+04a8 6848c654 fetcht 1 ,mem_matrix_public_gpio 
+04a9 20206ed3 branch gpio_clr_wake 
 
 p_mouse_24g_package_data:
-04bb c6930000 rtnmark0 mark_24g 
-04bc 20405601 call mouse_motion 
-04bd 24740000 nrtn user 
-04be 6fe0c77c fetch 1 ,mem_mouse_24g_long_sleep_flag 
-04bf 70477c00 jam 0 ,mem_mouse_24g_long_sleep_flag 
-04c0 245a04d0 ncall p_mouse_24g_short_sleep_clear_wake ,blank 
-04c1 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
-04c2 c30b04c5 bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
-04c3 6fe0c96c fetch 1 ,mem_customer_key 
-04c4 243a60b6 nbranch mouse_24g_keyboard_package_data ,blank 
+04aa c6930000 rtnmark0 mark_24g 
+04ab 20405601 call mouse_motion 
+04ac 24740000 nrtn user 
+04ad 6fe0c77c fetch 1 ,mem_mouse_24g_long_sleep_flag 
+04ae 70477c00 jam 0 ,mem_mouse_24g_long_sleep_flag 
+04af 245a04bf ncall p_mouse_24g_short_sleep_clear_wake ,blank 
+04b0 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
+04b1 c30b04b4 bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
+04b2 6fe0c96c fetch 1 ,mem_customer_key 
+04b3 243a60b6 nbranch mouse_24g_keyboard_package_data ,blank 
 
 p_mouse_24g_mouse_package_data:
-04c5 204004c7 call p_mouse_data_xy_release 
-04c6 202060a2 branch mouse_24g_mouse_package_data + 1 
+04b4 204004b6 call p_mouse_data_xy_release 
+04b5 202060a2 branch mouse_24g_mouse_package_data + 1 
 
 p_mouse_data_xy_release:
-04c7 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-04c8 c1ff8000 rtnne gpio_disable 
-04c9 6fe0c77d fetch 1 ,mem_mouse_long_mult_flag 
-04ca 207a0000 rtn blank 
-04cb 1fe0ffff increase -1 ,pdata 
-04cc 67e0c77d store 1 ,mem_mouse_long_mult_flag 
-04cd 58000000 setarg 0 
-04ce 67e24847 store 4 ,mem_mouse_x 
-04cf 20205a73 branch mouse_init_sensor_reset 
+04b6 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
+04b7 c1ff8000 rtnne gpio_disable 
+04b8 6fe0c77d fetch 1 ,mem_mouse_long_mult_flag 
+04b9 207a0000 rtn blank 
+04ba 1fe0ffff increase -1 ,pdata 
+04bb 67e0c77d store 1 ,mem_mouse_long_mult_flag 
+04bc 58000000 setarg 0 
+04bd 67e24847 store 4 ,mem_mouse_x 
+04be 20205a73 branch mouse_init_sensor_reset 
 
 p_mouse_24g_short_sleep_clear_wake:
-04d0 20400482 call p_clear_wake 
-04d1 2020022d branch p_lpm_write_gpio_wakeup 
+04bf 20400482 call p_clear_wake 
+04c0 2020022d branch p_lpm_write_gpio_wakeup 
 
 p_mouse_check_select_device_by_switch:
-04d2 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
-04d3 c4150000 rtnbit0 mouse_enable_select_device_by_switch_gpio 
-04d4 c31fdeb9 bbit0 mouse_enable_switch_gpio_connect_vin ,mouse_switch_gpio_connect_gnd 
+04c1 6fe44713 fetch mouse_flag_len ,mem_mouse_flag 
+04c2 c4150000 rtnbit0 mouse_enable_select_device_by_switch_gpio 
+04c3 c31fdeb9 bbit0 mouse_enable_switch_gpio_connect_vin ,mouse_switch_gpio_connect_gnd 
 
 p_mouse_switch_gpio_connect_vin:
-04d5 6848c65a fetcht 1 ,mem_device_switch_gpio 
-04d6 20406ef7 call gpio_out_active 
-04d7 6848c65a fetcht 1 ,mem_device_switch_gpio 
-04d8 204055b1 call mouse_gpio_config_input_pd 
-04d9 6848c65a fetcht 1 ,mem_device_switch_gpio 
-04da 20406ee6 call gpio_get_bit 
-04db 2420dec2 nbranch mouse_check_select_24g_device ,true 
-04dc 20205ebe branch mouse_select_btdevice 
+04c4 6848c65a fetcht 1 ,mem_device_switch_gpio 
+04c5 20406ef7 call gpio_out_active 
+04c6 6848c65a fetcht 1 ,mem_device_switch_gpio 
+04c7 204055b1 call mouse_gpio_config_input_pd 
+04c8 6848c65a fetcht 1 ,mem_device_switch_gpio 
+04c9 20406ee6 call gpio_get_bit 
+04ca 2420dec2 nbranch mouse_check_select_24g_device ,true 
+04cb 20205ebe branch mouse_select_btdevice 
 
 p_mouse_init_sensor:
-04dd 20405958 call mouse_read_sensor_id 
-04de c01804e2 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
-04df c018d9c6 beq p3065_id1 ,mouse_init_p3065 
-04e0 c02c04ed beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
-04e1 20205952 branch mouse_init_sensor + 5 
+04cc 20405958 call mouse_read_sensor_id 
+04cd c01804d1 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+04ce c018d9c6 beq p3065_id1 ,mouse_init_p3065 
+04cf c02c04dc beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
+04d0 20205952 branch mouse_init_sensor + 5 
 
 p_mouse_init_p32xx_id2_judge:
-04e2 6fe0c85a fetch 1 ,mem_sensor_id2 
-04e3 c02d04e5 beq p_mx8650 ,p_mouse_sensor_read_id3 
-04e4 20205961 branch mouse_init_p32xx_id2_judge + 2 
+04d1 6fe0c85a fetch 1 ,mem_sensor_id2 
+04d2 c02d04d4 beq p_mx8650 ,p_mouse_sensor_read_id3 
+04d3 20205961 branch mouse_init_p32xx_id2_judge + 2 
 
 p_mouse_sensor_read_id3:
-04e5 5800007a setarg 0x7a 
-04e6 204069e5 call twspi_read 
-04e7 c06104e9 beq p8670 ,p_mouse_sg8670_parm_init 
-04e8 2020596e branch mouse_mx8650_init_param 
+04d4 5800007a setarg 0x7a 
+04d5 204069e5 call twspi_read 
+04d6 c06104d8 beq p8670 ,p_mouse_sg8670_parm_init 
+04d7 2020596e branch mouse_mx8650_init_param 
 
 p_mouse_sg8670_parm_init:
-04e9 7049570d jam sg8670 ,mem_config_sensor_type 
-04ea da604b1f arg mem_sensor_sg8670_init ,regc 
-04eb 20405995 call mouse_sensor_wr_seq 
-04ec 20205747 branch mouse_setting_sensor_type 
+04d8 7049570d jam sg8670 ,mem_config_sensor_type 
+04d9 da604b1f arg mem_sensor_sg8670_init ,regc 
+04da 20405995 call mouse_sensor_wr_seq 
+04db 20205747 branch mouse_setting_sensor_type 
 
 p_mouse_ka8g2_id2_judge:
-04ed 204059e7 call mouse_sensor_poweron 
-04ee 6fe0c85a fetch 1 ,mem_sensor_id2 
-04ef c02c84f1 beq pka8g2_id2 ,p_mouse_ka8g2_init_param 
-04f0 2020595f branch mouse_init_p32xx_id2_judge 
+04dc 204059e7 call mouse_sensor_poweron 
+04dd 6fe0c85a fetch 1 ,mem_sensor_id2 
+04de c02c84e0 beq pka8g2_id2 ,p_mouse_ka8g2_init_param 
+04df 2020595f branch mouse_init_p32xx_id2_judge 
 
 p_mouse_ka8g2_init_param:
-04f1 7049570b jam ka8g2 ,mem_config_sensor_type 
-04f2 da604a0b arg mem_sensor_ka8g2_init_new ,regc 
-04f3 20205995 branch mouse_sensor_wr_seq 
+04e0 7049570b jam ka8g2 ,mem_config_sensor_type 
+04e1 da604a0b arg mem_sensor_ka8g2_init_new ,regc 
+04e2 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_check_sensor_data:
-04f4 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
-04f5 c1800000 rtnne flash_sm_no_buys 
-04f6 6fe0c957 fetch 1 ,mem_config_sensor_type 
-04f7 c00584f9 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
-04f8 202059f8 branch mouse_check_sensor_data + 2 
+04e3 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
+04e4 c1800000 rtnne flash_sm_no_buys 
+04e5 6fe0c957 fetch 1 ,mem_config_sensor_type 
+04e6 c00584e8 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
+04e7 202059f8 branch mouse_check_sensor_data + 2 
 
 p_mouse_pka8g2_sensor_motion:
-04f9 20405a6d call mouse_clear_sensor_data 
-04fa 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-04fb c07f84ff beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
-04fc 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
-04fd 20406ee6 call gpio_get_bit 
-04fe 24608000 nrtn true 
+04e8 20405a6d call mouse_clear_sensor_data 
+04e9 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
+04ea c07f84ee beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
+04eb 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
+04ec 20406ee6 call gpio_get_bit 
+04ed 24608000 nrtn true 
 
 p_mouse_pka8g2_sensor_motion_1:
-04ff 58000000 setarg pan_reg_pid_l 
-0500 204069e5 call twspi_read 
-0501 c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
-0502 20205a2f branch mouse_p3212_sensor_motion_2 
+04ee 58000000 setarg pan_reg_pid_l 
+04ef 204069e5 call twspi_read 
+04f0 c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
+04f1 20205a2f branch mouse_p3212_sensor_motion_2 
 
 p_mouse_setting_sensor_type:
-0503 6fe0c957 fetch 1 ,mem_config_sensor_type 
-0504 c0068506 beq sg8670 ,p_mouse_seting_sg8670_dpi 
-0505 20205748 branch mouse_setting_sensor_type + 1 
+04f2 6fe0c957 fetch 1 ,mem_config_sensor_type 
+04f3 c00684f5 beq sg8670 ,p_mouse_seting_sg8670_dpi 
+04f4 20205748 branch mouse_setting_sensor_type + 1 
 
 p_mouse_seting_sg8670_dpi:
-0506 6fe0c690 fetch 1 ,mem_mouse_dpi 
-0507 c000050b beq mouse_dpi_level1 ,p_mouse_set_sg8670_dpi_1 
-0508 c000850d beq mouse_dpi_level2 ,p_mouse_set_sg8670_dpi_2 
-0509 c001050f beq mouse_dpi_level3 ,p_mouse_set_sg8670_dpi_4 
-050a 20600000 rtn 
+04f5 6fe0c690 fetch 1 ,mem_mouse_dpi 
+04f6 c00004fa beq mouse_dpi_level1 ,p_mouse_set_sg8670_dpi_1 
+04f7 c00084fc beq mouse_dpi_level2 ,p_mouse_set_sg8670_dpi_2 
+04f8 c00104fe beq mouse_dpi_level3 ,p_mouse_set_sg8670_dpi_4 
+04f9 20600000 rtn 
 
 p_mouse_set_sg8670_dpi_1:
-050b da604b59 arg mem_sensor_sg8670_dpi_1200 ,regc 
-050c 20205995 branch mouse_sensor_wr_seq 
+04fa da604b59 arg mem_sensor_sg8670_dpi_1200 ,regc 
+04fb 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_set_sg8670_dpi_2:
-050d da604b69 arg mem_sensor_sg8670_dpi_1600 ,regc 
-050e 20205995 branch mouse_sensor_wr_seq 
+04fc da604b69 arg mem_sensor_sg8670_dpi_1600 ,regc 
+04fd 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_set_sg8670_dpi_4:
-050f da604b49 arg mem_sensor_sg8670_dpi_800 ,regc 
-0510 20205995 branch mouse_sensor_wr_seq 
+04fe da604b49 arg mem_sensor_sg8670_dpi_800 ,regc 
+04ff 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_init:
-0511 20407396 call enable_authrom 
-0512 20405410 call mouse_setting_config 
-0513 202053e2 branch mouse_init + 2 
+0500 20407396 call enable_authrom 
+0501 20400503 call p_mouse_setting_config 
+0502 202053e2 branch mouse_init + 2 
 
 p_mouse_setting_config:
-0514 20758000 rtn wake 
-0515 204035f0 call g24_transmit_init 
-0516 2040325b call g24_chmap_param_init 
-0517 204062aa call mouse_24g_send_time_long_wake 
-0518 20405589 call mouse_gpio_init 
-0519 204055c6 call mouse_le_name_modify 
-051a 2040544a call mouse_param_init 
-051b 20400520 call p_mouse_sensor_set_angle 
-051c 6848c64d fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-051d 20406edd call gpio_config_input 
-051e 20400530 call p_ice_gpio_set_float 
-051f 20205417 branch mouse_setting_config + 7 
+0503 20758000 rtn wake 
+0504 204035f0 call g24_transmit_init 
+0505 2040325b call g24_chmap_param_init 
+0506 204062aa call mouse_24g_send_time_long_wake 
+0507 20405589 call mouse_gpio_init 
+0508 204055c6 call mouse_le_name_modify 
+0509 2040544a call mouse_param_init 
+050a 2040050f call p_mouse_sensor_set_angle 
+050b 6848c64d fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+050c 20406edd call gpio_config_input 
+050d 2040051f call p_ice_gpio_set_float 
+050e 20205417 branch mouse_setting_config + 7 
 
 p_mouse_sensor_set_angle:
-0520 6fe0c64f fetch 1 ,mem_sensor_angle_default 
-0521 67e0c958 store 1 ,mem_config_sensor_angle 
-0522 6fe0c64e fetch 1 ,mem_select_sensor_angle_gpio 
-0523 c17f8000 rtneq gpio_disable 
-0524 6fe0c64e fetch 1 ,mem_select_sensor_angle_gpio 
-0525 d840003e arg gpcfg_output_low ,temp 
-0526 20406f21 call gpio_config_function_int 
-0527 6fe0c65b fetch 1 ,mem_mouse_reuse_2ice_gpio 
-0528 d840003e arg gpcfg_output_low ,temp 
-0529 20406f21 call gpio_config_function_int 
-052a 6848c64d fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-052b 204055b5 call mouse_gpio_config_input_pu 
-052c 6848c64d fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-052d 20406ee6 call gpio_get_bit 
-052e 2440d473 ncall mouse_sensor_switch_angle ,true 
-052f 202055b1 branch mouse_gpio_config_input_pd 
+050f 6fe0c64f fetch 1 ,mem_sensor_angle_default 
+0510 67e0c958 store 1 ,mem_config_sensor_angle 
+0511 6fe0c64e fetch 1 ,mem_select_sensor_angle_gpio 
+0512 c17f8000 rtneq gpio_disable 
+0513 6fe0c64e fetch 1 ,mem_select_sensor_angle_gpio 
+0514 d840003e arg gpcfg_output_low ,temp 
+0515 20406f21 call gpio_config_function_int 
+0516 6fe0c65b fetch 1 ,mem_mouse_reuse_2ice_gpio 
+0517 d840003e arg gpcfg_output_low ,temp 
+0518 20406f21 call gpio_config_function_int 
+0519 6848c64d fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+051a 204055b5 call mouse_gpio_config_input_pu 
+051b 6848c64d fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+051c 20406ee6 call gpio_get_bit 
+051d 2440d473 ncall mouse_sensor_switch_angle ,true 
+051e 202055b1 branch mouse_gpio_config_input_pd 
 
 p_ice_gpio_set_float:
-0530 6848c64e fetcht 1 ,mem_select_sensor_angle_gpio 
-0531 20406f0f call gpio_set_high_impedance 
-0532 6848c65b fetcht 1 ,mem_mouse_reuse_2ice_gpio 
-0533 20206f0f branch gpio_set_high_impedance 
+051f 6848c64e fetcht 1 ,mem_select_sensor_angle_gpio 
+0520 20406f0f call gpio_set_high_impedance 
+0521 6848c65b fetcht 1 ,mem_mouse_reuse_2ice_gpio 
+0522 20206f0f branch gpio_set_high_impedance 
 
 p_mouse_motion:
-0534 78547c00 disable user 
-0535 58000000 setarg 0 
-0536 67e34847 store 6 ,mem_mouse_x 
-0537 204004f4 call p_mouse_check_sensor_data 
-0538 20205606 branch mouse_motion + 5 
+0523 78547c00 disable user 
+0524 58000000 setarg 0 
+0525 67e34847 store 6 ,mem_mouse_x 
+0526 204004e3 call p_mouse_check_sensor_data 
+0527 58000089 setarg 0x0089 
+0528 204069e4 call twspi_write 
+0529 20405747 call mouse_setting_sensor_type 
+052a 20405612 call mouse_zwheel 
+052b 20405617 call mouse_t_zwheel 
+052c 2040052e call p_mouse_key 
+052d 2020560c branch mouse_motion + 11 
+
+p_mouse_key:
+052e 2040584c call mouse_check_firekey_gpio 
+052f 6fe0c987 fetch 1 ,mem_fire_key_flag 
+0530 243a5860 nbranch fire_key_press ,blank 
+0531 6fe0c982 fetch 1 ,mem_fire_key_status 
+0532 243a585f nbranch fire_key_process ,blank 
+0533 20405888 call mouse_check_key_gpio 
+0534 20400536 call p_mouse_ghost_key_check 
+0535 202057ad branch mouse_key + 7 
+
+p_mouse_ghost_key_check:
+0536 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0537 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+0538 70497b00 jam 0 ,mem_mouse_ghost_flag 
+0539 1fe22400 copy pdata ,regb 
+
+p_mouse_ghost_key_mfw_rbk:
+053a 204057fb call mouse_ghost_key_check_m_fw 
+
+p_mouse_ghost_key_rbk:
+053b 2040053d call p_mouse_ghost_key_check_r_bk 
+053c 202057e5 branch mouse_ghost_key_check_next 
+
+p_mouse_ghost_key_check_r_bk:
+053d 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+053e 202057f6 branch mouse_ghost_key_check_r_bk + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/branch/mouse/YJX_Project/mouse_public_yjx/program/patch.prog	(revision 1498)
+++ /1121s/branch/mouse/YJX_Project/mouse_public_yjx/program/patch.prog	(working copy)
@@ -1721,12 +1721,12 @@
 	call gpio_set_high_impedance
 	fetcht 1,mem_mouse_reuse_2ice_gpio
 	call mouse_gpio_config_input_pu
-	call p_mouse_gpio_set_high_impedance
+//	call p_mouse_gpio_set_high_impedance
 	call mouse_setgpio_hibernate_next
 	fetcht 1,mem_matrix_public_gpio
 	branch gpio_clr_wake
 	
-
+/*
 p_mouse_gpio_set_high_impedance:
 	fetch 3,mem_mouse_set_high_impedance_bit_set
 	store 3,mem_pdatatemp
@@ -1747,7 +1747,7 @@
 	sub temp,UI_BUTTON_GPIO_DISABLE,null
 	rtn zero
 	branch gpio_set_analog
-
+*/
 p_mouse_24g_package_data:
 	rtnmark0 mark_24g
 	call mouse_motion
@@ -1904,7 +1904,7 @@
 
 p_mouse_init:
 	call enable_authrom
-	call mouse_setting_config
+	call p_mouse_setting_config
 	branch mouse_init+2
 
 p_mouse_setting_config:
@@ -2001,7 +2001,41 @@
 	setarg 0
 	store 6,mem_mouse_x
 	call p_mouse_check_sensor_data
-	branch mouse_motion+5
+	setarg 0x0089
+	call twspi_write	
+	call mouse_setting_sensor_type
+	call mouse_zwheel
+	call mouse_t_zwheel
+	call p_mouse_key
+	branch mouse_motion+11
+
+p_mouse_key:
+	call mouse_check_firekey_gpio
+	fetch 1,mem_fire_key_flag
+	nbranch fire_key_press,blank
+	fetch 1,mem_fire_key_status
+	nbranch fire_key_process,blank
+	
+	call mouse_check_key_gpio
+	call p_mouse_ghost_key_check
+	branch mouse_key+7
+
+p_mouse_ghost_key_check:			//mfw rbk
+	jam 0,mem_mouse_matrix_key_cow_count
+	jam 0,mem_mouse_matrix_key_row_count
+	jam 0,mem_mouse_ghost_flag
+	copy pdata,regb
+p_mouse_ghost_key_MFW_RBK:
+	call mouse_ghost_key_check_M_FW
+p_mouse_ghost_key_RBK:
+	call p_mouse_ghost_key_check_R_BK
+	branch mouse_ghost_key_check_next
+
+p_mouse_ghost_key_check_R_BK:
+	and regb,MOUSE_R_BK_BUTTON,pdata
+	branch mouse_ghost_key_check_R_BK+1
+//	beq MOUSE_R_BK_BUTTON,mouse_matrix_cow_more_than_one_key
+//	rtn
 endif
 
 ifdef ADC_1121SB
