Index: format/app_mouse.format
===================================================================
--- /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/format/app_mouse.format	(revision 1630)
+++ /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/format/app_mouse.format	(working copy)
@@ -328,6 +328,13 @@
 1 mem_mouse_logo_led_gpio
 1 mem_mouse_logo_led_on_check_count
 2 mem_mouse_logo_led_on_timer
+
+0 mem_sensor_s201_dpi
+1 mem_sensor_s201_dpi_0
+1 mem_sensor_s201_dpi_1
+1 mem_sensor_s201_dpi_2
+1 mem_sensor_s201_dpi_3
+1 mem_sensor_s201_dpi_4
 )
 
 
@@ -505,6 +512,7 @@
 0X09 KA8_UL
 0X0a KA8_HD
 0X0b KA8G2
+0X0c S201X
 
 
 //SENSOR REG
Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/output/eeprom.dat	(revision 1630)
+++ /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/output/eeprom.dat	(working copy)
@@ -2,56 +2,60 @@
 02
 aa
 55
-16
-04
+2e
+06
 c2
 84
 00
-0d
+0e
 c0
 00
 00
-0f
+11
 c0
 45
 80
-71
+ca
 c0
 4f
 80
-6f
+c8
 c0
 57
 00
-13
+15
 c0
 61
 80
-27
+80
 c0
 64
 80
-7c
+d5
 c0
 65
 00
-8c
+e5
 c0
 67
-00
-aa
+01
+03
 c0
 68
-00
-c4
+01
+1d
+c0
+69
+81
+3a
 c0
 6b
 00
-a2
+fb
 c0
 6c
-80
-d5
+81
+5b
 20
 20
 13
@@ -59,7 +63,11 @@
 c0
 10
 81
-03
+89
+c0
+75
+00
+47
 20
 20
 13
@@ -87,479 +95,827 @@
 20
 40
 00
-1b
+74
 20
 40
 00
-51
+aa
 20
 40
 00
-23
+7c
 20
 40
-41
-a7
+01
+3a
 20
 75
 80
 00
 20
 40
-40
-8e
-20
-20
-3b
-c5
-6f
-e0
-cb
-e1
+01
+1f
 20
-7a
-00
-00
-6f
-e0
-c9
-13
-d8
-40
-00
 40
+47
+28
 20
 40
-60
-93
-6f
-e0
-c9
-14
-d8
-40
 00
-40
 20
 20
-60
-93
-6f
-f1
-01
+40
+42
+3c
 20
-79
-3f
-fe
-0e
+20
+3b
+c9
+58
+00
+48
+66
 67
-f2
+e1
+48
+9b
+58
 00
-4c
+00
+25
+67
+e1
+48
+9d
 20
 20
-5c
-af
+3b
+d3
 6f
 e4
 4b
 ab
-c2
-97
-c8
-0a
-6f
-e0
-c9
-38
-c0
+c4
+0b
 00
 00
-2e
-20
-40
-3d
-65
-24
-34
-42
-eb
-20
-20
-3d
-59
 6f
-e4
-4b
-ab
-c3
-08
-c8
-03
+e0
+ca
+ae
 20
-40
+7a
 00
-3e
-20
-54
 00
-4e
 6f
-e4
-4b
-ab
-c2
-98
-48
-0c
-c3
-18
+e0
 c8
-0c
+a7
 20
-40
+7a
 00
-47
+00
+6f
+e0
+cb
+a1
+1f
+e0
+fe
+01
 1f
 e1
 7e
-07
-68
-48
+03
+67
+e0
+cb
+a1
+24
+7a
+00
+00
+70
+4b
+a2
+00
+6f
+e0
 cb
+a2
+1f
+e0
+fe
+01
+67
+e0
 cb
-98
-46
+a2
+1f
+e6
 7c
-00
-20
-22
-c8
-27
-20
-20
+08
+24
+21
 48
-0c
+a5
+20
+40
+25
+9a
 20
 40
+26
+5b
+24
+2c
 00
-3e
+45
+24
+37
+80
+45
 20
-34
+40
 00
-4c
+3c
 20
 20
 48
-06
-df
+a5
+6f
+e0
+c8
+a7
 20
+3a
+48
+8c
+70
+4b
+a3
 00
-02
-d8
-c0
-49
-93
-20
-40
-7e
-54
-58
+6f
+e0
+cb
+a4
+c4
 00
-ff
-ff
-e8
-41
 00
-06
-98
-46
-7c
 00
-24
-42
+79
+3f
 fe
-56
-c2
-00
-00
-42
-20
-60
-00
 00
+67
+e0
+cb
+a4
 20
 40
-41
-21
+45
+44
+20
+20
+01
+3c
 20
 40
-41
-15
-d8
-40
-00
-00
-60
-49
+22
 cb
-8e
 20
-60
+20
 00
+31
+20
+40
+26
+31
+24
+34
 00
+4b
 20
 40
 00
-4e
+5c
 20
 20
-48
-12
+26
+25
 6f
 e0
 c8
-7c
-67
-e0
-c1
-e8
+a7
 20
-60
-00
+5a
 00
+4e
 20
-75
-80
-00
 20
-40
 26
-07
+a3
+70
+48
+36
+01
+70
+48
+a7
+01
 20
 40
-22
-ff
+26
+42
+67
+e0
+c7
+c6
+58
+00
+00
+00
+67
+e3
+c7
+c7
+6f
+e2
+48
+a9
+67
+e2
+47
+ce
+70
+48
+35
+0c
+6f
+e0
+c8
+36
+79
 20
-40
-3f
-1e
+7e
+03
+67
+e0
+c8
+36
 20
 40
-3d
-13
+22
+91
+20
 20
-40
 00
-5b
-68
+49
+70
 48
-c9
+a6
+00
+69
+61
+01
+5f
+34
+73
+02
+00
 20
+40
+26
+5b
+6f
+e0
+c8
+2c
+c0
+00
+a6
+51
+24
+2c
+00
+6b
+24
+37
+80
+6b
 20
 40
-60
-50
+26
+72
 20
 40
 00
-6b
+67
 20
 20
-3b
-f5
+26
+51
 6f
 e0
-c9
+cb
+e1
+24
+5a
+01
+3c
+70
+4b
+e1
+00
+20
+60
+00
+00
+6f
+e0
+c8
+a7
 24
+7a
+00
+00
+6f
+e1
+48
+a3
+1f
+e0
+fe
+01
 67
+e1
+48
+a3
+6f
 e0
-c9
-28
+c8
+a4
+c2
+82
+26
+79
+20
+40
+26
+7e
+20
+20
+00
+5d
 6f
 e0
-c9
-17
-c1
-7f
-80
+cb
+e1
+20
+7a
+00
 00
 6f
 e0
 c9
-17
+13
 d8
 40
 00
-3e
+40
 20
 40
 60
 93
 6f
 e0
-cb
-e2
+c9
+14
 d8
 40
 00
-3e
-20
 40
-60
-93
-68
-48
-c9
 20
 20
-40
-3f
-56
-68
-48
-c9
+60
+93
+6f
+f1
+01
+20
+79
+3f
+fe
+0e
+67
+f2
+00
+4c
 20
 20
+5c
+af
+6f
+e4
+4b
+ab
+c2
+97
+c8
+0a
+6f
+e0
+c9
+38
+c0
+00
+00
+87
+20
 40
-60
-59
+3d
+65
 24
-40
-c2
-aa
+34
+42
+eb
 20
 20
-3f
+3d
+59
+6f
+e4
+4b
+ab
+c3
+08
+c8
+03
+20
+40
+00
+97
+20
 54
-68
+00
+a7
+6f
+e4
+4b
+ab
+c2
+98
 48
-c9
-17
+0c
+c3
+18
+c8
+0c
 20
 40
-60
-7f
+00
+a0
+1f
+e1
+7e
+07
 68
 48
 cb
-e2
-20
-20
-60
-7f
-70
-00
-80
+cb
+98
+46
+7c
 00
 20
+22
+c8
+27
 20
-13
-b7
-70
-8a
-8b
-e6
 20
-40
-12
-6a
+48
+0c
 20
 40
-12
-71
+00
+97
 20
-40
-12
-77
-70
-8a
-6d
-09
-70
-8a
-03
-05
-70
-8a
-7a
-94
-70
-8a
-0e
-0b
-70
-8a
-0f
-05
-70
-8a
-83
-90
+34
+00
+a5
 20
 20
-12
-5d
+48
+06
+df
+20
+00
+02
+d8
+c0
+49
+93
 20
 40
+7e
+54
+58
+00
+ff
+ff
+e8
+41
+00
+06
+98
+46
+7c
+00
+24
 42
-e9
+fe
+56
+c2
+00
+00
+9b
 20
-40
-7f
-dc
+60
+00
+00
 20
 40
+41
+21
+20
 40
+41
 15
-6f
-e0
-c9
-10
-c0
-7f
-80
-85
-68
-48
-c9
-10
-20
+d8
 40
