Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/eeprom.dat	(revision 4043)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/eeprom.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-ee
-18
+66
+19
 c2
 84
 00
@@ -83,7 +83,7 @@
 c0
 67
 86
-03
+21
 c0
 68
 03
@@ -91,11 +91,11 @@
 c0
 68
 85
-72
+90
 c0
 6a
 05
-57
+75
 c0
 6b
 02
@@ -115,7 +115,7 @@
 c0
 6f
 05
-aa
+c8
 c0
 6f
 80
@@ -195,7 +195,7 @@
 c0
 76
 86
-33
+51
 20
 20
 13
@@ -955,7 +955,7 @@
 20
 40
 05
-69
+87
 20
 20
 3b
@@ -1739,7 +1739,7 @@
 20
 20
 05
-69
+87
 20
 40
 26
@@ -2139,11 +2139,11 @@
 20
 40
 05
-62
+80
 20
 40
 05
-69
+87
 20
 20
 3e
@@ -2191,7 +2191,7 @@
 20
 40
 05
-a4
+c2
 d8
 40
 00
@@ -2455,7 +2455,7 @@
 20
 40
 05
-a4
+c2
 20
 20
 3e
@@ -2611,7 +2611,7 @@
 20
 40
 05
-57
+75
 20
 40
 03
@@ -2627,7 +2627,7 @@
 20
 40
 05
-57
+75
 20
 40
 45
@@ -3015,7 +3015,7 @@
 20
 40
 05
-69
+87
 20
 20
 02
@@ -4783,7 +4783,7 @@
 20
 40
 05
-69
+87
 70
 4c
 42
@@ -5374,8 +5374,8 @@
 d1
 20
 40
-42
-40
+05
+57
 20
 40
 40
@@ -5391,7 +5391,7 @@
 20
 40
 05
-70
+8e
 6f
 e0
 c8
@@ -5472,6 +5472,126 @@
 20
 47
 1a
+6f
+e0
+c4
+ac
+c1
+80
+00
+00
+6f
+e0
+c9
+27
+c0
+00
+42
+4c
+c0
+00
+c2
+4c
+c0
+04
+42
+4c
+c0
+01
+42
+4c
+c0
+01
+c2
+70
+c0
+02
+42
+4c
+c0
+03
+42
+95
+c0
+05
+c2
+8e
+20
+20
+05
+63
+20
+40
+42
+c4
+78
+54
+7c
+00
+6f
+e0
+c9
+11
+c0
+7f
+85
+6a
+68
+48
+c9
+11
+20
+40
+60
+59
+24
+60
+80
+00
+58
+00
+00
+00
+20
+40
+5b
+0d
+c0
+98
+42
+66
+58
+00
+00
+02
+20
+40
+5b
+0d
+c3
+03
+85
+71
+20
+20
+05
+74
+c2
+81
+85
+74
+c2
+82
+05
+74
+20
+60
+00
+00
+20
+20
+42
+59
 20
 40
 3f
@@ -5483,7 +5603,7 @@
 c0
 05
 85
-5e
+7c
 20
 40
 42
@@ -5503,7 +5623,7 @@
 20
 40
 05
-65
+83
 da
 60
 4b
@@ -5523,7 +5643,7 @@
 c0
 05
 85
-65
+83
 20
 20
 42
@@ -5559,7 +5679,7 @@
 c0
 05
 85
-6e
+8c
 20
 20
 42
@@ -5575,7 +5695,7 @@
 20
 40
 05
-72
+90
 20
 20
 40
@@ -5595,23 +5715,23 @@
 20
 40
 05
-7b
+99
 20
 40
 05
-80
+9e
 20
 40
 05
-85
+a3
 20
 40
 05
-8a
+a8
 20
 40
 05
-97
+b5
 20
 20
 41
@@ -5623,7 +5743,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5643,7 +5763,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5663,7 +5783,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5707,7 +5827,7 @@
 c0
 7f
 85
-93
+b1
 20
 20
 41
@@ -5719,7 +5839,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5759,7 +5879,7 @@
 c0
 7f
 85
-a0
+be
 20
 20
 41
@@ -5771,7 +5891,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5811,11 +5931,11 @@
 20
 40
 05
-ae
+cc
 20
 40
 05
-c2
+e0
 20
 20
 46
@@ -5851,7 +5971,7 @@
 20
 40
 05
-b7
+d5
 20
 20
 40
@@ -5879,7 +5999,7 @@
 c0
 7f
 85
-be
+dc
 20
 20
 40
@@ -5891,7 +6011,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5915,7 +6035,7 @@
 24
 3a
 05
-cb
+e9
 6f
 e0
 cc
@@ -5923,11 +6043,11 @@
 20
 40
 05
-a4
+c2
 20
 40
 05
-db
+f9
 68
 48
 cc
@@ -5951,7 +6071,7 @@
 20
 40
 05
-a7
+c5
 70
 4c
 3f
@@ -5966,12 +6086,12 @@
 3c
 20
 40
-05
-f4
+06
+12
 20
 40
 05
-df
+fd
 68
 48
 cc
@@ -6014,8 +6134,8 @@
 3c
 20
 40
-05
-ea
+06
+08
 67
 e0
 cc
@@ -6026,8 +6146,8 @@
 3e
 20
 3a
-05
-e6
+06
+04
 6f
 e0
 cc
@@ -6090,12 +6210,12 @@
 00
 c0
 03
-85
-ff
+86
+1d
 c0
 00
 06
-01
+1f
 20
 60
 00
@@ -6134,12 +6254,12 @@
 00
 c0
 03
-85
-ff
+86
+1d
 c0
 00
 06
-01
+1f
 20
 60
 00
@@ -6183,7 +6303,7 @@
 c2
 9e
 86
-0f
+2d
 18
 42
 7e
@@ -6215,7 +6335,7 @@
 24
 3a
 06
-2c
+4a
 6f
 e4
 4b
@@ -6223,7 +6343,7 @@
 c2
 8e
 06
-20
+3e
 18
 42
 7e
@@ -6235,11 +6355,11 @@
 c0
 00
 06
-1c
+3a
 c0
 01
 06
-1a
+38
 20
 60
 00
@@ -6251,7 +6371,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6259,7 +6379,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6267,7 +6387,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6275,7 +6395,7 @@
 20
 20
 06
-0c
+2a
 18
 42
 7e
@@ -6287,15 +6407,15 @@
 c0
 00
 06
-1c
+3a
 c0
 01
 06
-1e
+3c
 c0
 01
 86
-1a
+38
 20
 60
 00
@@ -6311,15 +6431,15 @@
 c0
 00
 06
-1e
+3c
 c0
 00
 86
-1a
+38
 c0
 01
 86
-18
+36
 20
 60
 00
@@ -6331,7 +6451,7 @@
 c2
 8e
 06
-26
+44
 18
 42
 7e
@@ -6343,11 +6463,11 @@
 c0
 00
 06
-18
+36
 c0
 00
 86
-1a
+38
 20
 60
 00
@@ -6384,8 +6504,8 @@
 20
 26
 f6
+aa
 5a
-12
 aa
 55
 40
@@ -7749,136 +7869,16 @@
 02
 40
 00
-52
+ca
 1e
 55
 aa
 aa
 55
-da
-92
-c7
-18
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+52
+93
+c9
+35
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-b4
-8d
+d1
+48
Index: output/flash.dat
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/flash.dat	(revision 4043)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/flash.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-ee
-18
+66
+19
 c2
 84
 00
@@ -83,7 +83,7 @@
 c0
 67
 86
-03
+21
 c0
 68
 03
@@ -91,11 +91,11 @@
 c0
 68
 85
-72
+90
 c0
 6a
 05
-57
+75
 c0
 6b
 02
@@ -115,7 +115,7 @@
 c0
 6f
 05
-aa
+c8
 c0
 6f
 80
@@ -195,7 +195,7 @@
 c0
 76
 86
-33
+51
 20
 20
 13
@@ -955,7 +955,7 @@
 20
 40
 05
-69
+87
 20
 20
 3b
@@ -1739,7 +1739,7 @@
 20
 20
 05
-69
+87
 20
 40
 26
@@ -2139,11 +2139,11 @@
 20
 40
 05
-62
+80
 20
 40
 05
-69
+87
 20
 20
 3e
@@ -2191,7 +2191,7 @@
 20
 40
 05
-a4
+c2
 d8
 40
 00
@@ -2455,7 +2455,7 @@
 20
 40
 05
-a4
+c2
 20
 20
 3e
@@ -2611,7 +2611,7 @@
 20
 40
 05
-57
+75
 20
 40
 03
@@ -2627,7 +2627,7 @@
 20
 40
 05
-57
+75
 20
 40
 45
@@ -3015,7 +3015,7 @@
 20
 40
 05
-69
+87
 20
 20
 02
@@ -4783,7 +4783,7 @@
 20
 40
 05
-69
+87
 70
 4c
 42
@@ -5374,8 +5374,8 @@
 d1
 20
 40
-42
-40
+05
+57
 20
 40
 40
@@ -5391,7 +5391,7 @@
 20
 40
 05
-70
+8e
 6f
 e0
 c8
@@ -5472,6 +5472,126 @@
 20
 47
 1a
+6f
+e0
+c4
+ac
+c1
+80
+00
+00
+6f
+e0
+c9
+27
+c0
+00
+42
+4c
+c0
+00
+c2
+4c
+c0
+04
+42
+4c
+c0
+01
+42
+4c
+c0
+01
+c2
+70
+c0
+02
+42
+4c
+c0
+03
+42
+95
+c0
+05
+c2
+8e
+20
+20
+05
+63
+20
+40
+42
+c4
+78
+54
+7c
+00
+6f
+e0
+c9
+11
+c0
+7f
+85
+6a
+68
+48
+c9
+11
+20
+40
+60
+59
+24
+60
+80
+00
+58
+00
+00
+00
+20
+40
+5b
+0d
+c0
+98
+42
+66
+58
+00
+00
+02
+20
+40
+5b
+0d
+c3
+03
+85
+71
+20
+20
+05
+74
+c2
+81
+85
+74
+c2
+82
+05
+74
+20
+60
+00
+00
+20
+20
+42
+59
 20
 40
 3f
@@ -5483,7 +5603,7 @@
 c0
 05
 85
-5e
+7c
 20
 40
 42
@@ -5503,7 +5623,7 @@
 20
 40
 05
-65
+83
 da
 60
 4b
@@ -5523,7 +5643,7 @@
 c0
 05
 85
-65
+83
 20
 20
 42
@@ -5559,7 +5679,7 @@
 c0
 05
 85
-6e
+8c
 20
 20
 42
@@ -5575,7 +5695,7 @@
 20
 40
 05
-72
+90
 20
 20
 40
@@ -5595,23 +5715,23 @@
 20
 40
 05
-7b
+99
 20
 40
 05
-80
+9e
 20
 40
 05
-85
+a3
 20
 40
 05
-8a
+a8
 20
 40
 05
-97
+b5
 20
 20
 41
@@ -5623,7 +5743,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5643,7 +5763,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5663,7 +5783,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5707,7 +5827,7 @@
 c0
 7f
 85
-93
+b1
 20
 20
 41
@@ -5719,7 +5839,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5759,7 +5879,7 @@
 c0
 7f
 85
-a0
+be
 20
 20
 41
@@ -5771,7 +5891,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5811,11 +5931,11 @@
 20
 40
 05
-ae
+cc
 20
 40
 05
-c2
+e0
 20
 20
 46
@@ -5851,7 +5971,7 @@
 20
 40
 05
-b7
+d5
 20
 20
 40
@@ -5879,7 +5999,7 @@
 c0
 7f
 85
-be
+dc
 20
 20
 40
@@ -5891,7 +6011,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5915,7 +6035,7 @@
 24
 3a
 05
-cb
+e9
 6f
 e0
 cc
@@ -5923,11 +6043,11 @@
 20
 40
 05
-a4
+c2
 20
 40
 05
-db
+f9
 68
 48
 cc
@@ -5951,7 +6071,7 @@
 20
 40
 05
-a7
+c5
 70
 4c
 3f
@@ -5966,12 +6086,12 @@
 3c
 20
 40
-05
-f4
+06
+12
 20
 40
 05
-df
+fd
 68
 48
 cc
@@ -6014,8 +6134,8 @@
 3c
 20
 40
-05
-ea
+06
+08
 67
 e0
 cc
@@ -6026,8 +6146,8 @@
 3e
 20
 3a
-05
-e6
+06
+04
 6f
 e0
 cc
@@ -6090,12 +6210,12 @@
 00
 c0
 03
-85
-ff
+86
+1d
 c0
 00
 06
-01
+1f
 20
 60
 00
@@ -6134,12 +6254,12 @@
 00
 c0
 03
-85
-ff
+86
+1d
 c0
 00
 06
-01
+1f
 20
 60
 00
@@ -6183,7 +6303,7 @@
 c2
 9e
 86
-0f
+2d
 18
 42
 7e
@@ -6215,7 +6335,7 @@
 24
 3a
 06
-2c
+4a
 6f
 e4
 4b
@@ -6223,7 +6343,7 @@
 c2
 8e
 06
-20
+3e
 18
 42
 7e
@@ -6235,11 +6355,11 @@
 c0
 00
 06
-1c
+3a
 c0
 01
 06
-1a
+38
 20
 60
 00
@@ -6251,7 +6371,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6259,7 +6379,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6267,7 +6387,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6275,7 +6395,7 @@
 20
 20
 06
-0c
+2a
 18
 42
 7e
@@ -6287,15 +6407,15 @@
 c0
 00
 06
-1c
+3a
 c0
 01
 06
-1e
+3c
 c0
 01
 86
-1a
+38
 20
 60
 00
@@ -6311,15 +6431,15 @@
 c0
 00
 06
-1e
+3c
 c0
 00
 86
-1a
+38
 c0
 01
 86
-18
+36
 20
 60
 00
@@ -6331,7 +6451,7 @@
 c2
 8e
 06
-26
+44
 18
 42
 7e
@@ -6343,11 +6463,11 @@
 c0
 00
 06
-18
+36
 c0
 00
 86
-1a
+38
 20
 60
 00
@@ -6384,8 +6504,8 @@
 20
 26
 f6
+aa
 5a
-12
 aa
 55
 40
@@ -7749,136 +7869,16 @@
 02
 40
 00
-52
+ca
 1e
 55
 aa
 aa
 55
-da
-92
-c7
-18
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+52
+93
+c9
+35
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-b4
-8d
+d1
+48
Index: output/otp.dat
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/otp.dat	(revision 4043)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/otp.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-ee
-18
+66
+19
 c2
 84
 00
@@ -83,7 +83,7 @@
 c0
 67
 86
-03
+21
 c0
 68
 03
@@ -91,11 +91,11 @@
 c0
 68
 85
-72
+90
 c0
 6a
 05
-57
+75
 c0
 6b
 02
@@ -115,7 +115,7 @@
 c0
 6f
 05
-aa
+c8
 c0
 6f
 80
@@ -195,7 +195,7 @@
 c0
 76
 86
-33
+51
 20
 20
 13
@@ -955,7 +955,7 @@
 20
 40
 05
-69
+87
 20
 20
 3b
@@ -1739,7 +1739,7 @@
 20
 20
 05
-69
+87
 20
 40
 26
@@ -2139,11 +2139,11 @@
 20
 40
 05
-62
+80
 20
 40
 05
-69
+87
 20
 20
 3e
@@ -2191,7 +2191,7 @@
 20
 40
 05
-a4
+c2
 d8
 40
 00
@@ -2455,7 +2455,7 @@
 20
 40
 05
-a4
+c2
 20
 20
 3e
@@ -2611,7 +2611,7 @@
 20
 40
 05
-57
+75
 20
 40
 03
@@ -2627,7 +2627,7 @@
 20
 40
 05
-57
+75
 20
 40
 45
@@ -3015,7 +3015,7 @@
 20
 40
 05
-69
+87
 20
 20
 02
@@ -4783,7 +4783,7 @@
 20
 40
 05
-69
+87
 70
 4c
 42
@@ -5374,8 +5374,8 @@
 d1
 20
 40
-42
-40
+05
+57
 20
 40
 40
@@ -5391,7 +5391,7 @@
 20
 40
 05
-70
+8e
 6f
 e0
 c8
@@ -5472,6 +5472,126 @@
 20
 47
 1a
+6f
+e0
+c4
+ac
+c1
+80
+00
+00
+6f
+e0
+c9
+27
+c0
+00
+42
+4c
+c0
+00
+c2
+4c
+c0
+04
+42
+4c
+c0
+01
+42
+4c
+c0
+01
+c2
+70
+c0
+02
+42
+4c
+c0
+03
+42
+95
+c0
+05
+c2
+8e
+20
+20
+05
+63
+20
+40
+42
+c4
+78
+54
+7c
+00
+6f
+e0
+c9
+11
+c0
+7f
+85
+6a
+68
+48
+c9
+11
+20
+40
+60
+59
+24
+60
+80
+00
+58
+00
+00
+00
+20
+40
+5b
+0d
+c0
+98
+42
+66
+58
+00
+00
+02
+20
+40
+5b
+0d
+c3
+03
+85
+71
+20
+20
+05
+74
+c2
+81
+85
+74
+c2
+82
+05
+74
+20
+60
+00
+00
+20
+20
+42
+59
 20
 40
 3f
@@ -5483,7 +5603,7 @@
 c0
 05
 85
-5e
+7c
 20
 40
 42
@@ -5503,7 +5623,7 @@
 20
 40
 05
-65
+83
 da
 60
 4b
@@ -5523,7 +5643,7 @@
 c0
 05
 85
-65
+83
 20
 20
 42
@@ -5559,7 +5679,7 @@
 c0
 05
 85
-6e
+8c
 20
 20
 42
@@ -5575,7 +5695,7 @@
 20
 40
 05
-72
+90
 20
 20
 40
@@ -5595,23 +5715,23 @@
 20
 40
 05
-7b
+99
 20
 40
 05
-80
+9e
 20
 40
 05
-85
+a3
 20
 40
 05
-8a
+a8
 20
 40
 05
-97
+b5
 20
 20
 41
@@ -5623,7 +5743,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5643,7 +5763,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5663,7 +5783,7 @@
 20
 40
 05
-a4
+c2
 20
 40
 41
@@ -5707,7 +5827,7 @@
 c0
 7f
 85
-93
+b1
 20
 20
 41
@@ -5719,7 +5839,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5759,7 +5879,7 @@
 c0
 7f
 85
-a0
+be
 20
 20
 41
@@ -5771,7 +5891,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5811,11 +5931,11 @@
 20
 40
 05
-ae
+cc
 20
 40
 05
-c2
+e0
 20
 20
 46
@@ -5851,7 +5971,7 @@
 20
 40
 05
-b7
+d5
 20
 20
 40
@@ -5879,7 +5999,7 @@
 c0
 7f
 85
-be
+dc
 20
 20
 40
@@ -5891,7 +6011,7 @@
 20
 40
 05
-a7
+c5
 68
 48
 c9
@@ -5915,7 +6035,7 @@
 24
 3a
 05
-cb
+e9
 6f
 e0
 cc
@@ -5923,11 +6043,11 @@
 20
 40
 05
-a4
+c2
 20
 40
 05
-db
+f9
 68
 48
 cc
@@ -5951,7 +6071,7 @@
 20
 40
 05
-a7
+c5
 70
 4c
 3f
@@ -5966,12 +6086,12 @@
 3c
 20
 40
-05
-f4
+06
+12
 20
 40
 05
-df
+fd
 68
 48
 cc
@@ -6014,8 +6134,8 @@
 3c
 20
 40
-05
-ea
+06
+08
 67
 e0
 cc
@@ -6026,8 +6146,8 @@
 3e
 20
 3a