+00
+00
 60
-69
-68
-48
-c9
-10
+49
+cb
+8e
 20
-40
 60
-42
-68
-48
-cb
-e2
+00
+00
 20
 40
-3f
-56
+00
+a7
+20
+20
+48
+12
 6f
 e0
-c9
+c8
+7c
+67
+e0
+c1
+e8
 20
-d8
-40
+60
+00
 00
-3f
 20
-40
-60
-93
+75
+80
+00
 20
 40
-00
-e7
+26
+07
+20
+40
+22
+ff
+20
+40
+3f
+1e
+20
+40
+3d
+13
+20
+40
+00
+b4
+68
+48
+c9
+20
+20
+40
+60
+50
+20
+40
+00
+c4
+20
+20
+3b
+f5
+6f
+e0
+c9
+24
+67
+e0
+c9
+28
+6f
+e0
+c9
+17
+c1
+7f
+80
+00
+6f
+e0
+c9
+17
+d8
+40
+00
+3e
+20
+40
+60
+93
+6f
+e0
+cb
+e2
+d8
+40
+00
+3e
+20
+40
+60
+93
+68
+48
+c9
+20
+20
+40
+3f
+56
+68
+48
+c9
+20
+20
+40
+60
+59
+24
+40
+c2
+aa
+20
+20
+3f
+54
+68
+48
+c9
+17
+20
+40
+60
+7f
+68
+48
+cb
+e2
+20
+20
+60
+7f
+70
+00
+80
+00
+20
+20
+13
+b7
+70
+8a
+8b
+e6
+20
+40
+12
+6a
+20
+40
+12
+71
+20
+40
+12
+77
+70
+8a
+6d
+09
+70
+8a
+03
+05
+70
+8a
+7a
+94
+70
+8a
+0e
+0b
+70
+8a
+0f
+05
+70
+8a
+83
+90
+20
+20
+12
+5d
+20
+40
+42
+e9
+20
+40
+7f
+dc
+20
+40
+40
+15
+6f
+e0
+c9
+10
+c0
+7f
+80
+de
+68
+48
+c9
+10
+20
+40
+60
+69
+68
+48
+c9
+10
+20
+40
+60
+42
+68
+48
+cb
+e2
+20
+40
+3f
+56
+6f
+e0
+c9
+20
+d8
+40
+00
+3f
+20
+40
+60
+93
+20
+40
+01
+6d
 20
 20
 3e
@@ -659,7 +1015,7 @@
 c0
 1e
 00
-a5
+fe
 20
 20
 43
@@ -702,8 +1058,8 @@
 40
 20
 40
-40
-8e
+01
+1f
 20
 40
 3f
@@ -730,16 +1086,16 @@
 d0
 24
 34
-00
-b9
+01
+12
 20
 40
 47
 1a
 20
 40
-00
-bc
+01
+15
 20
 20
 45
@@ -794,8 +1150,16 @@
 8f
 20
 40
-00
-c7
+01
+4d
+6f
+e0
+c9
+27
+c0
+06
+01
+22
 20
 20
 40
@@ -803,16 +1167,188 @@
 6f
 e0
 c9
-23
-c1
-7f
-80
+92
+c0
 00
-6f
-e1
-4a
-c2
-24
+01
+27
+c0
+00
+81
+2a
+c0
+01
+01
+2d
+c0
+01
+81
+30
+6f
+e0
+cb
+e7
+1f
+e2
+22
+00
+20
+20
+01
+32
+6f
+e0
+cb
+e8
+1f
+e2
+22
+00
+20
+20
+01
+32
+6f
+e0
+cb
+e9
+1f
+e2
+22
+00
+20
+20
+01
+32
+6f
+e0
+cb
+ea
+1f
+e2
+22
+00
+58
+00
+c3
+09
+20
+40
+5b
+0c
+1a
+22
+7e
+00
+1f
+ed
+7e
+00
+1f
+e0
+fe
+23
+20
+40
+5b
+0c
+58
+00
+00
+09
+20
+20
+5b
+0c
+20
+40
+3f
+65
+20
+75
+80
+00
+20
+40
+42
+36
+20
+40
+41
+b5
+c0
+18
+01
+44
+c0
+18
+c2
+17
+c0
+2c
+42
+20
+20
+40
+41
+b2
+20
+00
+1a
+f4
+20
+20
+01
+3d
+6f
+e0
+c9
+c2
+c0
+68
+81
+47
+20
+20
+41
+bd
+58
+00
+00
+49
+20
+40
+5b
+0d
+c0
+50
+81
+4b
+20
+20
+41
+da
+70
+49
+27
+0c
+20
+60
+00
+00
+6f
+e0
+c9
+23
+c1
+7f
+80
+00
+6f
+e1
+4a
+c2
+24
 7a
 00
 00
@@ -846,8 +1382,8 @@
 c1
 20
 3a
-00
-ee
+01
+74
 67
 e0
 cb
@@ -882,12 +1418,12 @@
 be
 20
 40
-00
-eb
+01
+71
 20
 40
-00
-de
+01
+64
 20
 20
 44
@@ -922,8 +1458,8 @@
 e5
 da
 40
-00
-e7
+01
+6d
 20
 20
 31
@@ -950,8 +1486,8 @@
 a8
 da
 40
-00
-ee
+01
+74
 20
 20
 31
@@ -1006,12 +1542,12 @@
 03
 20
 41
-00
-fd
+01
+83
 24
 41
 01
-01
+87
 20
 20
 48
@@ -1048,8 +1584,8 @@
 20
 5c
 b6
-8b
-cf
+97
+63
 aa
 55
 40
@@ -1082,7 +1618,7 @@
 00
 08
 46
-41
+49
 02
 00
 00
@@ -1117,7 +1653,7 @@
 00
 00
 00
-00
+04
 00
 00
 aa
@@ -1821,6 +2357,17 @@
 04
 aa
 55
+05
+00
+e7
+4b
+8a
+8b
+83
+84
+88
+aa
+55
 a2
 00
 df
@@ -1960,812 +2507,265 @@
 49
 39
 4a
-b0
-4b
-a0
-4c
-90
-4d
-70
-09
-00
-ff
-ff
-09
-5a
-06
-02
-09
-69
-0d
-48
-0e
-9f
-0f
-ba
-09
-00
-ff
-ff
-aa
-55
-08
-00
-a3
-4a
-09
-5a
-0b
-f3
-09
-00
-ff
-ff
-aa
-55
-02
-00
-8d
-44
-2d
-49
-aa
-55
-01
-00
-8c
-44
-01
-aa
-55
-01
-00
-65
-48
-01
-aa
-55
-01
-00
-64
-48
-01
-aa
-55
-01
-00
-36
-48
-01
-aa
-55
-01
-00
-a8
-48
-06
-aa
-55
-02
-00
-38
-48
-c0
-12
-aa
-55
-03
-00
-54
-48
-19
-19
-1c
-aa
-55
-10
-00
-40
-48
-00
-13
-2c
-42
-06
-15
-36
-48
-0f
-1a
-3a
-4c
-11
-23
-31
-4d
-aa
-55
-01
-00
-5b
-48
-00
-aa
-55
-05
-00
-77
-48
-20
-15
-10
-05
-4e
-aa
-55
-05
-00
-8c
-48
-01
-0f
-0f
-0f
-0f
-aa
-55
-06
-00
-ad
-48
-0c
-f8
-00
-00
-77
-01
-aa
-55
-03
-00
-5c
-48
-00
-48
-60
-aa
-55
-01
-00
-7d
-48
-07
-aa
-55
-02
-00
-99
-48
-b5
-4a
-aa
-55
-01
-00
-ca
-48
-32
-aa
-55
-02
-00
-c2
-48
-14
-00
-aa
-55
-02
-00
-c0
-48
-50
-00
-aa
-55
-03
-00
-b8
-48
-00
-a6
-0e
-aa
-55
-03
-00
-b8
-49
-00
-50
-00
-aa
-55
-02
-00
-79
-44
-80
-1f
-aa
-55
-01
-00
-83
-44
-80
-aa
-55
-01
-00
-e8
-41
-01
-13
-a8
-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
-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
-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
-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
-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
+b0
+4b
+a0
+4c
+90
+4d
+70
+09
+00
 ff
 ff
+09
+5a
+06
+02
+09
+69
+0d
+48
+0e
+9f
+0f
+ba
+09
+00
 ff
 ff
+aa
+55
+08
+00
+a3
+4a
+09
+5a
+0b
+f3
+09
+00
 ff
 ff