-05
-e6
+06
+04
 6f
 e0
 cc
@@ -6090,12 +6210,12 @@
 00
 c0
 03
-85
-ff
+86
+1d
 c0
 00
 06
-01
+1f
 20
 60
 00
@@ -6134,12 +6254,12 @@
 00
 c0
 03
-85
-ff
+86
+1d
 c0
 00
 06
-01
+1f
 20
 60
 00
@@ -6183,7 +6303,7 @@
 c2
 9e
 86
-0f
+2d
 18
 42
 7e
@@ -6215,7 +6335,7 @@
 24
 3a
 06
-2c
+4a
 6f
 e4
 4b
@@ -6223,7 +6343,7 @@
 c2
 8e
 06
-20
+3e
 18
 42
 7e
@@ -6235,11 +6355,11 @@
 c0
 00
 06
-1c
+3a
 c0
 01
 06
-1a
+38
 20
 60
 00
@@ -6251,7 +6371,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6259,7 +6379,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6267,7 +6387,7 @@
 20
 20
 06
-0c
+2a
 58
 00
 00
@@ -6275,7 +6395,7 @@
 20
 20
 06
-0c
+2a
 18
 42
 7e
@@ -6287,15 +6407,15 @@
 c0
 00
 06
-1c
+3a
 c0
 01
 06
-1e
+3c
 c0
 01
 86
-1a
+38
 20
 60
 00
@@ -6311,15 +6431,15 @@
 c0
 00
 06
-1e
+3c
 c0
 00
 86
-1a
+38
 c0
 01
 86
-18
+36
 20
 60
 00
@@ -6331,7 +6451,7 @@
 c2
 8e
 06
-26
+44
 18
 42
 7e
@@ -6343,11 +6463,11 @@
 c0
 00
 06
-18
+36
 c0
 00
 86
-1a
+38
 20
 60
 00
@@ -6384,8 +6504,8 @@
 20
 26
 f6
+aa
 5a
-12
 aa
 55
 40
@@ -7749,13 +7869,13 @@
 03
 01
 00
-52
+ca
 1e
 55
 aa
 aa
 55
-9c
-92
-a5
-64
+14
+93
+ab
+49
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/program.lis	(revision 4043)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/program.lis	(working copy)
@@ -19,15 +19,15 @@
 0010 c065025e beq patch19_2 ,p_mouse_lpm_before_common 
 0011 c06600ca beq patch19_4 ,p_mouse_adc_read_start 
 0012 c067053b beq patch19_6 ,p_mouse_motion 
-0013 c0678603 beq patch19_7 ,p_mouse_dpi_process 
+0013 c0678621 beq patch19_7 ,p_mouse_dpi_process 
 0014 c068036c beq patch1a_0 ,p_mouse_seting_dpi 
-0015 c0688572 beq patch1a_1 ,p_mouse_check_key_gpio 
-0016 c06a0557 beq patch1a_4 ,p_mouse_sensor_poweron 
+0015 c0688590 beq patch1a_1 ,p_mouse_check_key_gpio 
+0016 c06a0575 beq patch1a_4 ,p_mouse_sensor_poweron 
 0017 c06b0280 beq patch1a_6 ,p_mouse_priority_bb_event 
 0018 c06c83af beq patch1b_1 ,p_mouse_bb_event_timer 
 0019 c06d04aa beq patch1b_2 ,p_mouse_start_discovery 
 001a c06d84d7 beq patch1b_3 ,p_mouse_stop_discovery 
-001b c06f05aa beq patch1b_6 ,p_mouse_idle 
+001b c06f05c8 beq patch1b_6 ,p_mouse_idle 
 001c c06f8054 beq patch1b_7 ,p_mouse_ready_reconnection_by_button 
 001d c070804c beq patch1c_1 ,p_mouse_led_off 
 001e c0710048 beq patch1c_2 ,p_mouse_led_on 
@@ -49,7 +49,7 @@
 002c c07482fa beq patch3d_1 ,p_g24_reconn_dispatch 
 002d c07501b2 beq patch3d_2 ,p_g24_transmit_no_interrupt 
 002e c076052e beq patch3d_4 ,p_g24_lpm_wait 
-002f c0768633 beq patch3d_5 ,p_power_ctrl_start 
+002f c0768651 beq patch3d_5 ,p_power_ctrl_start 
 0030 2020137c branch loop 
 
 p_efuse_vdd_off:
@@ -303,7 +303,7 @@
 00ea 20403d8a call mouse_usb_check_enable 
 00eb 20404728 call mouse_drawing_optima_init 
 00ec 2040016d call p_mouse_cb_fuction 
-00ed 20400569 call p_mouse_sensor_powerdown 
+00ed 20400587 call p_mouse_sensor_powerdown 
 00ee 20203bc9 branch mouse_init + 8 
 
 p_mouse_double_dpi_judge:
@@ -551,7 +551,7 @@
 01ae 67e0cba4 store 1 ,mem_mouse_search_dongle_action 
 01af 6fe14bbc fetch 2 ,mem_mouse_24g_search_dongle_time_init 
 01b0 67e14ab2 store 2 ,mem_mouse_no_data_timer 
-01b1 20200569 branch p_mouse_sensor_powerdown 
+01b1 20200587 branch p_mouse_sensor_powerdown 
 
 p_g24_transmit_no_interrupt:
 01b2 20402631 call g24_txdata_prep 
@@ -691,8 +691,8 @@
 0212 58000006 setarg pan_reg_config 
 0213 20405b0d call twspi_read 
 0214 c281be23 bbit1 3 ,mouse_app_enter_hibernate + 3 
-0215 20400562 call p_mouse_sensor_reset 
-0216 20400569 call p_mouse_sensor_powerdown 
+0215 20400580 call p_mouse_sensor_reset 
+0216 20400587 call p_mouse_sensor_powerdown 
 0217 20203e23 branch mouse_app_enter_hibernate + 3 
 
 p_mouse_setgpio_hibernate:
@@ -706,7 +706,7 @@
 021f 6848c910 fetcht 1 ,mem_matrix_public_gpio 
 0220 20406042 call gpio_clr_wake 
 0221 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-0222 204005a4 call p_mouse_gpio_config_output_high 
+0222 204005c2 call p_mouse_gpio_config_output_high 
 0223 d8400003 arg 3 ,temp 
 0224 20403f56 call mouse_gpio_config_input_pu 
 0225 2040025e call p_mouse_lpm_before_common 
@@ -794,7 +794,7 @@
 0261 20406050 call gpio_config_input 
 0262 20403f88 call mouse_wheel_check 
 0263 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
-0264 204005a4 call p_mouse_gpio_config_output_high 
+0264 204005c2 call p_mouse_gpio_config_output_high 
 0265 20203e44 branch mouse_lpm_before_common + 4 
 
 p_g24_nodata_transmit:
@@ -843,13 +843,13 @@
 028a 20204336 branch mouse_priority_bb_event + 2 
 
 p_mouse_le_bb_event_connected:
-028b 20400557 call p_mouse_sensor_poweron 
+028b 20400575 call p_mouse_sensor_poweron 
 028c 204003ff call p_mouse_device_poweron_led_config 
 028d 704c4200 jam 0 ,mem_mouse_bt_led_recon_effect_flag 
 028e 20204350 branch mouse_le_bb_event_connected 
 
 p_mouse_bb_event_connected:
-028f 20400557 call p_mouse_sensor_poweron 
+028f 20400575 call p_mouse_sensor_poweron 
 0290 20404544 call mouse_no_data_timer_init 
 0291 204003ff call p_mouse_device_poweron_led_config 
 0292 704c4200 jam 0 ,mem_mouse_bt_led_recon_effect_flag 
@@ -974,7 +974,7 @@
 02ed 58000000 setarg 0 
 02ee 67e3c8d0 store 7 ,mem_mouse_key 
 02ef 704be101 jam 1 ,mem_sensor_shutdown_flag 
-02f0 20400569 call p_mouse_sensor_powerdown 
+02f0 20400587 call p_mouse_sensor_powerdown 
 02f1 2020026b branch p_g24_long_sleep 
 
 p_g24_pair_dispatch:
@@ -1600,7 +1600,7 @@
 04a9 2020431b branch mouse_disconnect 
 
 p_mouse_start_discovery:
-04aa 20400569 call p_mouse_sensor_powerdown 
+04aa 20400587 call p_mouse_sensor_powerdown 
 04ab 704c4200 jam 0 ,mem_mouse_bt_led_recon_effect_flag 
 04ac 20400405 call p_mouse_multi_led_discovery_blink_enable 
 04ad 20400466 call p_mouse_logo_led_off 
@@ -1784,11 +1784,11 @@
 053b 78547c00 disable user 
 053c 58000000 setarg 0 
 053d 67e348d1 store 6 ,mem_mouse_x 
-053e 20404240 call mouse_check_sensor_data 
+053e 20400557 call p_mouse_check_sensor_data 
 053f 2040408e call mouse_dpi_config 
 0540 20403f7e call mouse_zwheel 
 0541 20403f83 call mouse_t_zwheel 
-0542 20400570 call p_mouse_key 
+0542 2040058e call p_mouse_key 
 0543 6fe0c8d0 fetch 1 ,mem_mouse_key 
 0544 1fe17e1f and_into 0x1f ,pdata 
 0545 67e0c8d0 store 1 ,mem_mouse_key 
@@ -1816,329 +1816,371 @@
 0555 c1018000 rtneq p3212 
 0556 2020471a branch mouse_drawing_optima 
 