+aa
+55
+02
+00
+8d
+44
+2d
+49
+aa
+55
+01
+00
+8c
+44
+01
+aa
+55
+01
+00
+65
+48
+01
+aa
+55
+01
+00
+64
+48
+01
+aa
+55
+01
+00
+36
+48
+01
+aa
+55
+01
+00
+a8
+48
+06
+aa
+55
+02
+00
+38
+48
+c0
+12
+aa
+55
+03
+00
+54
+48
+19
+19
+1c
+aa
+55
+10
+00
+40
+48
+00
+13
+2c
+42
+06
+15
+36
+48
+0f
+1a
+3a
+4c
+11
+23
+31
+4d
+aa
+55
+01
+00
+5b
+48
+00
+aa
+55
+05
+00
+77
+48
+20
+15
+10
+05
+4e
+aa
+55
+05
+00
+8c
+48
+01
+0f
+0f
+0f
+0f
+aa
+55
+06
+00
+ad
+48
+0c
+f8
+00
+00
+77
+01
+aa
+55
+03
+00
+5c
+48
+00
+48
+60
+aa
+55
+01
+00
+7d
+48
+07
+aa
+55
+02
+00
+99
+48
+b5
+4a
+aa
+55
+01
+00
+ca
+48
+32
+aa
+55
+02
+00
+c2
+48
+14
+00
+aa
+55
+02
+00
+c0
+48
+50
+00
+aa
+55
+03
+00
+b8
+48
+00
+a6
+0e
+aa
+55
+03
+00
+b8
+49
+00
+50
+00
+aa
+55
+02
+00
+79
+44
+80
+1f
+aa
+55
+01
+00
+83
+44
+80
+aa
+55
+01
+00
+e8
+41
+01
+55
+aa
+aa
+55
+2d
+5c
+b3
+04
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-b9
-86
+8e
+af
Index: output/memmap.format
===================================================================
--- /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/output/memmap.format	(revision 1630)
+++ /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/output/memmap.format	(working copy)
@@ -2207,6 +2207,12 @@
 0x4be3 mem_mouse_logo_led_gpio
 0x4be4 mem_mouse_logo_led_on_check_count
 0x4be5 mem_mouse_logo_led_on_timer
+0x4be7 mem_sensor_s201_dpi
+0x4be7 mem_sensor_s201_dpi_0
+0x4be8 mem_sensor_s201_dpi_1
+0x4be9 mem_sensor_s201_dpi_2
+0x4bea mem_sensor_s201_dpi_3
+0x4beb mem_sensor_s201_dpi_4
 0x48d0 mem_remote_car_hard_soft_switch
 0x48d1 mem_remote_car_queue_each_size
 0x48d2 mem_remote_car_queue_length
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/output/program.lis	(revision 1630)
+++ /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/output/program.lis	(working copy)
@@ -1,344 +1,530 @@
               include "bt_format "
               org 0x0000
-0000 c284000d bbit1 8 ,pf_patch_ext 
-0001 c000000f beq patch00_0 ,p_soft_reset 
-0002 c0458071 beq patch11_3 ,p_initialize_radio_cont 
-0003 c04f806f beq patch13_7 ,p_init_param 
-0004 c0570013 beq patch15_6 ,p_app_init 
-0005 c0618027 beq patch18_3 ,p_mouse_start_work 
-0006 c064807c beq patch19_1 ,p_mouse_setgpio_hibernate 
-0007 c065008c beq patch19_2 ,p_mouse_lpm_before_common 
-0008 c06700aa beq patch19_6 ,p_mouse_motion 
-0009 c06800c4 beq patch1a_0 ,p_mouse_seting_dpi 
-000a c06b00a2 beq patch1a_6 ,p_mouse_priority_bb_event 
-000b c06c80d5 beq patch1b_1 ,p_mouse_bb_event_timer 
-000c 2020137c branch loop 
+0000 c284000e bbit1 8 ,pf_patch_ext 
+0001 c0000011 beq patch00_0 ,p_soft_reset 
+0002 c04580ca beq patch11_3 ,p_initialize_radio_cont 
+0003 c04f80c8 beq patch13_7 ,p_init_param 
+0004 c0570015 beq patch15_6 ,p_app_init 
+0005 c0618080 beq patch18_3 ,p_mouse_start_work 
+0006 c06480d5 beq patch19_1 ,p_mouse_setgpio_hibernate 
+0007 c06500e5 beq patch19_2 ,p_mouse_lpm_before_common 
+0008 c0670103 beq patch19_6 ,p_mouse_motion 
+0009 c068011d beq patch1a_0 ,p_mouse_seting_dpi 
+000a c069813a beq patch1a_3 ,p_mouse_init_sunt 
+000b c06b00fb beq patch1a_6 ,p_mouse_priority_bb_event 
+000c c06c815b beq patch1b_1 ,p_mouse_bb_event_timer 
+000d 2020137c branch loop 
 
 pf_patch_ext:
-000d c0108103 beq patch24_1 ,p_spid_init 
-000e 2020137c branch loop 
+000e c0108189 beq patch24_1 ,p_spid_init 
+000f c0750047 beq patch3d_2 ,p_g24_transmit_no_interrupt 
+0010 2020137c branch loop 
 
 p_soft_reset:
-000f 20800000 clear_stack 
-0010 204030f3 call app_param_init 
-0011 20403bfd call mouse_xtal_init 
-0012 20200804 branch soft_reset + 3 
+0011 20800000 clear_stack 
+0012 204030f3 call app_param_init 
+0013 20403bfd call mouse_xtal_init 
+0014 20200804 branch soft_reset + 3 
 
 p_app_init:
 
 p_mouse_init:
-0013 20406df3 call enable_authrom 
-0014 2040001b call p_mouse_wheel_set_wakeup 
-0015 20400051 call p_mouse_setting_config 
-0016 20400023 call p_lpm_write_ice_disable 
-0017 204041a7 call mouse_init_sunt 
-0018 20758000 rtn wake 
-0019 2040408e call mouse_dpi_config 
-001a 20203bc5 branch mouse_init + 4 
+0015 20406df3 call enable_authrom 
+0016 20400074 call p_mouse_wheel_set_wakeup 
+0017 204000aa call p_mouse_setting_config 
+0018 2040007c call p_lpm_write_ice_disable 
+0019 2040013a call p_mouse_init_sunt 
+001a 20758000 rtn wake 
+001b 2040011f call p_mouse_seting_sensor_type 
+001c 20404728 call mouse_drawing_optima_init 
+001d 20400020 call p_mouse_cb_fuction 
+001e 2040423c call mouse_sensor_powerdown 
+001f 20203bc9 branch mouse_init + 8 
+
+p_mouse_cb_fuction:
+0020 58004866 setarg mouse_24g_package_data 
+0021 67e1489b store 2 ,mem_cb_24g_transmit_data 
+0022 58000025 setarg p_mouse_24g_search_dongle 
+0023 67e1489d store 2 ,mem_cb_24g_search_receiver 
+0024 20203bd3 branch mouse_cb_fuction + 4 
+
+p_mouse_24g_search_dongle:
+0025 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0026 c40b0000 rtnbit0 mouse_enable_24g_search_dongle 
+0027 6fe0caae fetch 1 ,mem_mouse_long_mult_flag 
+0028 207a0000 rtn blank 
+0029 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+002a 207a0000 rtn blank 
+002b 6fe0cba1 fetch 1 ,mem_mouse_search_dongle_interval 
+002c 1fe0fe01 increase 1 ,pdata 
+002d 1fe17e03 and_into 3 ,pdata 
+002e 67e0cba1 store 1 ,mem_mouse_search_dongle_interval 
+002f 247a0000 nrtn blank 
+0030 704ba200 jam 0 ,mem_mouse_search_dongle_ch 
+
+p_mouse_24g_search_dongle_loop:
+0031 6fe0cba2 fetch 1 ,mem_mouse_search_dongle_ch 
+0032 1fe0fe01 increase 1 ,pdata 
+0033 67e0cba2 store 1 ,mem_mouse_search_dongle_ch 
+0034 1fe67c08 sub pdata ,g24_ch_number ,null 
+0035 242148a5 nbranch mouse_24g_search_dongle_loop_end ,positive 
+0036 2040259a call g24_reconn_data_prep 
+0037 2040265b call g24_transmit_receive_ack 
+0038 242c0045 nbranch p_mouse_24g_search_dongle_loop_retry ,sync 
+0039 24378045 nbranch p_mouse_24g_search_dongle_loop_retry ,user3 
+003a 2040003c call p_mouse_24g_search_dongle_success 
+003b 202048a5 branch mouse_24g_search_dongle_loop_end 
+
+p_mouse_24g_search_dongle_success:
+003c 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+003d 203a488c branch mouse_24g_search_dongle_init ,blank 
+003e 704ba300 jam 0 ,mem_mouse_search_dongle_count 
+003f 6fe0cba4 fetch 1 ,mem_mouse_search_dongle_action 
+0040 c4000000 rtnbit0 g24_disconn_state 
+0041 793ffe00 set0 g24_disconn_state ,pdata 
+0042 67e0cba4 store 1 ,mem_mouse_search_dongle_action 
+0043 20404544 call mouse_no_data_timer_init 
+0044 2020013c branch p_mouse_init_sensor_wakeup 
+
+p_mouse_24g_search_dongle_loop_retry:
+0045 204022cb call g24_ch 
+0046 20200031 branch p_mouse_24g_search_dongle_loop 
+
+p_g24_transmit_no_interrupt:
+0047 20402631 call g24_txdata_prep 
+0048 2434004b nbranch p_g24_nodata_transmit ,user 
+
+p_g24_transmit_start:
+0049 2040005c call p_g24_transmit_process 
+004a 20202625 branch g24_transmit_start + 1 
+
+p_g24_nodata_transmit:
+004b 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+004c 205a004e call p_g24_send_abort_packet ,blank 
+004d 202026a3 branch g24_nodata_transmit + 2 
+
+p_g24_send_abort_packet:
+004e 70483601 jam type_ms ,mem_24g_data_type 
+004f 7048a701 jam 1 ,mem_24g_abort_pac 
+0050 20402642 call g24_transmit_rf_ctrl_clear 
+0051 67e0c7c6 store 1 ,mem_24g_txbuf 
+0052 58000000 setarg 0 
+0053 67e3c7c7 store 7 ,mem_24g_txbuf + 1 
+0054 6fe248a9 fetch 4 ,mem_24g_device_addr 
+0055 67e247ce store 4 ,mem_24g_txbuf + 8 
+0056 7048350c jam 12 ,mem_24g_datalen 
+0057 6fe0c836 fetch 1 ,mem_24g_data_type 
+0058 79207e03 set1 bit_abort ,pdata 
+0059 67e0c836 store 1 ,mem_24g_data_type 
+005a 20402291 call g24_transmit_prep 
+005b 20200049 branch p_g24_transmit_start 
+
+p_g24_transmit_process:
+005c 7048a600 jam 0 ,mem_24g_retry 
+
+p_g24_transmit_loop:
+005d 6961015f fetchr timeup ,2 ,mem_param_rx_setup 
+005e 34730200 until clkn_rt ,meet 
+005f 2040265b call g24_transmit_receive_ack 
+0060 6fe0c82c fetch 1 ,mem_24g_no_ack 
+0061 c000a651 beq no_ack_24g ,g24_transmit_no_ack 
+0062 242c006b nbranch p_g24_retransmit ,sync 
+0063 2437806b nbranch p_g24_retransmit ,user3 
+0064 20402672 call g24_ackpayload_parse 
+0065 20400067 call p_mouse_wakeup_24g 
+0066 20202651 branch g24_transmit_no_ack 
+
+p_mouse_wakeup_24g:
+0067 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0068 245a013c ncall p_mouse_init_sensor_wakeup ,blank 
+0069 704be100 jam 0 ,mem_sensor_shutdown_flag 
+006a 20600000 rtn 
+
+p_g24_retransmit:
+006b 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+006c 247a0000 nrtn blank 
+006d 6fe148a3 fetch 2 ,mem_24g_txfail_cnt 
+006e 1fe0fe01 increase 1 ,pdata 
+006f 67e148a3 store 2 ,mem_24g_txfail_cnt 
+0070 6fe0c8a4 fetch 1 ,mem_24g_txfail_cnt + 1 
+0071 c2822679 bbit1 4 ,g24_tx_attempt_fail 
+0072 2040267e call g24_transmit_hop_process 
+0073 2020005d branch p_g24_transmit_loop 
 
 p_mouse_wheel_set_wakeup:
-001b 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
-001c 207a0000 rtn blank 
-001d 6fe0c913 fetch 1 ,mem_whee_a_data_gpio 
-001e d8400040 arg gpcfg_pullup ,temp 
-001f 20406093 call gpio_config_function_int 
-0020 6fe0c914 fetch 1 ,mem_whee_b_data_gpio 
-0021 d8400040 arg gpcfg_pullup ,temp 
-0022 20206093 branch gpio_config_function_int 
+0074 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0075 207a0000 rtn blank 
+0076 6fe0c913 fetch 1 ,mem_whee_a_data_gpio 
+0077 d8400040 arg gpcfg_pullup ,temp 
+0078 20406093 call gpio_config_function_int 
+0079 6fe0c914 fetch 1 ,mem_whee_b_data_gpio 
+007a d8400040 arg gpcfg_pullup ,temp 
+007b 20206093 branch gpio_config_function_int 
 
 p_lpm_write_ice_disable:
-0023 6ff10120 fetch 2 ,core_ucode_flag 
-0024 793ffe0e set0 lpmreg_ice_mode_bit ,pdata 
-0025 67f2004c store 4 ,core_lpm_reg 
-0026 20205caf branch lpm_write2_ctrl_option 
+007c 6ff10120 fetch 2 ,core_ucode_flag 
+007d 793ffe0e set0 lpmreg_ice_mode_bit ,pdata 
+007e 67f2004c store 4 ,core_lpm_reg 
+007f 20205caf branch lpm_write2_ctrl_option 
 
 p_mouse_start_work:
-0027 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0028 c297c80a bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_start_auto_pair_mode 
-0029 6fe0c938 fetch 1 ,mem_device_flag 
-002a c000002e beq mode_24g_device ,p_mouse_24g_start_mode 
-002b 20403d65 call mouse_wakeup_from_power_check 
-002c 243442eb nbranch mouse_buletooth_fast_conn_init ,user 
-002d 20203d59 branch mouse_start_reconnect_device 
+0080 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0081 c297c80a bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_start_auto_pair_mode 
+0082 6fe0c938 fetch 1 ,mem_device_flag 
+0083 c0000087 beq mode_24g_device ,p_mouse_24g_start_mode 
+0084 20403d65 call mouse_wakeup_from_power_check 
+0085 243442eb nbranch mouse_buletooth_fast_conn_init ,user 
+0086 20203d59 branch mouse_start_reconnect_device 
 
 p_mouse_24g_start_mode:
-002e 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-002f c308c803 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
-0030 2040003e call p_g24_factory_check 
-0031 2054004e call p_mouse_24g_pair_txpower_init ,user 
-0032 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-0033 c298480c bbit1 mouse_enable_auto_24g_paring ,mouse_24g_reconn_general_dongle 
-0034 c318c80c bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
-0035 20400047 call p_mouse_key_check_once 
-0036 1fe17e07 and pdata ,0x07 ,pdata 
-0037 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
-0038 98467c00 isub temp ,null 
-0039 2022c827 branch mouse_24g_start_pair_mode ,zero 
-003a 2020480c branch mouse_24g_reconn_general_dongle 
+0087 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0088 c308c803 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
+0089 20400097 call p_g24_factory_check 
+008a 205400a7 call p_mouse_24g_pair_txpower_init ,user 
+008b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+008c c298480c bbit1 mouse_enable_auto_24g_paring ,mouse_24g_reconn_general_dongle 
+008d c318c80c bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
+008e 204000a0 call p_mouse_key_check_once 
+008f 1fe17e07 and pdata ,0x07 ,pdata 
+0090 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
+0091 98467c00 isub temp ,null 
+0092 2022c827 branch mouse_24g_start_pair_mode ,zero 
+0093 2020480c branch mouse_24g_reconn_general_dongle 
 
 p_mouse_24g_reconn_dongle_start:
-003b 2040003e call p_g24_factory_check 
-003c 2034004c branch p_mouse_24g_start_auto_pair_next ,user 
-003d 20204806 branch mouse_24g_reconn_dongle_start 
+0094 20400097 call p_g24_factory_check 
+0095 203400a5 branch p_mouse_24g_start_auto_pair_next ,user 
+0096 20204806 branch mouse_24g_reconn_dongle_start 
 
 p_g24_factory_check:
-003e df200002 arg 2 ,loopcnt 
-003f d8c04993 arg mem_mouse_24g_addr ,contr 
+0097 df200002 arg 2 ,loopcnt 
+0098 d8c04993 arg mem_mouse_24g_addr ,contr 
 
 p_pdata_0xff_check:
-0040 20407e54 call enable_user 
-0041 5800ffff setarg 0xffff 
+0099 20407e54 call enable_user 
+009a 5800ffff setarg 0xffff 
 
 p_pdata_0xff_check_loop:
-0042 e8410006 ifetcht 2 ,contr 
-0043 98467c00 isub temp ,null 
-0044 2442fe56 ncall disable_user ,zero 
-0045 c2000042 loop p_pdata_0xff_check_loop 
-0046 20600000 rtn 
+009b e8410006 ifetcht 2 ,contr 
+009c 98467c00 isub temp ,null 
+009d 2442fe56 ncall disable_user ,zero 
+009e c200009b loop p_pdata_0xff_check_loop 
+009f 20600000 rtn 
 
 p_mouse_key_check_once:
-0047 20404121 call mouse_check_key_gpio_once 
-0048 20404115 call mouse_check_key_gpio 
-0049 d8400000 arg 0 ,temp 
-004a 6049cb8e storet 3 ,mem_mouse_lkey_press_status 
-004b 20600000 rtn 
+00a0 20404121 call mouse_check_key_gpio_once 
+00a1 20404115 call mouse_check_key_gpio 
+00a2 d8400000 arg 0 ,temp 
+00a3 6049cb8e storet 3 ,mem_mouse_lkey_press_status 
+00a4 20600000 rtn 
 
 p_mouse_24g_start_auto_pair_next:
-004c 2040004e call p_mouse_24g_pair_txpower_init 
-004d 20204812 branch mouse_24g_start_auto_pair_next 
+00a5 204000a7 call p_mouse_24g_pair_txpower_init 
+00a6 20204812 branch mouse_24g_start_auto_pair_next 
 
 p_mouse_24g_pair_txpower_init:
-004e 6fe0c87c fetch 1 ,mem_24g_pair_tx_power 
-004f 67e0c1e8 store 1 ,mem_tx_power 
-0050 20600000 rtn 
+00a7 6fe0c87c fetch 1 ,mem_24g_pair_tx_power 
+00a8 67e0c1e8 store 1 ,mem_tx_power 
+00a9 20600000 rtn 
 
 p_mouse_setting_config:
-0051 20758000 rtn wake 
-0052 20402607 call g24_transmit_init 
-0053 204022ff call g24_chmap_param_init 
-0054 20403f1e call mouse_gpio_init 
-0055 20403d13 call mouse_param_init 
-0056 2040005b call p_mouse_sensor_set_angle 
-0057 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-0058 20406050 call gpio_config_input 
-0059 2040006b call p_ice_gpio_set_float 
-005a 20203bf5 branch mouse_setting_config_next 
+00aa 20758000 rtn wake 
+00ab 20402607 call g24_transmit_init 
+00ac 204022ff call g24_chmap_param_init 
+00ad 20403f1e call mouse_gpio_init 
+00ae 20403d13 call mouse_param_init 
+00af 204000b4 call p_mouse_sensor_set_angle 
+00b0 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+00b1 20406050 call gpio_config_input 
+00b2 204000c4 call p_ice_gpio_set_float 
+00b3 20203bf5 branch mouse_setting_config_next 
 
 p_mouse_sensor_set_angle:
-005b 6fe0c924 fetch 1 ,mem_sensor_angle_default 
-005c 67e0c928 store 1 ,mem_config_sensor_angle 
-005d 6fe0c917 fetch 1 ,mem_select_sensor_angle_gpio 
-005e c17f8000 rtneq gpio_disable 
-005f 6fe0c917 fetch 1 ,mem_select_sensor_angle_gpio 
-0060 d840003e arg gpcfg_output_low ,temp 
-0061 20406093 call gpio_config_function_int 
-0062 6fe0cbe2 fetch 1 ,mem_mouse_reuse_2ice_gpio 
-0063 d840003e arg gpcfg_output_low ,temp 
-0064 20406093 call gpio_config_function_int 
-0065 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-0066 20403f56 call mouse_gpio_config_input_pu 
-0067 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-0068 20406059 call gpio_get_bit 
-0069 2440c2aa ncall mouse_sensor_switch_angle ,true 
-006a 20203f54 branch mouse_gpio_config_input_pd 
+00b4 6fe0c924 fetch 1 ,mem_sensor_angle_default 
+00b5 67e0c928 store 1 ,mem_config_sensor_angle 
+00b6 6fe0c917 fetch 1 ,mem_select_sensor_angle_gpio 
+00b7 c17f8000 rtneq gpio_disable 
+00b8 6fe0c917 fetch 1 ,mem_select_sensor_angle_gpio 
+00b9 d840003e arg gpcfg_output_low ,temp 
+00ba 20406093 call gpio_config_function_int 
+00bb 6fe0cbe2 fetch 1 ,mem_mouse_reuse_2ice_gpio 
+00bc d840003e arg gpcfg_output_low ,temp 
+00bd 20406093 call gpio_config_function_int 
+00be 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+00bf 20403f56 call mouse_gpio_config_input_pu 
+00c0 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+00c1 20406059 call gpio_get_bit 
+00c2 2440c2aa ncall mouse_sensor_switch_angle ,true 
+00c3 20203f54 branch mouse_gpio_config_input_pd 
 
 p_ice_gpio_set_float:
-006b 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
-006c 2040607f call gpio_set_high_impedance 
-006d 6848cbe2 fetcht 1 ,mem_mouse_reuse_2ice_gpio 
-006e 2020607f branch gpio_set_high_impedance 
+00c4 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+00c5 2040607f call gpio_set_high_impedance 
+00c6 6848cbe2 fetcht 1 ,mem_mouse_reuse_2ice_gpio 
+00c7 2020607f branch gpio_set_high_impedance 
 
 p_init_param:
-006f 70008000 jam 0 ,mem_lmo_tid2 
-0070 202013b7 branch init_param_next + 1 
+00c8 70008000 jam 0 ,mem_lmo_tid2 
+00c9 202013b7 branch init_param_next + 1 
 
 p_initialize_radio_cont:
-0071 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
-0072 2040126a call initialize_syn_afc_cfg1 
-0073 20401271 call initialize_rf_ldo_cfg1 
-0074 20401277 call initialize_rc_cal 
-0075 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
-0076 708a0305 jam 5 ,core_clkpll_cfg0 
-0077 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
-0078 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
-0079 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
-007a 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
-007b 2020125d branch initialize_radio_cont + 8 
+00ca 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+00cb 2040126a call initialize_syn_afc_cfg1 
+00cc 20401271 call initialize_rf_ldo_cfg1 
+00cd 20401277 call initialize_rc_cal 
+00ce 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
+00cf 708a0305 jam 5 ,core_clkpll_cfg0 
+00d0 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+00d1 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+00d2 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+00d3 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+00d4 2020125d branch initialize_radio_cont + 8 
 
 p_mouse_setgpio_hibernate:
-007c 204042e9 call mouse_set_sdio_high 
-007d 20407fdc call clear_wake 
-007e 20404015 call mouse_before_hibernate_wheel_gpio_set 
-007f 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
-0080 c07f8085 beq gpio_disable ,p_mouse_setgpio_hibernate_skip_public_gpio 
-0081 6848c910 fetcht 1 ,mem_matrix_public_gpio 
-0082 20406069 call gpio_out_active 
-0083 6848c910 fetcht 1 ,mem_matrix_public_gpio 
-0084 20406042 call gpio_clr_wake 
+00d5 204042e9 call mouse_set_sdio_high 
+00d6 20407fdc call clear_wake 
+00d7 20404015 call mouse_before_hibernate_wheel_gpio_set 
+00d8 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+00d9 c07f80de beq gpio_disable ,p_mouse_setgpio_hibernate_skip_public_gpio 
+00da 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+00db 20406069 call gpio_out_active 
+00dc 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+00dd 20406042 call gpio_clr_wake 
 
 p_mouse_setgpio_hibernate_skip_public_gpio:
-0085 6848cbe2 fetcht 1 ,mem_mouse_reuse_2ice_gpio 
-0086 20403f56 call mouse_gpio_config_input_pu 
-0087 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-0088 d840003f arg gpcfg_output_high ,temp 
-0089 20406093 call gpio_config_function_int 
-008a 204000e7 call p_mouse_logo_led_on_timeout 
-008b 20203e36 branch mouse_setgpio_hibernate + 3 
+00de 6848cbe2 fetcht 1 ,mem_mouse_reuse_2ice_gpio 
+00df 20403f56 call mouse_gpio_config_input_pu 
+00e0 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+00e1 d840003f arg gpcfg_output_high ,temp 
+00e2 20406093 call gpio_config_function_int 
+00e3 2040016d call p_mouse_logo_led_on_timeout 
+00e4 20203e36 branch mouse_setgpio_hibernate + 3 
 
 p_mouse_lpm_before_common:
-008c 20403f88 call mouse_wheel_check 
-008d 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
-008e d840003f arg gpcfg_output_high ,temp 
-008f 20406093 call gpio_config_function_int 
-0090 6fe080a1 fetch 1 ,mem_gpio_wakeup_low + 2 
-0091 793ffe03 set0 3 ,pdata 
-0092 67e080a1 store 1 ,mem_gpio_wakeup_low + 2 
-0093 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
-0094 20406042 call gpio_clr_wake 
-0095 20405b04 call twspi_disable 
-0096 6848c918 fetcht 1 ,mem_lbutton_gpio 
-0097 20406036 call gpio_set_wake 
-0098 6848c919 fetcht 1 ,mem_rbutton_gpio 
-0099 20406036 call gpio_set_wake 
-009a 6848c91a fetcht 1 ,mem_mbutton_gpio 
-009b 20406036 call gpio_set_wake 
-009c 6848c90d fetcht 1 ,mem_bk_button_gpio 
-009d 20406036 call gpio_set_wake 
-009e 6848c90e fetcht 1 ,mem_fw_button_gpio 
-009f 20406036 call gpio_set_wake 
-00a0 6848c90f fetcht 1 ,mem_dpi_button_gpio 
-00a1 20206036 branch gpio_set_wake 
+00e5 20403f88 call mouse_wheel_check 
+00e6 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
+00e7 d840003f arg gpcfg_output_high ,temp 
+00e8 20406093 call gpio_config_function_int 
+00e9 6fe080a1 fetch 1 ,mem_gpio_wakeup_low + 2 
+00ea 793ffe03 set0 3 ,pdata 
+00eb 67e080a1 store 1 ,mem_gpio_wakeup_low + 2 
+00ec 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+00ed 20406042 call gpio_clr_wake 
+00ee 20405b04 call twspi_disable 
+00ef 6848c918 fetcht 1 ,mem_lbutton_gpio 
+00f0 20406036 call gpio_set_wake 
+00f1 6848c919 fetcht 1 ,mem_rbutton_gpio 
+00f2 20406036 call gpio_set_wake 
+00f3 6848c91a fetcht 1 ,mem_mbutton_gpio 
+00f4 20406036 call gpio_set_wake 
+00f5 6848c90d fetcht 1 ,mem_bk_button_gpio 
+00f6 20406036 call gpio_set_wake 
+00f7 6848c90e fetcht 1 ,mem_fw_button_gpio 
+00f8 20406036 call gpio_set_wake 
+00f9 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+00fa 20206036 branch gpio_set_wake 
 
 p_mouse_priority_bb_event:
-00a2 1a627e00 copy regc ,pdata 
-00a3 c01e00a5 beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
-00a4 20204336 branch mouse_priority_bb_event + 2 
+00fb 1a627e00 copy regc ,pdata 
+00fc c01e00fe beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
+00fd 20204336 branch mouse_priority_bb_event + 2 
 
 p_mouse_24g_attempt_success:
-00a5 6fe2483c fetch 4 ,mem_24g_addr 
-00a6 67e24891 store 4 ,mem_24g_receiver_addr 
-00a7 67e24993 store 4 ,mem_mouse_24g_addr 
-00a8 204048c6 call mouse_device_poweron_timer_init 
-00a9 2020484e branch mouse_24g_attempt_success 
+00fe 6fe2483c fetch 4 ,mem_24g_addr 
+00ff 67e24891 store 4 ,mem_24g_receiver_addr 
+0100 67e24993 store 4 ,mem_mouse_24g_addr 
+0101 204048c6 call mouse_device_poweron_timer_init 
+0102 2020484e branch mouse_24g_attempt_success 
 
 p_mouse_motion:
-00aa 78547c00 disable user 
-00ab 58000000 setarg 0 
-00ac 67e348d1 store 6 ,mem_mouse_x 
-00ad 20404240 call mouse_check_sensor_data 
-00ae 2040408e call mouse_dpi_config 
-00af 20403f7e call mouse_zwheel 
-00b0 20403f83 call mouse_t_zwheel 
-00b1 204040dc call mouse_key 
-00b2 6fe0c8d0 fetch 1 ,mem_mouse_key 
-00b3 1fe17e1f and_into 0x1f ,pdata 
-00b4 67e0c8d0 store 1 ,mem_mouse_key 
-00b5 243400b9 nbranch p_mouse_motion_nodata ,user 
-00b6 2040471a call mouse_drawing_optima 
-00b7 204000bc call p_mouse_logo_led_on_check 
-00b8 20204544 branch mouse_no_data_timer_init 
+0103 78547c00 disable user 
+0104 58000000 setarg 0 
+0105 67e348d1 store 6 ,mem_mouse_x 
+0106 20404240 call mouse_check_sensor_data 
+0107 2040011f call p_mouse_seting_sensor_type 
+0108 20403f7e call mouse_zwheel 
+0109 20403f83 call mouse_t_zwheel 
+010a 204040dc call mouse_key 
+010b 6fe0c8d0 fetch 1 ,mem_mouse_key 
+010c 1fe17e1f and_into 0x1f ,pdata 
+010d 67e0c8d0 store 1 ,mem_mouse_key 
+010e 24340112 nbranch p_mouse_motion_nodata ,user 
+010f 2040471a call mouse_drawing_optima 
+0110 20400115 call p_mouse_logo_led_on_check 
+0111 20204544 branch mouse_no_data_timer_init 
 
 p_mouse_motion_nodata:
-00b9 20404728 call mouse_drawing_optima_init 
-00ba 704be400 jam 0 ,mem_mouse_logo_led_on_check_count 
-00bb 20600000 rtn 
+0112 20404728 call mouse_drawing_optima_init 
+0113 704be400 jam 0 ,mem_mouse_logo_led_on_check_count 
+0114 20600000 rtn 
 
 p_mouse_logo_led_on_check:
-00bc 6fe0cbe4 fetch 1 ,mem_mouse_logo_led_on_check_count 
-00bd 1fe0fe01 increase 1 ,pdata 
-00be 67e0cbe4 store 1 ,mem_mouse_logo_led_on_check_count 
-00bf 1fe67c08 sub pdata ,low_voltage_led_count ,null 
-00c0 20610000 rtn positive 
+0115 6fe0cbe4 fetch 1 ,mem_mouse_logo_led_on_check_count 
+0116 1fe0fe01 increase 1 ,pdata 
+0117 67e0cbe4 store 1 ,mem_mouse_logo_led_on_check_count 
+0118 1fe67c08 sub pdata ,low_voltage_led_count ,null 
+0119 20610000 rtn positive 
 
 p_mouse_logo_led_on:
-00c1 58000258 setarg 0x0258 
-00c2 67e14be5 store 2 ,mem_mouse_logo_led_on_timer 
-00c3 20600000 rtn 
+011a 58000258 setarg 0x0258 
+011b 67e14be5 store 2 ,mem_mouse_logo_led_on_timer 
+011c 20600000 rtn 
 
 p_mouse_seting_dpi:
-00c4 2040408f call mouse_setting_dpi_4_level 
-00c5 204000c7 call p_mouse_dpi_led_blink_delay 
-00c6 20204098 branch mouse_seting_sensor_type 
+011d 2040408f call mouse_setting_dpi_4_level 
+011e 2040014d call p_mouse_dpi_led_blink_delay 
+
+p_mouse_seting_sensor_type:
+011f 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0120 c0060122 beq s201x ,p_mouse_seting_s201_dpi 
+0121 20204098 branch mouse_seting_sensor_type 
+
+p_mouse_seting_s201_dpi:
+0122 6fe0c992 fetch 1 ,mem_mouse_dpi 
+0123 c0000127 beq mouse_dpi_level1 ,p_mouse_set_s201_dpi_0 
+0124 c000812a beq mouse_dpi_level2 ,p_mouse_set_s201_dpi_1 
+0125 c001012d beq mouse_dpi_level3 ,p_mouse_set_s201_dpi_2 
+0126 c0018130 beq mouse_dpi_level4 ,p_mouse_set_s201_dpi_3 
+
+p_mouse_set_s201_dpi_0:
+0127 6fe0cbe7 fetch 1 ,mem_sensor_s201_dpi_0 
+0128 1fe22200 copy pdata ,rega 
+0129 20200132 branch p_mouse_dpi_s201_store 
+
+p_mouse_set_s201_dpi_1:
+012a 6fe0cbe8 fetch 1 ,mem_sensor_s201_dpi_1 
+012b 1fe22200 copy pdata ,rega 
+012c 20200132 branch p_mouse_dpi_s201_store 
+
+p_mouse_set_s201_dpi_2:
+012d 6fe0cbe9 fetch 1 ,mem_sensor_s201_dpi_2 
+012e 1fe22200 copy pdata ,rega 
+012f 20200132 branch p_mouse_dpi_s201_store 
+
+p_mouse_set_s201_dpi_3:
+0130 6fe0cbea fetch 1 ,mem_sensor_s201_dpi_3 
+0131 1fe22200 copy pdata ,rega 
+
+p_mouse_dpi_s201_store:
+0132 5800c309 setarg 0xc309 
+0133 20405b0c call twspi_write 
+0134 1a227e00 copy rega ,pdata 
+0135 1fed7e00 lshift8 pdata ,pdata 
+0136 1fe0fe23 add pdata ,0x23 ,pdata 
+0137 20405b0c call twspi_write 
+0138 58000009 setarg 0x0009 
+0139 20205b0c branch twspi_write 
+
+p_mouse_init_sunt:
+013a 20403f65 call mouse_sensor_spi_init 
+013b 20758000 rtn wake 
+
+p_mouse_init_sensor_wakeup:
+013c 20404236 call mouse_sensor_poweron 
+
+p_mouse_init_sensor:
+013d 204041b5 call mouse_read_sensor_id 
+013e c0180144 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+013f c018c217 beq p3065_id1 ,mouse_init_p3065 
+0140 c02c4220 beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+0141 204041b2 call mouse_twspi_reset 
+0142 20001af4 nop 6900 
+0143 2020013d branch p_mouse_init_sensor 
+
+p_mouse_init_p32xx_id2_judge:
+0144 6fe0c9c2 fetch 1 ,mem_sensor_id2 
+0145 c0688147 beq p3205_tj3t_id2 ,p_mouse_3205_3t_init_param 
+0146 202041bd branch mouse_init_p32xx_id2_judge + 1 
+
+p_mouse_3205_3t_init_param:
+0147 58000049 setarg 0x49 
+0148 20405b0d call twspi_read 
+0149 c050814b beq 0xa1 ,p_mouse_s201x_init_param 
+014a 202041da branch mouse_3205_3t_init_param 
+
+p_mouse_s201x_init_param:
+014b 7049270c jam s201x ,mem_config_sensor_type 
+014c 20600000 rtn 
 
 p_mouse_dpi_led_blink_delay:
-00c7 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
-00c8 c17f8000 rtneq gpio_disable 
-00c9 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
-00ca 247a0000 nrtn blank 
-00cb 6fe14883 fetch 2 ,mem_24g_pair_timeout 
-00cc 247a0000 nrtn blank 
-00cd 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
-00ce 247a0000 nrtn blank 
-00cf 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
-00d0 247a0000 nrtn blank 
-00d1 6fe0cbc1 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
-00d2 203a00ee branch p_mouse_dpi_led_blink_init ,blank 
-00d3 67e0cba8 store 1 ,mem_mouse_dpi_led_delay_count 
-00d4 20600000 rtn 
+014d 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+014e c17f8000 rtneq gpio_disable 
+014f 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+0150 247a0000 nrtn blank 
+0151 6fe14883 fetch 2 ,mem_24g_pair_timeout 
+0152 247a0000 nrtn blank 
+0153 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
+0154 247a0000 nrtn blank 
+0155 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
+0156 247a0000 nrtn blank 
+0157 6fe0cbc1 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
+0158 203a0174 branch p_mouse_dpi_led_blink_init ,blank 
+0159 67e0cba8 store 1 ,mem_mouse_dpi_led_delay_count 
+015a 20600000 rtn 
 
 p_mouse_bb_event_timer:
-00d5 20403e9b call mouse_adc_read 
-00d6 20404956 call mouse_low_voltage_led_timer 
-00d7 2040232b call g24_pair_timeout_timer 
-00d8 20402556 call g24_reconn_timeout_timer 
-00d9 204047cd call mouse_24g_long_sleep_param_update_timer 
-00da 204048be call mouse_device_poweron_timer 
-00db 204000eb call p_mouse_dpi_led_blink_delay_timer 
-00dc 204000de call p_mouse_logo_led_on_timer 
-00dd 202044bd branch mouse_bb_event_timer + 8 
+015b 20403e9b call mouse_adc_read 
+015c 20404956 call mouse_low_voltage_led_timer 
+015d 2040232b call g24_pair_timeout_timer 
+015e 20402556 call g24_reconn_timeout_timer 
+015f 204047cd call mouse_24g_long_sleep_param_update_timer 
+0160 204048be call mouse_device_poweron_timer 
+0161 20400171 call p_mouse_dpi_led_blink_delay_timer 
+0162 20400164 call p_mouse_logo_led_on_timer 
+0163 202044bd branch mouse_bb_event_timer + 8 
 
 p_mouse_logo_led_on_timer:
-00de 6fe0cbe3 fetch 1 ,mem_mouse_logo_led_gpio 
-00df c17f8000 rtneq gpio_disable 
-00e0 6fe14be5 fetch 2 ,mem_mouse_logo_led_on_timer 
-00e1 207a0000 rtn blank 
-00e2 6848cbe3 fetcht 1 ,mem_mouse_logo_led_gpio 
-00e3 20406069 call gpio_out_active 
-00e4 da604be5 arg mem_mouse_logo_led_on_timer ,regc 
-00e5 da4000e7 arg p_mouse_logo_led_on_timeout ,regb 
-00e6 20203191 branch timer_single_step_2b 
+0164 6fe0cbe3 fetch 1 ,mem_mouse_logo_led_gpio 
+0165 c17f8000 rtneq gpio_disable 
+0166 6fe14be5 fetch 2 ,mem_mouse_logo_led_on_timer 
+0167 207a0000 rtn blank 
+0168 6848cbe3 fetcht 1 ,mem_mouse_logo_led_gpio 
+0169 20406069 call gpio_out_active 
+016a da604be5 arg mem_mouse_logo_led_on_timer ,regc 
+016b da40016d arg p_mouse_logo_led_on_timeout ,regb 
+016c 20203191 branch timer_single_step_2b 
 
 p_mouse_logo_led_on_timeout:
-00e7 58000000 setarg 0 
-00e8 67e14be5 store 2 ,mem_mouse_logo_led_on_timer 
-00e9 6848cbe3 fetcht 1 ,mem_mouse_logo_led_gpio 
-00ea 20206065 branch gpio_out_inactive 
+016d 58000000 setarg 0 
+016e 67e14be5 store 2 ,mem_mouse_logo_led_on_timer 
+016f 6848cbe3 fetcht 1 ,mem_mouse_logo_led_gpio 
+0170 20206065 branch gpio_out_inactive 
 
 p_mouse_dpi_led_blink_delay_timer:
-00eb da604ba8 arg mem_mouse_dpi_led_delay_count ,regc 
-00ec da4000ee arg p_mouse_dpi_led_blink_init ,regb 
-00ed 2020318a branch timer_single_step 
+0171 da604ba8 arg mem_mouse_dpi_led_delay_count ,regc 
+0172 da400174 arg p_mouse_dpi_led_blink_init ,regb 
+0173 2020318a branch timer_single_step 
 
 p_mouse_dpi_led_blink_init:
-00ee 6fe0c927 fetch 1 ,mem_config_sensor_type 
-00ef c001c8f2 beq p3212 ,mouse_dpi_led_blink_init 
-00f0 c005c8f2 beq ka8g2 ,mouse_dpi_led_blink_init 
-00f1 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
-00f2 67e0c92f store 1 ,mem_mouse_struct_led_gpio 
-00f3 6fe14bc2 fetch 2 ,mem_mouse_dpi_led_blink_time 
-00f4 67e14930 store 2 ,mem_mouse_on_time 
-00f5 67e14932 store 2 ,mem_mouse_off_time 
-00f6 da200000 arg 0 ,rega 
-00f7 6848c992 fetcht 1 ,mem_mouse_dpi 
-00f8 18408402 increase 2 ,temp 
-00f9 18467c03 sub temp ,3 ,null 
-00fa 204100fd call p_mouse_dpi_led_blink_init_level_4 ,positive 
-00fb 24410101 ncall p_mouse_dpi_led_blink_count_clean ,positive 
-00fc 202048ff branch mouse_dpi_led_blink_init_end 
+0174 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0175 c001c8f2 beq p3212 ,mouse_dpi_led_blink_init 
+0176 c005c8f2 beq ka8g2 ,mouse_dpi_led_blink_init 
+0177 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+0178 67e0c92f store 1 ,mem_mouse_struct_led_gpio 
+0179 6fe14bc2 fetch 2 ,mem_mouse_dpi_led_blink_time 
+017a 67e14930 store 2 ,mem_mouse_on_time 
+017b 67e14932 store 2 ,mem_mouse_off_time 
+017c da200000 arg 0 ,rega 
+017d 6848c992 fetcht 1 ,mem_mouse_dpi 
+017e 18408402 increase 2 ,temp 
+017f 18467c03 sub temp ,3 ,null 
+0180 20410183 call p_mouse_dpi_led_blink_init_level_4 ,positive 
+0181 24410187 ncall p_mouse_dpi_led_blink_count_clean ,positive 
+0182 202048ff branch mouse_dpi_led_blink_init_end 
 
 p_mouse_dpi_led_blink_init_level_4:
-00fd 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
-00fe c40e0000 rtnbit0 mouse_enable_dpi_level_4 
-00ff 18408401 increase 1 ,temp 
-0100 20600000 rtn 
+0183 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0184 c40e0000 rtnbit0 mouse_enable_dpi_level_4 
+0185 18408401 increase 1 ,temp 
+0186 20600000 rtn 
 
 p_mouse_dpi_led_blink_count_clean:
-0101 184085fd increase -3 ,temp 
-0102 20600000 rtn 
+0187 184085fd increase -3 ,temp 
+0188 20600000 rtn 
 
 p_spid_init:
-0103 70448476 jam 0x76 ,mem_spi_init_clk 
-0104 20205cb6 branch spid_init_common 
+0189 70448476 jam 0x76 ,mem_spi_init_clk 
+018a 20205cb6 branch spid_init_common 
               org 0x800
 
 start:
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/program/patch.prog	(revision 1630)
+++ /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/program/patch.prog	(working copy)
@@ -9,12 +9,14 @@
 	beq patch19_2,p_mouse_lpm_before_common
 	beq patch19_6,p_mouse_motion
 	beq patch1a_0,p_mouse_seting_dpi