+p_mouse_check_sensor_data:
+0557 6fe0c4ac fetch 1 ,mem_spi_write_flash_sm 
+0558 c1800000 rtnne flash_sm_no_buys 
+0559 6fe0c927 fetch 1 ,mem_config_sensor_type 
+055a c000424c beq p3205 ,mouse_p32xx_sensor_motion 
+055b c000c24c beq p3065 ,mouse_p32xx_sensor_motion 
+055c c004424c beq ka8 ,mouse_p32xx_sensor_motion 
+055d c001424c beq p3204 ,mouse_p32xx_sensor_motion 
+055e c001c270 beq p3212 ,mouse_p3212_sensor_motion 
+055f c002424c beq p3065_xy ,mouse_p32xx_sensor_motion 
+0560 c0034295 beq p8009 ,mouse_p8009_sensor_motion 
+0561 c005c28e beq ka8g2 ,mouse_pka8g2_sensor_motion 
+0562 20200563 branch p_mouse_p32xx_sensor_motion 
+
+p_mouse_p32xx_sensor_motion:
+0563 204042c4 call mouse_clear_sensor_data 
+0564 78547c00 disable user 
+0565 6fe0c911 fetch 1 ,mem_sensor_motion_gpio 
+0566 c07f856a beq gpio_disable ,p_mouse_p32xx_sensor_motion_2 
+0567 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+0568 20406059 call gpio_get_bit 
+0569 24608000 nrtn true 
+
+p_mouse_p32xx_sensor_motion_2:
+056a 58000000 setarg pan_reg_pid_l 
+056b 20405b0d call twspi_read 
+056c c0984266 bne p32xx_id1 ,mouse_p3065_judge 
+
+p_mouse_p32xx_sensor_motion_3:
+056d 58000002 setarg pan_reg_motion_staus 
+056e 20405b0d call twspi_read 
+056f c3038571 bbit0 7 ,p_mouse_p32xx_sensor_overflow_check 
+0570 20200574 branch p_mouse_p32xx_sensor_motion_1 
+
+p_mouse_p32xx_sensor_overflow_check:
+0571 c2818574 bbit1 3 ,p_mouse_p32xx_sensor_motion_1 
+0572 c2820574 bbit1 4 ,p_mouse_p32xx_sensor_motion_1 
+0573 20600000 rtn 
+
+p_mouse_p32xx_sensor_motion_1:
+0574 20204259 branch mouse_p32xx_sensor_motion_1 + 3 
+
 p_mouse_sensor_poweron:
-0557 20403f65 call mouse_sensor_spi_init 
-0558 6fe0c927 fetch 1 ,mem_config_sensor_type 
-0559 c005855e beq ka8g2 ,p_mouse_ka8g2_sensor_init 
-055a 20404232 call mouse_sensor_reset 
-055b da604aa3 arg mem_sensor_poweron_init ,regc 
-055c 2040422b call mouse_sensor_wr_seq 
-055d 2020408e branch mouse_dpi_config 
+0575 20403f65 call mouse_sensor_spi_init 
+0576 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0577 c005857c beq ka8g2 ,p_mouse_ka8g2_sensor_init 
+0578 20404232 call mouse_sensor_reset 
+0579 da604aa3 arg mem_sensor_poweron_init ,regc 
+057a 2040422b call mouse_sensor_wr_seq 
+057b 2020408e branch mouse_dpi_config 
 
 p_mouse_ka8g2_sensor_init:
-055e 20400565 call p_mouse_ka8g2_sensor_reset 
-055f da604be3 arg mem_ka8g2_sensor_poweron_init ,regc 
-0560 2040422b call mouse_sensor_wr_seq 
-0561 2020408e branch mouse_dpi_config 
+057c 20400583 call p_mouse_ka8g2_sensor_reset 
+057d da604be3 arg mem_ka8g2_sensor_poweron_init ,regc 
+057e 2040422b call mouse_sensor_wr_seq 
+057f 2020408e branch mouse_dpi_config 
 
 p_mouse_sensor_reset:
-0562 6fe0c927 fetch 1 ,mem_config_sensor_type 
-0563 c0058565 beq ka8g2 ,p_mouse_ka8g2_sensor_reset 
-0564 20204232 branch mouse_sensor_reset 
+0580 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0581 c0058583 beq ka8g2 ,p_mouse_ka8g2_sensor_reset 
+0582 20204232 branch mouse_sensor_reset 
 
 p_mouse_ka8g2_sensor_reset:
-0565 58009706 setarg 0x9706 
-0566 20405b0c call twspi_write 
-0567 20002ee0 nop 12000 
-0568 20600000 rtn 
+0583 58009706 setarg 0x9706 
+0584 20405b0c call twspi_write 
+0585 20002ee0 nop 12000 
+0586 20600000 rtn 
 
 p_mouse_sensor_powerdown:
-0569 204041a7 call mouse_init_sunt 
-056a 20403f65 call mouse_sensor_spi_init 
-056b 6fe0c927 fetch 1 ,mem_config_sensor_type 
-056c c005856e beq ka8g2 ,p_mouse_ka8g2_sensor_powerdown 
-056d 2020423e branch mouse_sensor_powerdown_end 
+0587 204041a7 call mouse_init_sunt 
+0588 20403f65 call mouse_sensor_spi_init 
+0589 6fe0c927 fetch 1 ,mem_config_sensor_type 
+058a c005858c beq ka8g2 ,p_mouse_ka8g2_sensor_powerdown 
+058b 2020423e branch mouse_sensor_powerdown_end 
 
 p_mouse_ka8g2_sensor_powerdown:
-056e 58001f06 setarg 0x1f06 
-056f 20205b0c branch twspi_write 
+058c 58001f06 setarg 0x1f06 
+058d 20205b0c branch twspi_write 
 
 p_mouse_key:
-0570 20400572 call p_mouse_check_key_gpio 
-0571 202040dd branch mouse_key + 1 
+058e 20400590 call p_mouse_check_key_gpio 
+058f 202040dd branch mouse_key + 1 
 
 p_mouse_check_key_gpio:
-0572 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
-0573 245a4121 ncall mouse_check_key_gpio_once ,blank 
-0574 da200000 arg 0 ,rega 
-0575 2040057b call p_mouse_check_lkey_gpio 
-0576 20400580 call p_mouse_check_rkey_gpio 
-0577 20400585 call p_mouse_check_mkey_gpio 
-0578 2040058a call p_mouse_check_bkkey_gpio 
-0579 20400597 call p_mouse_check_fwkey_gpio 
-057a 2020411e branch mouse_check_key_gpio_next 
+0590 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0591 245a4121 ncall mouse_check_key_gpio_once ,blank 
+0592 da200000 arg 0 ,rega 
+0593 20400599 call p_mouse_check_lkey_gpio 
+0594 2040059e call p_mouse_check_rkey_gpio 
+0595 204005a3 call p_mouse_check_mkey_gpio 
+0596 204005a8 call p_mouse_check_bkkey_gpio 
+0597 204005b5 call p_mouse_check_fwkey_gpio 
+0598 2020411e branch mouse_check_key_gpio_next 
 
 p_mouse_check_lkey_gpio:
-057b 6fe0c918 fetch 1 ,mem_lbutton_gpio 
-057c 204005a4 call p_mouse_gpio_config_output_high 
-057d 20404124 call mouse_check_lkey_gpio 
-057e 6848c918 fetcht 1 ,mem_lbutton_gpio 
-057f 20203f56 branch mouse_gpio_config_input_pu 
+0599 6fe0c918 fetch 1 ,mem_lbutton_gpio 
+059a 204005c2 call p_mouse_gpio_config_output_high 
+059b 20404124 call mouse_check_lkey_gpio 
+059c 6848c918 fetcht 1 ,mem_lbutton_gpio 
+059d 20203f56 branch mouse_gpio_config_input_pu 
 
 p_mouse_check_rkey_gpio:
-0580 6fe0c919 fetch 1 ,mem_rbutton_gpio 
-0581 204005a4 call p_mouse_gpio_config_output_high 
-0582 2040412a call mouse_check_rkey_gpio 
-0583 6848c919 fetcht 1 ,mem_rbutton_gpio 
-0584 20203f56 branch mouse_gpio_config_input_pu 
+059e 6fe0c919 fetch 1 ,mem_rbutton_gpio 
+059f 204005c2 call p_mouse_gpio_config_output_high 
+05a0 2040412a call mouse_check_rkey_gpio 
+05a1 6848c919 fetcht 1 ,mem_rbutton_gpio 
+05a2 20203f56 branch mouse_gpio_config_input_pu 
 
 p_mouse_check_mkey_gpio:
-0585 6fe0c91a fetch 1 ,mem_mbutton_gpio 
-0586 204005a4 call p_mouse_gpio_config_output_high 
-0587 20404130 call mouse_check_mkey_gpio 
-0588 6848c91a fetcht 1 ,mem_mbutton_gpio 
-0589 20203f56 branch mouse_gpio_config_input_pu 
+05a3 6fe0c91a fetch 1 ,mem_mbutton_gpio 
+05a4 204005c2 call p_mouse_gpio_config_output_high 
+05a5 20404130 call mouse_check_mkey_gpio 
+05a6 6848c91a fetcht 1 ,mem_mbutton_gpio 
+05a7 20203f56 branch mouse_gpio_config_input_pu 
 
 p_mouse_check_bkkey_gpio:
-058a 6fe0c90d fetch 1 ,mem_bk_button_gpio 
-058b c17f8000 rtneq gpio_disable 
-058c 704b9603 jam mouse_bk_key ,mem_mouse_key_temp 
-058d 6fe0cb91 fetch 1 ,mem_mouse_bkkey_press_status 
-058e 1fe22600 copy pdata ,regc 
-058f 6848c90d fetcht 1 ,mem_bk_button_gpio 
-0590 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
-0591 c07f8593 beq gpio_disable ,p_mouse_3io6key_bk_check 
-0592 2020413e branch mouse_check_bkkey_gpio_next 
+05a8 6fe0c90d fetch 1 ,mem_bk_button_gpio 
+05a9 c17f8000 rtneq gpio_disable 
+05aa 704b9603 jam mouse_bk_key ,mem_mouse_key_temp 
+05ab 6fe0cb91 fetch 1 ,mem_mouse_bkkey_press_status 
+05ac 1fe22600 copy pdata ,regc 
+05ad 6848c90d fetcht 1 ,mem_bk_button_gpio 
+05ae 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+05af c07f85b1 beq gpio_disable ,p_mouse_3io6key_bk_check 
+05b0 2020413e branch mouse_check_bkkey_gpio_next 
 
 p_mouse_3io6key_bk_check:
-0593 6fe0c90d fetch 1 ,mem_bk_button_gpio 
-0594 204005a7 call p_mouse_gpio_config_output_low 
-0595 6848c90d fetcht 1 ,mem_bk_button_gpio 
-0596 2020414b branch mouse_3io6key_bk_check 
+05b1 6fe0c90d fetch 1 ,mem_bk_button_gpio 
+05b2 204005c5 call p_mouse_gpio_config_output_low 
+05b3 6848c90d fetcht 1 ,mem_bk_button_gpio 
+05b4 2020414b branch mouse_3io6key_bk_check 
 
 p_mouse_check_fwkey_gpio:
-0597 6fe0c90e fetch 1 ,mem_fw_button_gpio 
-0598 c17f8000 rtneq gpio_disable 
-0599 704b9604 jam mouse_fw_key ,mem_mouse_key_temp 
-059a 6fe0cb92 fetch 1 ,mem_mouse_fwkey_press_status 
-059b 1fe22600 copy pdata ,regc 
-059c 6848c90e fetcht 1 ,mem_fw_button_gpio 
-059d 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
-059e c07f85a0 beq gpio_disable ,p_mouse_3io6key_fw_check 
-059f 20204157 branch mouse_check_fwkey_gpio_next 
+05b5 6fe0c90e fetch 1 ,mem_fw_button_gpio 
+05b6 c17f8000 rtneq gpio_disable 
+05b7 704b9604 jam mouse_fw_key ,mem_mouse_key_temp 
+05b8 6fe0cb92 fetch 1 ,mem_mouse_fwkey_press_status 
+05b9 1fe22600 copy pdata ,regc 
+05ba 6848c90e fetcht 1 ,mem_fw_button_gpio 
+05bb 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+05bc c07f85be beq gpio_disable ,p_mouse_3io6key_fw_check 
+05bd 20204157 branch mouse_check_fwkey_gpio_next 
 
 p_mouse_3io6key_fw_check:
-05a0 6fe0c90e fetch 1 ,mem_fw_button_gpio 
-05a1 204005a7 call p_mouse_gpio_config_output_low 
-05a2 6848c90e fetcht 1 ,mem_fw_button_gpio 
-05a3 20204164 branch mouse_3io6key_fw_check 
+05be 6fe0c90e fetch 1 ,mem_fw_button_gpio 
+05bf 204005c5 call p_mouse_gpio_config_output_low 
+05c0 6848c90e fetcht 1 ,mem_fw_button_gpio 
+05c1 20204164 branch mouse_3io6key_fw_check 
 
 p_mouse_gpio_config_output_high:
-05a4 c17f8000 rtneq gpio_disable 
-05a5 d840003f arg gpcfg_output_high ,temp 
-05a6 20206093 branch gpio_config_function_int 
+05c2 c17f8000 rtneq gpio_disable 
+05c3 d840003f arg gpcfg_output_high ,temp 
+05c4 20206093 branch gpio_config_function_int 
 
 p_mouse_gpio_config_output_low:
-05a7 c17f8000 rtneq gpio_disable 
-05a8 d840003e arg gpcfg_output_low ,temp 
-05a9 20206093 branch gpio_config_function_int 
+05c5 c17f8000 rtneq gpio_disable 
+05c6 d840003e arg gpcfg_output_low ,temp 
+05c7 20206093 branch gpio_config_function_int 
 
 p_mouse_idle:
-05aa 20407936 call ui_check_paring_button 
-05ab 204005ae call p_mouse_dpi_check 
-05ac 204005c2 call p_mouse_dpi_another_gpio_check 
-05ad 2020464f branch mouse_idle + 4 
+05c8 20407936 call ui_check_paring_button 
+05c9 204005cc call p_mouse_dpi_check 
+05ca 204005e0 call p_mouse_dpi_another_gpio_check 
+05cb 2020464f branch mouse_idle + 4 
 
 p_mouse_dpi_check:
-05ae 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-05af c2974036 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
-05b0 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
-05b1 c17f8000 rtneq gpio_disable 
-05b2 da200000 arg 0 ,rega 
-05b3 704b9605 jam mouse_dpi_key ,mem_mouse_key_temp 
-05b4 6848c90f fetcht 1 ,mem_dpi_button_gpio 
-05b5 204005b7 call p_mouse_dpi_key_check 
-05b6 2020402f branch mouse_dpi_check_next 
+05cc 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+05cd c2974036 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
+05ce 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
+05cf c17f8000 rtneq gpio_disable 
+05d0 da200000 arg 0 ,rega 
+05d1 704b9605 jam mouse_dpi_key ,mem_mouse_key_temp 
+05d2 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+05d3 204005d5 call p_mouse_dpi_key_check 
+05d4 2020402f branch mouse_dpi_check_next 
 
 p_mouse_dpi_key_check:
-05b7 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-05b8 c2964048 bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
-05b9 6fe0cb93 fetch 1 ,mem_mouse_dpikey_press_status 
-05ba 1fe22600 copy pdata ,regc 
-05bb 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
-05bc c07f85be beq gpio_disable ,p_mouse_3io6key_dpi_check 
-05bd 2020403f branch mouse_dpi_key_check_next 
+05d5 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+05d6 c2964048 bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+05d7 6fe0cb93 fetch 1 ,mem_mouse_dpikey_press_status 
+05d8 1fe22600 copy pdata ,regc 
+05d9 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+05da c07f85dc beq gpio_disable ,p_mouse_3io6key_dpi_check 
+05db 2020403f branch mouse_dpi_key_check_next 
 
 p_mouse_3io6key_dpi_check:
-05be 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
-05bf 204005a7 call p_mouse_gpio_config_output_low 
-05c0 6848c90f fetcht 1 ,mem_dpi_button_gpio 
-05c1 20204195 branch mouse_3io6key_check 
+05dc 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
+05dd 204005c5 call p_mouse_gpio_config_output_low 
+05de 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+05df 20204195 branch mouse_3io6key_check 
 
 p_mouse_dpi_another_gpio_check:
-05c2 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-05c3 c41e8000 rtnbit0 mouse_enable_double_dpi_key 
-05c4 6fe0cc3a fetch 1 ,mem_mouse_another_dpi_connect_vin_flag 
-05c5 243a05cb nbranch p_mouse_dpi_another_gpio_connect_vin_check ,blank 
+05e0 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+05e1 c41e8000 rtnbit0 mouse_enable_double_dpi_key 
+05e2 6fe0cc3a fetch 1 ,mem_mouse_another_dpi_connect_vin_flag 
+05e3 243a05e9 nbranch p_mouse_dpi_another_gpio_connect_vin_check ,blank 
 
 p_mouse_dpi_another_gpio_connect_gnd_check:
-05c6 6fe0cc3b fetch 1 ,mem_dpi_another_button_gpio 
-05c7 204005a4 call p_mouse_gpio_config_output_high 
-05c8 204005db call p_mouse_dpi_another_check 
-05c9 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
-05ca 20203f56 branch mouse_gpio_config_input_pu 
+05e4 6fe0cc3b fetch 1 ,mem_dpi_another_button_gpio 
+05e5 204005c2 call p_mouse_gpio_config_output_high 
+05e6 204005f9 call p_mouse_dpi_another_check 
+05e7 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
+05e8 20203f56 branch mouse_gpio_config_input_pu 
 
 p_mouse_dpi_another_gpio_connect_vin_check:
-05cb 6fe0cc3b fetch 1 ,mem_dpi_another_button_gpio 
-05cc 793ffe07 set0 gpio_active_bit ,pdata 
-05cd 67e0cc3b store 1 ,mem_dpi_another_button_gpio 
-05ce 204005a7 call p_mouse_gpio_config_output_low 
-05cf 704c3f00 jam mouse_dpi_another_key ,mem_mouse_key_temp_patch 
-05d0 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
-05d1 6fe0cc3c fetch 1 ,mem_dpi_another_press_status 
-05d2 204005f4 call p_mouse_check_key_connect_vin_new 
-05d3 204005df call p_mouse_dpi_another_state_check 
-05d4 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
-05d5 20203f56 branch mouse_gpio_config_input_pu 
+05e9 6fe0cc3b fetch 1 ,mem_dpi_another_button_gpio 
+05ea 793ffe07 set0 gpio_active_bit ,pdata 
+05eb 67e0cc3b store 1 ,mem_dpi_another_button_gpio 
+05ec 204005c5 call p_mouse_gpio_config_output_low 
+05ed 704c3f00 jam mouse_dpi_another_key ,mem_mouse_key_temp_patch 
+05ee 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
+05ef 6fe0cc3c fetch 1 ,mem_dpi_another_press_status 
+05f0 20400612 call p_mouse_check_key_connect_vin_new 
+05f1 204005fd call p_mouse_dpi_another_state_check 
+05f2 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
+05f3 20203f56 branch mouse_gpio_config_input_pu 
 
 p_mouse_dpi_another_down_new:
-05d6 20403f56 call mouse_gpio_config_input_pu 
-05d7 6fe0cc3d fetch 1 ,mem_dpi_another_button_state 
-05d8 c1008000 rtneq dpi_button_state_down 
-05d9 704c3d01 jam dpi_button_state_down ,mem_dpi_another_button_state 
-05da 20204069 branch mouse_dpi_process 
+05f4 20403f56 call mouse_gpio_config_input_pu 
+05f5 6fe0cc3d fetch 1 ,mem_dpi_another_button_state 
+05f6 c1008000 rtneq dpi_button_state_down 
+05f7 704c3d01 jam dpi_button_state_down ,mem_dpi_another_button_state 
+05f8 20204069 branch mouse_dpi_process 
 
 p_mouse_dpi_another_check:
-05db 704c3f00 jam mouse_dpi_another_key ,mem_mouse_key_temp_patch 
-05dc 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
-05dd 6fe0cc3c fetch 1 ,mem_dpi_another_press_status 
-05de 204005ea call p_mouse_check_key_connect_gnd_new 
+05f9 704c3f00 jam mouse_dpi_another_key ,mem_mouse_key_temp_patch 
+05fa 6848cc3b fetcht 1 ,mem_dpi_another_button_gpio 
+05fb 6fe0cc3c fetch 1 ,mem_dpi_another_press_status 
+05fc 20400608 call p_mouse_check_key_connect_gnd_new 
 
 p_mouse_dpi_another_state_check:
-05df 67e0cc3c store 1 ,mem_dpi_another_press_status 
-05e0 6fe0cc3e fetch 1 ,mem_dpi_another_button_down_enable 
-05e1 203a05e6 branch p_mouse_dpi_another_up ,blank 
+05fd 67e0cc3c store 1 ,mem_dpi_another_press_status 
+05fe 6fe0cc3e fetch 1 ,mem_dpi_another_button_down_enable 
+05ff 203a0604 branch p_mouse_dpi_another_up ,blank 
 
 p_mouse_dpi_another_down:
-05e2 6fe0cc3d fetch 1 ,mem_dpi_another_button_state 
-05e3 c1008000 rtneq dpi_button_state_down 
-05e4 704c3d01 jam dpi_button_state_down ,mem_dpi_another_button_state 
-05e5 20204069 branch mouse_dpi_process 
+0600 6fe0cc3d fetch 1 ,mem_dpi_another_button_state 
+0601 c1008000 rtneq dpi_button_state_down 
+0602 704c3d01 jam dpi_button_state_down ,mem_dpi_another_button_state 
+0603 20204069 branch mouse_dpi_process 
 
 p_mouse_dpi_another_up:
-05e6 6fe0cc3d fetch 1 ,mem_dpi_another_button_state 
-05e7 c1000000 rtneq dpi_button_state_up 
-05e8 704c3d00 jam dpi_button_state_up ,mem_dpi_another_button_state 
-05e9 20600000 rtn 
+0604 6fe0cc3d fetch 1 ,mem_dpi_another_button_state 
+0605 c1000000 rtneq dpi_button_state_up 
+0606 704c3d00 jam dpi_button_state_up ,mem_dpi_another_button_state 
+0607 20600000 rtn 
 
 p_mouse_check_key_connect_gnd_new:
-05ea 1fe3fe00 lshift pdata ,pdata 
-05eb 1fe22400 copy pdata ,regb 
-05ec 20406059 call gpio_get_bit 
-05ed 7920a400 setflag true ,0 ,regb 
-05ee 1a417e07 and regb ,0x07 ,pdata 
-05ef 6848cc3f fetcht 1 ,mem_mouse_key_temp_patch 
-05f0 18420e00 copy temp ,queue 
-05f1 c00385ff beq 0x07 ,p_mouse_key_press 
-05f2 c0000601 beq 0x00 ,p_mouse_key_release 
-05f3 20600000 rtn 
+0608 1fe3fe00 lshift pdata ,pdata 
+0609 1fe22400 copy pdata ,regb 
+060a 20406059 call gpio_get_bit 
+060b 7920a400 setflag true ,0 ,regb 
+060c 1a417e07 and regb ,0x07 ,pdata 
+060d 6848cc3f fetcht 1 ,mem_mouse_key_temp_patch 
+060e 18420e00 copy temp ,queue 
+060f c003861d beq 0x07 ,p_mouse_key_press 
+0610 c000061f beq 0x00 ,p_mouse_key_release 
+0611 20600000 rtn 
 
 p_mouse_check_key_connect_vin_new:
-05f4 1fe3fe00 lshift pdata ,pdata 
-05f5 1fe22400 copy pdata ,regb 
-05f6 20403f54 call mouse_gpio_config_input_pd 
-05f7 20406059 call gpio_get_bit 
-05f8 7920a400 setflag true ,0 ,regb 
-05f9 1a417e07 and regb ,0x07 ,pdata 
-05fa 6848cc3f fetcht 1 ,mem_mouse_key_temp_patch 
-05fb 18420e00 copy temp ,queue 
-05fc c00385ff beq 0x07 ,p_mouse_key_press 
-05fd c0000601 beq 0x00 ,p_mouse_key_release 
-05fe 20600000 rtn 
+0612 1fe3fe00 lshift pdata ,pdata 
+0613 1fe22400 copy pdata ,regb 
+0614 20403f54 call mouse_gpio_config_input_pd 
+0615 20406059 call gpio_get_bit 
+0616 7920a400 setflag true ,0 ,regb 
+0617 1a417e07 and regb ,0x07 ,pdata 
+0618 6848cc3f fetcht 1 ,mem_mouse_key_temp_patch 
+0619 18420e00 copy temp ,queue 
+061a c003861d beq 0x07 ,p_mouse_key_press 
+061b c000061f beq 0x00 ,p_mouse_key_release 
+061c 20600000 rtn 
 
 p_mouse_key_press:
-05ff 704c3e01 jam 1 ,mem_dpi_another_button_down_enable 
-0600 20600000 rtn 
+061d 704c3e01 jam 1 ,mem_dpi_another_button_down_enable 
+061e 20600000 rtn 
 
 p_mouse_key_release:
-0601 704c3e00 jam 0 ,mem_dpi_another_button_down_enable 
-0602 20600000 rtn 
+061f 704c3e00 jam 0 ,mem_dpi_another_button_down_enable 
+0620 20600000 rtn 
 
 p_mouse_dpi_process:
-0603 20404072 call mouse_dpi_ghost_check 
-0604 20740000 rtn user 
-0605 6fe0c992 fetch 1 ,mem_mouse_dpi 
-0606 1fe20400 copy pdata ,temp 
-0607 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0608 c29e860f bbit1 mouse_enable_double_dpi_key ,p_mouse_double_dpi_check 
-0609 18427e00 copy temp ,pdata 
-060a 1fe0fe01 increase 1 ,pdata 
-060b 1fe17e03 and pdata ,0x03 ,pdata 
+0621 20404072 call mouse_dpi_ghost_check 
+0622 20740000 rtn user 
+0623 6fe0c992 fetch 1 ,mem_mouse_dpi 
+0624 1fe20400 copy pdata ,temp 
+0625 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0626 c29e862d bbit1 mouse_enable_double_dpi_key ,p_mouse_double_dpi_check 
+0627 18427e00 copy temp ,pdata 
+0628 1fe0fe01 increase 1 ,pdata 
+0629 1fe17e03 and pdata ,0x03 ,pdata 
 
 p_mouse_dpi_store:
-060c 67e0c992 store 1 ,mem_mouse_dpi 
-060d 20404095 call mouse_seting_dpi 
-060e 20204643 branch mouse_store_eerpom_dpi 
+062a 67e0c992 store 1 ,mem_mouse_dpi 
+062b 20404095 call mouse_seting_dpi 
+062c 20204643 branch mouse_store_eerpom_dpi 
 
 p_mouse_double_dpi_check:
-060f 6fe0cc3e fetch 1 ,mem_dpi_another_button_down_enable 
-0610 243a062c nbranch p_mouse_another_dpi_button_down ,blank 
+062d 6fe0cc3e fetch 1 ,mem_dpi_another_button_down_enable 
+062e 243a064a nbranch p_mouse_another_dpi_button_down ,blank 
 
 p_mouse_dpi_increase:
-0611 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0612 c28e0620 bbit1 mouse_enable_dpi_level_4 ,p_mouse_dpi_increase_level_4 
-0613 18427e00 copy temp ,pdata 
-0614 c1008000 rtneq mouse_dpi_level2 
+062f 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0630 c28e063e bbit1 mouse_enable_dpi_level_4 ,p_mouse_dpi_increase_level_4 
+0631 18427e00 copy temp ,pdata 
+0632 c1008000 rtneq mouse_dpi_level2 
 
 p_mouse_dpi_increase_level:
-0615 c000061c beq mouse_dpi_level1 ,p_mouse_dpi_level_3 
-0616 c001061a beq mouse_dpi_level3 ,p_mouse_dpi_level_2 
-0617 20600000 rtn 
+0633 c000063a beq mouse_dpi_level1 ,p_mouse_dpi_level_3 
+0634 c0010638 beq mouse_dpi_level3 ,p_mouse_dpi_level_2 
+0635 20600000 rtn 
 
 p_mouse_dpi_level_1:
-0618 58000002 setarg 2 
-0619 2020060c branch p_mouse_dpi_store 
+0636 58000002 setarg 2 
+0637 2020062a branch p_mouse_dpi_store 
 
 p_mouse_dpi_level_2:
-061a 58000000 setarg 0 
-061b 2020060c branch p_mouse_dpi_store 
+0638 58000000 setarg 0 
+0639 2020062a branch p_mouse_dpi_store 
 
 p_mouse_dpi_level_3:
-061c 58000001 setarg 1 
-061d 2020060c branch p_mouse_dpi_store 
+063a 58000001 setarg 1 
+063b 2020062a branch p_mouse_dpi_store 
 
 p_mouse_dpi_level_4:
-061e 58000003 setarg 3 
-061f 2020060c branch p_mouse_dpi_store 
+063c 58000003 setarg 3 
+063d 2020062a branch p_mouse_dpi_store 
 
 p_mouse_dpi_increase_level_4:
-0620 18427e00 copy temp ,pdata 
-0621 c1008000 rtneq mouse_dpi_level2 
-0622 c000061c beq mouse_dpi_level1 ,p_mouse_dpi_level_3 
-0623 c001061e beq mouse_dpi_level3 ,p_mouse_dpi_level_4 
-0624 c001861a beq mouse_dpi_level4 ,p_mouse_dpi_level_2 
-0625 20600000 rtn 
+063e 18427e00 copy temp ,pdata 
+063f c1008000 rtneq mouse_dpi_level2 
+0640 c000063a beq mouse_dpi_level1 ,p_mouse_dpi_level_3 
+0641 c001063c beq mouse_dpi_level3 ,p_mouse_dpi_level_4 
+0642 c0018638 beq mouse_dpi_level4 ,p_mouse_dpi_level_2 
+0643 20600000 rtn 
 
 p_mouse_dpi_decrease_level_4:
-0626 18427e00 copy temp ,pdata 
-0627 c1010000 rtneq mouse_dpi_level3 
-0628 c000061e beq mouse_dpi_level1 ,p_mouse_dpi_level_4 
-0629 c000861a beq mouse_dpi_level2 ,p_mouse_dpi_level_2 
-062a c0018618 beq mouse_dpi_level4 ,p_mouse_dpi_level_1 
-062b 20600000 rtn 
+0644 18427e00 copy temp ,pdata 
+0645 c1010000 rtneq mouse_dpi_level3 
+0646 c000063c beq mouse_dpi_level1 ,p_mouse_dpi_level_4 
+0647 c0008638 beq mouse_dpi_level2 ,p_mouse_dpi_level_2 
+0648 c0018636 beq mouse_dpi_level4 ,p_mouse_dpi_level_1 
+0649 20600000 rtn 
 
 p_mouse_another_dpi_button_down:
 
 p_mouse_dpi_decrease:
-062c 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-062d c28e0626 bbit1 mouse_enable_dpi_level_4 ,p_mouse_dpi_decrease_level_4 
-062e 18427e00 copy temp ,pdata 
-062f c1010000 rtneq mouse_dpi_level3 
+064a 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+064b c28e0644 bbit1 mouse_enable_dpi_level_4 ,p_mouse_dpi_decrease_level_4 
+064c 18427e00 copy temp ,pdata 
+064d c1010000 rtneq mouse_dpi_level3 
 
 p_mouse_dpi_decrease_level:
-0630 c0000618 beq mouse_dpi_level1 ,p_mouse_dpi_level_1 
-0631 c000861a beq mouse_dpi_level2 ,p_mouse_dpi_level_2 
-0632 20600000 rtn 
+064e c0000636 beq mouse_dpi_level1 ,p_mouse_dpi_level_1 
+064f c0008638 beq mouse_dpi_level2 ,p_mouse_dpi_level_2 
+0650 20600000 rtn 
 
 p_power_ctrl_start:
-0633 6fe1478c fetch 2 ,mem_ui_state_map 
-0634 c3858000 rtnbit1 ui_state_ble_adv 
-0635 c3838000 rtnbit1 ui_state_bt_reconnect 
-0636 c3830000 rtnbit1 ui_state_bt_discovery 
-0637 6a214899 fetchr rega ,2 ,mem_rssi_signal_buf_ptr 
-0638 204025cb call rssi_average 
-0639 6048c8c7 storet 1 ,mem_rssi_avg_received 
-063a 202026f6 branch power_ctrl_rssi_avg_compare 
+0651 6fe1478c fetch 2 ,mem_ui_state_map 
+0652 c3858000 rtnbit1 ui_state_ble_adv 
+0653 c3838000 rtnbit1 ui_state_bt_reconnect 
+0654 c3830000 rtnbit1 ui_state_bt_discovery 
+0655 6a214899 fetchr rega ,2 ,mem_rssi_signal_buf_ptr 
+0656 204025cb call rssi_average 
+0657 6048c8c7 storet 1 ,mem_rssi_avg_received 
+0658 202026f6 branch power_ctrl_rssi_avg_compare 
               org 0x3bc1
 
 mouse_init:
Index: output/ramcode.rom
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/ramcode.rom	(revision 4043)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/output/ramcode.rom	(working copy)
@@ -16,36 +16,36 @@
 c0648218
 c065025e
 c06600ca
-c0670538
-c0678604
+c067053b
+c0678621
 c068036c
-c068856f
-c06a0554
+c0688590
+c06a0575
 c06b0280
 c06c83af
-c06d04a7
-c06d84d4
-c06f05a7
+c06d04aa
+c06d84d7
+c06f05c8
 c06f8054
 c070804c
 c0710048
-c07404db
+c07404de
 2020137c
-c00d04ef
+c00d04f2
 c0100046
 c0158031
 c01980aa
 c01a00af
-c04384d7
-c05084f9
-c0518503
-c0600505
+c04384da
+c05084fc
+c0518506
+c0600508
 c06e8326
 c07102f2
 c07482fa
 c07501b2
-c076052b
-c0768634
+c076052e
+c0768651
 2020137c
 6ff08a0b
 793ffe05
@@ -235,7 +235,7 @@
 20403d8a
 20404728
 2040016d
-20400566
+20400587
 20203bc9
 6fe44bab
 c41e8000
@@ -308,7 +308,7 @@
 20403d13
 20400159
 2040022e
-20400463
+20400466
 204003ed
 6fe0cbc0
 67e0cca1
@@ -431,7 +431,7 @@
 67e0cba4
 6fe14bbc
 67e14ab2
-20200566
+20200587
 20402631
 24340266
 204001c2
@@ -531,12 +531,12 @@
 58000006
 20405b0d
 c281be23
-2040055f
-20400566
+20400580
+20400587
 20203e23
 204042e9
 20407fdc
-20400463
+20400466
 20400394
 20404015
 6848c910
@@ -544,14 +544,14 @@
 6848c910
 20406042
 6fe0c920
-204005a1
+204005c2
 d8400003
 20403f56
 2040025e
 20406082
 d8400013
 20403f56
-20400455
+20400458
 20400238
 20400240
 2040024d
@@ -610,14 +610,14 @@
 20406050
 20403f88
 6fe0c91f
-204005a1
+204005c2
 20203e44
 6fe0c8a7
 205a0272
 6fe0c8bd
 c1008000
 2040269f
-2040052b
+2040052e
 24740000
 204026c4
 6fe0cbe1
@@ -649,11 +649,11 @@
 c02202a1
 c02002ab
 20204336
-20400554
+20400575
 204003ff
 704c4200
 20204350
-20400554
+20400575
 20404544
 204003ff
 704c4200
@@ -750,7 +750,7 @@
 58000000
 67e3c8d0
 704be101
-20400566
+20400587
 2020026b
 70488b00
 6fe14beb
@@ -888,7 +888,7 @@
 6fe0cca1
 247a0000
 6fe0cbc1
-203a046f
+203a0472
 67e0cba8
 20600000
 6fe14ac2
@@ -923,52 +923,52 @@
 207a0000
 1fe0ffff
 67e0cca1
-203a0448
-2020043a
+203a039f
+202003a4
 6fe0c938
 c00003a9
-c000844f
-c0010451
+c0008452
+c0010454
 20600000
 6fe0c938
 c00003ac
-c0008441
-c0010443
+c0008444
+c0010446
 20600000
-6fe0c915
-c07f844f
-2020044d
-6fe0c915
-c07f8441
-2020043f
+6fe0cc48
+c07f8452
+20200450
+6fe0cc48
+c07f8444
+20200442
 20403e9b
 20400396
 2040232b
 20402556
 204047cd
 20400399
-2040046c
-20400419
+2040046f
+2040041a
 2040407c
 204044cc
-20400484
+20400487
 204044ff
 204003cc
 204003d2
 204003dd
 204003d6
 20404512
-2040049b
-20404515
 2040049e
+20404515
+204004a1
 2040452a
 2040452d
 20404532
 20404535
 20404022
 20404547
-20400458
-204004a1
+2040045b
+204004a4
 202003da
 da4003cf
 da604c9d
@@ -998,15 +998,15 @@
 67e0cc9f
 1fe67c08
 244103eb
-c000843a
-c0028448
+c000843d
+c002844b
 20600000
 704c9f00
 20600000
 704c4100
 6fe0cc40
 207a0000
-20400455
+20400458
 204003f8
 204003fc
 6fe0cc46
@@ -1046,72 +1046,75 @@
 20600000
 704c4101
 704c4300
+204003f3
 20600000
 6fe0cc41
 207a0000
+6fe0cca1
+247a0000
 6fe0cc43
-c0008427
+c000842a
 6fe0cc45
-243a0422
+243a0425
 704c4500
 704c4100
-20200448
+2020044b
 6fe0cc47
-203a041f
+203a0422
 1fe0ffff
 67e0cc47
-2020043a
+2020043d
 6fe0cc4c
-243a042c
+243a042f
 da604c51
-da400434
+da400437
 2020318a
 6fe0cc4f
-203a0447
-20200429
+203a044a
+2020042c
 6fe0cc4f
 20628000
 1fe0ffff
 67e0cc4f
 20600000
 6fe0cc4c
-245a042f
+245a0432
 204003fc
 6fe0cc52
-c0008447
+c000844a
 704c5201
 6fe0c938
-c000043f
-c0008441
-c0010443
+c0000442
+c0008444
+c0010446
 20600000
 6848cc48
-20200444
+20200447
 6848cc49
-20200444
+20200447
 6848cc4a
 18467cff
 20628000
 20206069
 704c5200
 6fe0c938
-c000044d
-c000844f
-c0010451
+c0000450
+c0008452
+c0010454
 20600000
 6848cc48
-20200452
+20200455
 6848cc49
-20200452
+20200455
 6848cc4a
 18467cff
 20628000
-20206065
-2040044d
-2040044f
-20200451
+2020607f
+20400450
+20400452
+20200454
 6fe44bab
-c2820467
+c282046a
 704ca000
 6fe14ab2
 207a0000
@@ -1120,18 +1123,18 @@
 98460400
 6fe14bee
 98467e00
-20210465
+20210468
 6848cbed
 20206065
 6848cbed
 20206069
 6fe0cca0
 247a0000
-20400463
+20400466
 704ca001
 20600000
 da604ba8
-da40046f
+da400472
 2020318a
 6fe0c927
 c001c8f2
@@ -1145,8 +1148,8 @@
 6848c992
 18408402
 18467c03
-2041047e
-24410482
+20410481
+24410485
 202048ff
 6fe44bab
 c40e0000