+	beq patch1a_3,p_mouse_init_sunt
 	beq patch1a_6,p_mouse_priority_bb_event
 	beq patch1b_1,p_mouse_bb_event_timer
 	branch loop
 
 pf_patch_ext:
 	beq patch24_1,p_spid_init
+	beq patch3d_2,p_g24_transmit_no_interrupt
 	branch loop
 
 p_soft_reset:
@@ -30,11 +32,122 @@
 	call p_mouse_wheel_set_wakeup
 	call p_mouse_setting_config
 	call p_lpm_write_ice_disable
-	call mouse_init_sunt
+	call p_mouse_init_sunt
 	rtn wake
-	call mouse_dpi_config
-	branch mouse_init+4
+	call p_mouse_seting_sensor_type
+	call mouse_drawing_optima_init
+	call p_mouse_cb_fuction
+	call mouse_sensor_powerdown
+	branch mouse_init+8
+
+p_mouse_cb_fuction:
+	setarg mouse_24g_package_data
+	store 2,mem_cb_24g_transmit_data
+	setarg p_mouse_24g_search_dongle
+	store 2,mem_cb_24g_search_receiver
+	branch mouse_cb_fuction+4
+
+p_mouse_24g_search_dongle:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G_SEARCH_DONGLE
+	fetch 1,mem_mouse_long_mult_flag
+	rtn blank
+	fetch 1,mem_24g_abort_pac
+	rtn blank
+	fetch 1,mem_mouse_search_dongle_interval
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_mouse_search_dongle_interval
+	nrtn blank	//400ms
+	jam 0,mem_mouse_search_dongle_ch
+p_mouse_24g_search_dongle_loop:
+	fetch 1,mem_mouse_search_dongle_ch
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_ch
+	sub pdata,G24_CH_NUMBER,null
+	nbranch mouse_24g_search_dongle_loop_end,positive
+	call g24_reconn_data_prep
+	call g24_transmit_receive_ack
+	nbranch p_mouse_24g_search_dongle_loop_retry,sync
+	nbranch p_mouse_24g_search_dongle_loop_retry,user3
+	call p_mouse_24g_search_dongle_success
+	branch mouse_24g_search_dongle_loop_end
+
+p_mouse_24g_search_dongle_success:
+	fetch 1,mem_24g_abort_pac
+	branch mouse_24g_search_dongle_init,blank
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit0 G24_DISCONN_STATE
+	set0 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	call mouse_no_data_timer_init
+	branch p_mouse_init_sensor_wakeup
+
+p_mouse_24g_search_dongle_loop_retry:
+	call g24_ch
+	branch p_mouse_24g_search_dongle_loop
+
+p_g24_transmit_no_interrupt:
+	call g24_txdata_prep
+	nbranch p_g24_nodata_transmit,user
+p_g24_transmit_start:
+	call p_g24_transmit_process
+	branch g24_transmit_start+1
+
+p_g24_nodata_transmit:
+	fetch 1,mem_24g_abort_pac
+	call p_g24_send_abort_packet,blank
+	branch g24_nodata_transmit+2
+	
+p_g24_send_abort_packet:
+	jam TYPE_MS,mem_24g_data_type
+	jam 1,mem_24g_abort_pac
+	call g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	setarg 0
+	store 7,mem_24g_txbuf+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+8
+	jam 12,mem_24g_datalen
+	fetch 1,mem_24g_data_type
+	set1 bit_abort,pdata
+	store 1,mem_24g_data_type
+	call g24_transmit_prep
+	branch p_g24_transmit_start
+
+p_g24_transmit_process:
+	jam 0,mem_24g_retry
+p_g24_transmit_loop:
+	fetchr timeup,2,mem_param_rx_setup
+	until clkn_rt,meet
+	call g24_transmit_receive_ack
+	fetch 1,mem_24g_no_ack	//tx noack
+	beq no_ack_24g,g24_transmit_no_ack
+	nbranch p_g24_retransmit,sync
+	nbranch p_g24_retransmit,user3
+	call g24_ackpayload_parse
+	call p_mouse_wakeup_24g
+	branch g24_transmit_no_ack
+
+p_mouse_wakeup_24g:	
+	fetch 1,mem_sensor_shutdown_flag
+	ncall p_mouse_init_sensor_wakeup,blank
+	jam 0,mem_sensor_shutdown_flag
+	rtn
 
+p_g24_retransmit:
+	fetch 1,mem_24g_abort_pac
+	nrtn blank
+	fetch 2,mem_24g_txfail_cnt
+	increase 1,pdata
+	store 2,mem_24g_txfail_cnt	
+	fetch 1,mem_24g_txfail_cnt+1
+	bbit1 4,g24_tx_attempt_fail
+	call g24_transmit_hop_process
+	branch p_g24_transmit_loop
+
+	
 p_mouse_wheel_set_wakeup:
 	fetch 1,mem_sensor_shutdown_flag
 	rtn blank
@@ -239,7 +352,7 @@
 	setarg 0
 	store 6,mem_mouse_x
 	call mouse_check_sensor_data
-	call mouse_dpi_config
+	call p_mouse_seting_sensor_type
 	call mouse_zwheel
 	call mouse_t_zwheel
 	call mouse_key
@@ -271,8 +384,75 @@
 p_mouse_seting_dpi:
 	call mouse_setting_dpi_4_level
 	call p_mouse_dpi_led_blink_delay
+p_mouse_seting_sensor_type:
+	fetch 1,mem_config_sensor_type
+	beq S201X,p_mouse_seting_S201_dpi
 	branch mouse_seting_sensor_type
 
+p_mouse_seting_S201_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,p_mouse_set_S201_dpi_0	//1200
+	beq MOUSE_DPI_LEVEL2,p_mouse_set_S201_dpi_1	//1600
+	beq MOUSE_DPI_LEVEL3,p_mouse_set_S201_dpi_2	//2400
+	beq MOUSE_DPI_LEVEL4,p_mouse_set_S201_dpi_3	//3200
+p_mouse_set_S201_dpi_0:	//1200
+	fetch 1,mem_sensor_s201_dpi_0
+	copy pdata,rega
+	branch p_mouse_dpi_S201_store
+	
+p_mouse_set_S201_dpi_1:	//1600
+	fetch 1,mem_sensor_s201_dpi_1
+	copy pdata,rega
+	branch p_mouse_dpi_S201_store
+	
+p_mouse_set_S201_dpi_2:	//2400
+	fetch 1,mem_sensor_s201_dpi_2
+	copy pdata,rega
+	branch p_mouse_dpi_s201_store
+
+p_mouse_set_S201_dpi_3:	//3200
+	fetch 1,mem_sensor_s201_dpi_3
+	copy pdata,rega
+	//branch p_mouse_dpi_s201_store
+p_mouse_dpi_s201_store:
+	setarg 0xc309
+	call twspi_write
+	copy rega,pdata
+	lshift8 pdata,pdata
+	add pdata,0x23,pdata
+	call twspi_write
+	setarg 0x0009
+	branch twspi_write
+
+p_mouse_init_sunt:
+	call mouse_sensor_spi_init		
+	rtn wake
+p_mouse_init_sensor_wakeup:	
+	call mouse_sensor_poweron
+p_mouse_init_sensor:
+	call mouse_read_sensor_id
+	beq P32XX_ID1,p_mouse_init_p32xx_id2_judge
+	beq P3065_ID1,mouse_init_p3065
+	beq PKA8G2_ID1,mouse_ka8g2_id2_judge
+	call mouse_twspi_reset
+	nop 6900
+	branch p_mouse_init_sensor
+
+p_mouse_init_p32xx_id2_judge:
+	fetch 1,mem_sensor_id2
+	beq P3205_TJ3T_ID2,p_mouse_3205_3t_init_param
+	branch mouse_init_p32xx_id2_judge+1
+
+p_mouse_3205_3t_init_param:
+	setarg 0x49		// id3
+	call twspi_read
+	beq 0xa1,p_mouse_S201X_init_param
+	branch mouse_3205_3t_init_param
+
+p_mouse_S201X_init_param:
+	jam S201X,mem_config_sensor_type
+	rtn
+	
 p_mouse_dpi_led_blink_delay:
 	fetch 1,mem_dpi_led_gpio
 	rtneq GPIO_DISABLE
Index: sched/mouse.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/sched/mouse.dat	(revision 1630)
+++ /YC1308AC/branch/mouse_project/YJX_Project/1011-T_Project/Only2.4G/MingAo_Only2.4G/sched/mouse.dat	(working copy)
@@ -327,6 +327,13 @@
 10##mem_ka8g2_dpi_2	3000
 04##mem_ka8g2_dpi_3	800
 
+mem_sensor_s201_dpi:
+8a  ##1200
+8b  ##1600
+83  ##2400
+84  ##3200
+88  ##800
+
 mem_sensor_3212_init:
 09 5a
 26 34