@@ -1155,11 +1158,11 @@
 184085fd
 20600000
 6fe0c938
-c000048a
+c000048d
 6fe44bab
 c41a8000
 6848cbca
-2020048d
+20200490
 6fe44bab
 c4190000
 6848cbcb
@@ -1168,9 +1171,9 @@
 1fe17e07
 6848cb9d
 98467c00
-20228494
+20228497
 202044eb
-20400499
+2040049c
 6fe0cb9f
 c1008000
 704b9f01
@@ -1184,15 +1187,15 @@
 da40436c
 2020318a
 da604ab2
-da4004a4
+da4004a7
 20203191
 6fe0c938
 c00002e9
 2020431b
-20400566
+20400587
 704c4200
 20400405
-20400463
+20400466
 6fe1478c
 2feffe0b
 2040c581
@@ -1203,9 +1206,9 @@
 67e14af2
 20404314
 6fe1478c
-c28584be
+c28584c1
 6fe44bab
-c30404be
+c30404c1
 68494997
 18408401
 60494997
@@ -1247,7 +1250,7 @@
 67e0c5f5
 1fe1040f
 1ff1fe00
-c00484e3
+c00484e6
 20204d93
 da200001
 20404dc0
@@ -1266,7 +1269,7 @@
 6fe08049
 207a0000
 c283d730
-c00384f6
+c00384f9
 20205701
 2040585d
 70007378
@@ -1284,27 +1287,27 @@
 20400e80
 20201661
 efe10006
-c0020508
+c002050b
 202019e4
 efe18006
 67e1c436
-c005050d
-c009051c
+c0050510
+c009051f
 20201cd3
 6fe44bab
 c31d9de7
 20401e8d
 68494437
 6fe0c3c0
-c2818517
+c281851a
 6fe14437
 c0181ec8
 68494437
 20201deb
 6fe143d1
 98467c00
-24228513
-24340513
+24228516
+24340516
 20201e10
 18c22200
 6fe143d4
@@ -1337,17 +1340,17 @@
 78547c00
 58000000
 67e348d1
-20404240
+20400557
 2040408e
 20403f7e
 20403f83
-2040056d
+2040058e
 6fe0c8d0
 1fe17e1f
 67e0c8d0
-2434054a
-20400547
-20400551
+2434054d
+2040054a
+20400554
 20204544
 704c9c00
 704c9d00
@@ -1362,19 +1365,49 @@
 6fe0c927
 c1018000
 2020471a
+6fe0c4ac
+c1800000
+6fe0c927
+c000424c
+c000c24c
+c004424c
+c001424c
+c001c270
+c002424c
+c0034295
+c005c28e
+20200563
+204042c4
+78547c00
+6fe0c911
+c07f856a
+6848c911
+20406059
+24608000
+58000000
+20405b0d
+c0984266
+58000002
+20405b0d
+c3038571
+20200574
+c2818574
+c2820574
+20600000
+20204259
 20403f65
 6fe0c927
-c005855b
+c005857c
 20404232
 da604aa3
 2040422b
 2020408e
-20400562
+20400583
 da604be3
 2040422b
 2020408e
 6fe0c927
-c0058562
+c0058583
 20204232
 58009706
 20405b0c
@@ -1383,33 +1416,33 @@
 204041a7
 20403f65
 6fe0c927
-c005856b
+c005858c
 2020423e
 58001f06
 20205b0c
-2040056f
+20400590
 202040dd
 6fe0cbe1
 245a4121
 da200000
-20400578
-2040057d
-20400582
-20400587
-20400594
+20400599
+2040059e
+204005a3
+204005a8
+204005b5
 2020411e
 6fe0c918
-204005a1
+204005c2
 20404124
 6848c918
 20203f56
 6fe0c919
-204005a1
+204005c2
 2040412a
 6848c919
 20203f56
 6fe0c91a
-204005a1
+204005c2
 20404130
 6848c91a
 20203f56
@@ -1420,10 +1453,10 @@
 1fe22600
 6848c90d
 6fe0c910
-c07f8590
+c07f85b1
 2020413e
 6fe0c90d
-204005a4
+204005c5
 6848c90d
 2020414b
 6fe0c90e
@@ -1433,10 +1466,10 @@
 1fe22600
 6848c90e
 6fe0c910
-c07f859d
+c07f85be
 20204157
 6fe0c90e
-204005a4
+204005c5
 6848c90e
 20204164
 c17f8000
@@ -1445,52 +1478,48 @@
 c17f8000
 d840003e
 20206093
-204005ac
 20407936
-204005af
-204005c3
+204005cc
+204005e0
 2020464f
 6fe44bab
-c4020000
-20204997
-6fe44bab
 c2974036
 6fe0c90f
 c17f8000
 da200000
 704b9605
 6848c90f
-204005b8
+204005d5
 2020402f
 6fe44bab
 c2964048
 6fe0cb93
 1fe22600
 6fe0c910
-c07f85bf
+c07f85dc
 2020403f
 6fe0c90f
-204005a4
+204005c5
 6848c90f
 20204195
 6fe44bab
 c41e8000
 6fe0cc3a
-243a05cc
+243a05e9
 6fe0cc3b
-204005a1
-204005dc
+204005c2
+204005f9
 6848cc3b
 20203f56
 6fe0cc3b
 793ffe07
 67e0cc3b
-204005a4
+204005c5
 704c3f00
 6848cc3b
 6fe0cc3c
-204005f5
-204005e0
+20400612
+204005fd
 6848cc3b
 20203f56
 20403f56
@@ -1501,10 +1530,10 @@
 704c3f00
 6848cc3b
 6fe0cc3c
-204005eb
+20400608
 67e0cc3c
 6fe0cc3e
-203a05e7
+203a0604
 6fe0cc3d
 c1008000
 704c3d01
@@ -1520,8 +1549,8 @@
 1a417e07
 6848cc3f
 18420e00
-c0038600
-c0000602
+c003861d
+c000061f
 20600000
 1fe3fe00
 1fe22400
@@ -1531,8 +1560,8 @@
 1a417e07
 6848cc3f
 18420e00
-c0038600
-c0000602
+c003861d
+c000061f
 20600000
 704c3e01
 20600000
@@ -1543,7 +1572,7 @@
 6fe0c992
 1fe20400
 6fe44bab
-c29e8610
+c29e862d
 18427e00
 1fe0fe01
 1fe17e03
@@ -1551,40 +1580,40 @@
 20404095
 20204643
 6fe0cc3e
-243a062d
+243a064a
 6fe44bab
-c28e0621
+c28e063e
 18427e00
 c1008000
-c000061d
-c001061b
+c000063a
+c0010638
 20600000
 58000002
-2020060d
+2020062a
 58000000
-2020060d
+2020062a
 58000001
-2020060d
+2020062a
 58000003
-2020060d
+2020062a
 18427e00
 c1008000
-c000061d
-c001061f
-c001861b
+c000063a
+c001063c
+c0018638
 20600000
 18427e00
 c1010000
-c000061f
-c000861b
-c0018619
+c000063c
+c0008638
+c0018636
 20600000
 6fe44bab
-c28e0627
+c28e0644
 18427e00
 c1010000
-c0000619
-c000861b
+c0000636
+c0008638
 20600000
 6fe1478c
 c3858000
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/program/patch.prog	(revision 4043)
+++ /YC1308AC/branch/mouse_project/MingZhe_Project/branch/1m/mouse_public_switch/program/patch.prog	(working copy)
@@ -1181,7 +1181,7 @@
 	arg MOUSE_24G_PAIRING_FLAG,queue
 	call mouse_enable_function_flag
 	setarg 0
-	store 2,mem_24g_reconn_timeout	
+	store 2,mem_24g_reconn_timeout
 	call mouse_stop_discovery
 	call p_mouse_multi_led_blink_enable
 	branch mouse_24g_start_pair_mode_skip_blink_timer
@@ -1866,7 +1866,8 @@
 	disable user
 	setarg 0
 	store 6,mem_mouse_x
-	call mouse_check_sensor_data
+	// call mouse_check_sensor_data
+	call p_mouse_check_sensor_data
 	call mouse_dpi_config
 	call mouse_zwheel
 	call mouse_t_zwheel
@@ -1898,6 +1899,43 @@
 	rtneq P3212
 	branch mouse_drawing_optima
 
+p_mouse_check_sensor_data:
+	fetch 1,mem_spi_write_flash_sm
+	rtnne FLASH_SM_NO_BUYS
+	fetch 1,mem_config_sensor_type
+	beq P3205,mouse_p32xx_sensor_motion
+	beq P3065,mouse_p32xx_sensor_motion
+	beq KA8,mouse_p32xx_sensor_motion
+	beq P3204,mouse_p32xx_sensor_motion
+	beq P3212,mouse_p3212_sensor_motion
+	beq P3065_xy,mouse_p32xx_sensor_motion
+	beq P8009,mouse_p8009_sensor_motion	
+	beq KA8G2,mouse_pka8g2_sensor_motion
+	branch p_mouse_p32xx_sensor_motion
+p_mouse_p32xx_sensor_motion:
+	call mouse_clear_sensor_data
+	disable user
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,p_mouse_p32xx_sensor_motion_2
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+p_mouse_p32xx_sensor_motion_2:
+	setarg PAN_REG_PID_L
+	call twspi_read
+	bne P32XX_ID1,mouse_p3065_judge   
+p_mouse_p32xx_sensor_motion_3:
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	bbit0 7,p_mouse_p32xx_sensor_overflow_check
+	branch p_mouse_p32xx_sensor_motion_1
+p_mouse_p32xx_sensor_overflow_check:
+	bbit1 3,p_mouse_p32xx_sensor_motion_1
+	bbit1 4,p_mouse_p32xx_sensor_motion_1
+	rtn
+p_mouse_p32xx_sensor_motion_1:
+	branch mouse_p32xx_sensor_motion_1+3	
+
 p_mouse_sensor_poweron:
 	call mouse_sensor_spi_init
 	fetch 1,mem_config_sensor_type
