Index: format/app_mouse.format
===================================================================
--- /branch/mouse_project/Standard/format/app_mouse.format	(revision 761)
+++ /branch/mouse_project/Standard/format/app_mouse.format	(working copy)
@@ -219,10 +219,6 @@
 1 mem_mouse_bt_send_first_package_flag
 
 1 mem_mouse_asm_flag
-1 mem_mouse_x_abs
-1 mem_mouse_y_abs
-3 mem_mouse_x_sum
-3 mem_mouse_y_sum
 2 mem_mouse_x_pre
 2 mem_mouse_y_pre
 )
Index: format/utility.format
===================================================================
--- /branch/mouse_project/Standard/format/utility.format	(revision 710)
+++ /branch/mouse_project/Standard/format/utility.format	(working copy)
@@ -146,6 +146,10 @@
 256 mem_rssi_noise_kb_buffer
 32 mem_24g_common_temp
 
+2 mem_data_pre
+2 mem_data_current
+3 mem_data_sum
+
 ifdef DEBUGLOG
 1   mem_debuglog_temp
 1   mem_debuglog_type
Index: output/eeprom.dat
===================================================================
--- /branch/mouse_project/Standard/output/eeprom.dat	(revision 761)
+++ /branch/mouse_project/Standard/output/eeprom.dat	(working copy)
@@ -167,11 +167,11 @@
 68
 08
 cc
-59
+51
 58
 00
 4c
-60
+58
 98
 40
 8a
@@ -195,7 +195,7 @@
 60
 08
 cc
-59
+51
 20
 60
 00
@@ -323,7 +323,7 @@
 68
 00
 cc
-de
+d6
 c0
 00
 80
@@ -347,7 +347,7 @@
 68
 00
 cb
-ae
+a6
 c1
 ff
 80
@@ -359,7 +359,7 @@
 68
 00
 cc
-de
+d6
 c1
 00
 80
@@ -399,7 +399,7 @@
 68
 00
 cc
-df
+d7
 1f
 e0
 fe
@@ -407,7 +407,7 @@
 60
 00
 cc
-df
+d7
 1f
 e6
 7c
@@ -422,24 +422,24 @@
 51
 70
 4c
-de
+d6
 00
 70
 4c
-df
+d7
 00
 70
 4b
-d9
+d1
 00
 68
 00
 cb
-c4
+bc
 60
 00
 cb
-c3
+bb
 20
 60
 00
@@ -447,7 +447,7 @@
 68
 00
 cb
-c5
+bd
 20
 20
 00
@@ -455,7 +455,7 @@
 68
 00
 cb
-d9
+d1
 1f
 e0
 fe
@@ -463,7 +463,7 @@
 60
 00
 cb
-d9
+d1
 c0
 02
 00
@@ -478,11 +478,11 @@
 00
 70
 4c
-de
+d6
 01
 70
 4c
-df
+d7
 00
 20
 60
@@ -491,7 +491,7 @@
 68
 00
 cb
-ca
+c2
 20
 5a
 00
@@ -507,7 +507,7 @@
 68
 01
 cb
-cd
+c5
 20
 40
 7f
@@ -550,11 +550,11 @@
 d2
 70
 4b
-ca
+c2
 01
 70
 4c
-d3
+cb
 00
 20
 40
@@ -563,7 +563,7 @@
 60
 00
 cb
-3a
+32
 58
 00
 00
@@ -571,23 +571,23 @@
 60
 03
 cb
-3b
+33
 68
 02
 4b
-d5
+cd
 60
 02
 4b
-42
+3a
 70
 4b
-9e
+96
 0c
 68
 00
 cb
-9f
+97
 79
 20
 7e
@@ -595,7 +595,7 @@
 60
 00
 cb
-9f
+97
 20
 40
 00
@@ -615,7 +615,7 @@
 60
 02
 4b
-d5
+cd
 24
 7a
 00
@@ -627,23 +627,23 @@
 60
 02
 4b
-d5
+cd
 20
 60
 00
 00
 70
 4c
-d4
+cc
 01
 70
 4c
-d6
+ce
 00
 68
 00
 cb
-9f
+97
 1f
 e1
 7e
@@ -651,7 +651,7 @@
 60
 00
 cb
-9f
+97
 20
 60
 00
@@ -659,7 +659,7 @@
 68
 00
 cb
-9f
+97
 79
 20
 7e
@@ -667,11 +667,11 @@
 60
 00
 cb
-9f
+97
 60
 00
 cb
-5a
+52
 20
 60
 00
@@ -679,7 +679,7 @@
 68
 00
 cb
-9f
+97
 79
 3f
 fe
@@ -687,7 +687,7 @@
 60
 00
 cb
-9f
+97
 20
 60
 00
@@ -699,7 +699,7 @@
 68
 00
 cc
-d5
+cd
 c0
 00
 80
@@ -714,15 +714,15 @@
 00
 70
 4c
-d6
+ce
 02
 70
 4c
-d2
+ca
 00
 70
 4c
-d4
+cc
 00
 20
 20
@@ -730,7 +730,7 @@
 9f
 70
 4c
-d3
+cb
 00
 20
 20
@@ -739,7 +739,7 @@
 68
 01
 4b
-a4
+9c
 1f
 e0
 fe
@@ -747,7 +747,7 @@
 60
 01
 4b
-a4
+9c
 c2
 85
 01
@@ -755,19 +755,19 @@
 68
 00
 cc
-d3
+cb
 c0
 00
 80
 c0
 70
 4c
-d3
+cb
 01
 68
 00
 cc
-d3
+cb
 c0
 80
 80
@@ -775,7 +775,7 @@
 68
 00
 cc
-d1
+c9
 1f
 e0
 fe
@@ -783,7 +783,7 @@
 60
 00
 cc
-d1
+c9
 c0
 02
 00
@@ -794,7 +794,7 @@
 12
 70
 4b
-e3
+db
 02
 20
 20
@@ -806,7 +806,7 @@
 87
 70
 4c
-d1
+c9
 00
 20
 20
@@ -814,15 +814,15 @@
 9f
 70
 4c
-d6
+ce
 02
 70
 4c
-d4
+cc
 01
 70
 4c
-d3
+cb
 00
 20
 20
@@ -831,7 +831,7 @@
 68
 00
 cc
-d5
+cd
 c0
 01
 80
@@ -839,7 +839,7 @@
 68
 00
 cb
-9f
+97
 2f
 ec
 00
@@ -851,7 +851,7 @@
 68
 00
 cc
-d5
+cd
 c0
 00
 80
@@ -867,7 +867,7 @@
 68
 00
 cb
-ae
+a6
 c1
 ff
 80
@@ -891,7 +891,7 @@
 68
 00
 cc
-d4
+cc
 c1
 80
 80
@@ -899,18 +899,18 @@
 68
 00
 cc
-d6
+ce
 c1
 80
 00
 00
 70
 4c
-d5
+cd
 01
 70
 4b
-e3
+db
 04
 20
 20
@@ -919,7 +919,7 @@
 68
 00
 cc
-d6
+ce
 20
 3a
 00
@@ -931,14 +931,14 @@
 60
 00
 cc
-d6
+ce
 70
 4c
-d5
+cd
 02
 70
 4b
-e3
+db
 04
 20
 20
@@ -946,19 +946,19 @@
 12
 70
 4c
-d5
+cd
 03
 68
 00
 cc
-d3
+cb
 24
 3a
 00
 be
 70
 4b
-e3
+db
 02
 20
 20
@@ -967,7 +967,7 @@
 68
 00
 cb
-ae
+a6
 c0
 ff
 81
@@ -982,7 +982,7 @@
 00
 70
 4b
-a3
+9b
 01
 20
 60
@@ -991,7 +991,7 @@
 68
 01
 4c
-cf
+c7
 20
 40
 7f
@@ -1003,7 +1003,7 @@
 68
 03
 cb
-3b
+33
 20
 7a
 00
@@ -1014,7 +1014,7 @@
 e7
 70
 4b
-ca
+c2
 00
 1a
 20
@@ -1023,7 +1023,7 @@
 60
 00
 cb
-9e
+96
 20
 40
 00
@@ -1031,7 +1031,7 @@
 60
 00
 cb
-3a
+32
 e8
 a8
 80
@@ -1067,7 +1067,7 @@
 d8
 a0
 4b
-40
+38
 df
 20
 00
@@ -1102,7 +1102,7 @@
 00
 70
 4b
-a7
+9f
 00
 d9
 60
@@ -1119,7 +1119,7 @@
 68
 00
 cb
-da
+d2
 c1
 00
 80
@@ -1147,7 +1147,7 @@
 68
 00
 cb
-9d
+95
 1f
 e0
 fe
@@ -1155,11 +1155,11 @@
 60
 00
 cb
-9d
+95
 68
 00
 cb
-ae
+a6
 c0
 ff
 81
@@ -1175,18 +1175,18 @@
 60
 01
 4b
-a4
+9c
 60
 00
 cb
-a6
+9e
 60
 00
 cc
-d2
+ca
 70
 4b
-a3
+9b
 00
 20
 60
@@ -1199,7 +1199,7 @@
 d8
 a0
 4b
-3a
+32
 20
 20
 7e
@@ -1223,7 +1223,7 @@
 68
 00
 cb
-da
+d2
 c0
 00
 81
@@ -1235,7 +1235,7 @@
 68
 02
 4b
-c6
+be
 98
 00
 12
@@ -1275,7 +1275,7 @@
 68
 00
 cb
-a6
+9e
 1f
 e0
 fe
@@ -1283,11 +1283,11 @@
 60
 00
 cb
-a6
+9e
 68
 00
 cb
-ae
+a6
 c0
 ff
 81
@@ -1295,7 +1295,7 @@
 68
 08
 cb
-a7
+9f
 18
 40
 84
@@ -1303,11 +1303,11 @@
 60
 08
 cb
-a7
+9f
 68
 00
 cb
-e3
+db
 98
 46
 7e
@@ -1319,7 +1319,7 @@
 68
 00
 cc
-d5
+cd
 c0
 01
 80
@@ -1327,7 +1327,7 @@
 68
 00
 cc
-d2
+ca
 1f
 e0
 fe
@@ -1335,7 +1335,7 @@
 60
 00
 cc
-d2
+ca
 c0
 01
 00
@@ -1346,7 +1346,7 @@
 a3
 70
 4b
-e3
+db
 01
 20
 20
@@ -1355,14 +1355,14 @@
 68
 00
 cb
-a6
+9e
 c1
 ff
 80
 00
 70
 4b
-a6
+9e
 00
 20
 20
@@ -1375,7 +1375,7 @@
 60
 01
 4b
-a4
+9c
 70
 0a
 99
@@ -1391,7 +1391,7 @@
 68
 00
 cb
-9c
+94
 20
 7a
 00
@@ -1403,11 +1403,11 @@
 d8
 c0
 4b
-1a
+12
 d8
 a0
 4b
-7c
+74
 20
 20
 7f
@@ -1422,7 +1422,7 @@
 64
 70
 4b
-ae
+a6
 01
 20
 60
@@ -1434,16 +1434,16 @@
 20
 70
 4b
-9d
+95
 00
 70
 4b
-a8
+a0
 4e
 68
 02
 4b
-aa
+a2
 20
 20
 01
@@ -1451,7 +1451,7 @@
 68
 00
 cb
-a3
+9b
 c0
 00
 ff
@@ -1459,7 +1459,7 @@
 68
 00
 cb
-ae
+a6
 c0
 00
 81
@@ -1478,7 +1478,7 @@
 8c
 70
 4b
-ae
+a6
 11
 70
 11
@@ -1490,7 +1490,7 @@
 78
 70
 4b
-ae
+a6
 12
 70
 11
@@ -1502,7 +1502,7 @@
 78
 70
 4b
-ae
+a6
 13
 70
 11
@@ -1511,7 +1511,7 @@
 68
 00
 cb
-9f
+97
 1f
 e1
 7e
@@ -1523,7 +1523,7 @@
 68
 02
 4b
-d5
+cd
 60
 02
 11
@@ -1555,7 +1555,7 @@
 68
 00
 cb
-ae
+a6
 c1
 7f
 80
@@ -1578,7 +1578,7 @@
 00
 70
 4b
-ae
+a6
 02
 20
 20
@@ -1586,7 +1586,7 @@
 23
 70
 4b
-ae
+a6
 03
 20
 20
@@ -1594,7 +1594,7 @@
 23
 70
 4b
-ae
+a6
 ff
 70
 0a
@@ -1607,7 +1607,7 @@
 68
 02
 4b
-7e
+76
 20
 40
 01
@@ -1627,7 +1627,7 @@
 68
 00
 cb
-ae
+a6
 c1
 ff
 80
@@ -1643,7 +1643,7 @@
 60
 01
 4b
-cb
+c3
 20
 40
 2a
@@ -1655,7 +1655,7 @@
 68
 00
 cb
-cb
+c3
 c0
 7f
 81
@@ -1683,7 +1683,7 @@
 60
 01
 4b
-cb
+c3
 70
 0a
 99
@@ -1707,7 +1707,7 @@
 68
 00
 cb
-9f
+97
 60
 00
 91
@@ -1715,7 +1715,7 @@
 68
 02
 4b
-d5
+cd
 60
 02
 11
@@ -1739,7 +1739,7 @@
 68
 01
 4b
-cb
+c3
 1f
 e0
 fe
@@ -1747,7 +1747,7 @@
 60
 01
 4b
-cb
+c3
 20
 40
 02
@@ -1770,7 +1770,7 @@
 a8
 70
 4b
-cb
+c3
 00
 20
 40
@@ -1783,7 +1783,7 @@
 68
 00
 cb
-cb
+c3
 c0
 7f
 81
@@ -1811,11 +1811,11 @@
 68
 02
 4b
-c6
+be
 68
 0a
 4b
-aa
+a2
 98
 46
 7c
@@ -1831,7 +1831,7 @@
 68
 00
 cb
-cb
+c3
 1f
 e0
 fe
@@ -1839,11 +1839,11 @@
 60
 00
 cb
-cb
+c3
 68
 00
 cc
-dc
+d4
 1f
 e0
 fe
@@ -1855,7 +1855,7 @@
 60
 00
 cc
-dc
+d4
 c0
 00
 01
@@ -1879,7 +1879,7 @@
 60
 01
 4b
-c6
+be
 e0
 a1
 00
@@ -1927,7 +1927,7 @@
 60
 08
 cb
-9e
+96
 18
 42
 72
@@ -1935,7 +1935,7 @@
 d8
 a0
 4b
-3a
+32
 1a
 22
 0c
@@ -1947,7 +1947,7 @@
 68
 00
 cb
-19
+11
 1f
 e9
 7e
@@ -1955,7 +1955,7 @@
 60
 00
 cb
-9c
+94
 1f
 e0
 fe
@@ -1963,7 +1963,7 @@
 d8
 c0
 4b
-19
+11
 98
 c0
 8c
@@ -1975,11 +1975,11 @@
 60
 01
 cb
-db
+d3
 68
 00
 cb
-19
+11
 1f
 e3
 7e
@@ -1991,7 +1991,7 @@
 60
 00
 cb
-e1
+d9
 20
 60
 00
@@ -1999,7 +1999,7 @@
 60
 02
 4b
-c6
+be
 da
 20
 00
@@ -2011,7 +2011,7 @@
 d8
 c0
 4b
-c6
+be
 e8
 c0
 80
@@ -2031,15 +2031,15 @@
 60
 01
 4c
-4f
+47
 68
 00
 cc
-4f
+47
 68
 08
 cc
-50
+48
 98
 40
 fe
@@ -2047,7 +2047,7 @@
 60
 00
 cc
-51
+49
 20
 60
 00
@@ -2055,7 +2055,7 @@
 68
 00
 cb
-9e
+96
 1f
 e0
 fe
@@ -2063,19 +2063,19 @@
 60
 00
 cb
-a0
+98
 68
 00
 cb
-9f
+97
 60
 00
 cb
-5a
+52
 68
 00
 cb
-9e
+96
 1f
 e9
 fe
@@ -2083,7 +2083,7 @@
 68
 08
 cb
-9d
+95
 18
 41
 04
@@ -2099,7 +2099,7 @@
 68
 08
 cb
-da
+d2
 98
 40
 fe
@@ -2111,7 +2111,7 @@
 68
 00
 cb
-9e
+96
 98
 00
 72
@@ -2119,7 +2119,7 @@
 d8
 c0
 4b
-3a
+32
 20
 20
 7f
@@ -2127,7 +2127,7 @@
 68
 08
 cb
-a9
+a1
 20
 40
 02
@@ -2135,7 +2135,7 @@
 60
 08
 cb
-a9
+a1
 20
 60
 00
@@ -2159,7 +2159,7 @@
 68
 00
 cb
-c6
+be
 1f
 e1
 7e
@@ -2171,7 +2171,7 @@
 58
 00
 4b
-af
+a7
 9a
 20
 fe
@@ -2187,7 +2187,7 @@
 60
 00
 cb
-a8
+a0
 20
 60
 00
@@ -2211,7 +2211,7 @@
 68
 00
 cb
-a8
+a0
 1f
 ed
 84
@@ -2235,7 +2235,7 @@
 68
 02
 4b
-c6
+be
 98
 00
 12
@@ -2247,7 +2247,7 @@
 68
 08
 cb
-a8
+a0
 20
 40
 29
@@ -2291,7 +2291,7 @@
 68
 01
 4b
-a1
+99
 98
 00
 36
@@ -2327,11 +2327,11 @@
 60
 00
 cc
-52
+4a
 68
 08
 cc
-51
+49
 98
 46
 7c
@@ -2347,11 +2347,11 @@
 60
 00
 cb
-18
+10
 68
 00
 cb
-e4
+dc
 1f
 e6
 7c
@@ -2363,11 +2363,11 @@
 68
 00
 cb
-18
+10
 68
 08
 cb
-9f
+97
 a8
 40
 0e
@@ -2419,7 +2419,7 @@
 60
 00
 cc
-d9
+d1
 1a
 22
 0a
@@ -2483,7 +2483,7 @@
 68
 00
 cc
-d9
+d1
 20
 40
 00
@@ -2531,7 +2531,7 @@
 68
 08
 cb
-a8
+a0
 20
 20
 29
@@ -2543,7 +2543,7 @@
 68
 02
 4b
-c6
+be
 98
 00
 12
@@ -2607,7 +2607,7 @@
 68
 00
 cc
-51
+49
 08
 00
 86
@@ -2615,7 +2615,7 @@
 68
 00
 cb
-a0
+98
 98
 00
 72
@@ -2623,7 +2623,7 @@
 d8
 c0
 4b
-5a
+52
 e8
 c0
 80
@@ -2675,7 +2675,7 @@
 68
 0a
 4b
-bf
+b7
 1c
 42
 7e
@@ -2695,11 +2695,11 @@
 68
 02
 4b
-bf
+b7
 68
 08
 cb
-c3
+bb
 98
 40
 84
@@ -2723,7 +2723,7 @@
 60
 02
 4b
-bf
+b7
 20
 20
 7f
@@ -2739,7 +2739,7 @@
 68
 08
 cc
-58
+50
 da
 20
 0d
@@ -2751,7 +2751,7 @@
 60
 08
 cc
-58
+50
 20
 60
 00
@@ -2959,7 +2959,7 @@
 60
 00
 cc
-55
+4d
 20
 40
 06
@@ -2987,7 +2987,7 @@
 68
 00
 cc
-55
+4d
 60
 00
 c1
@@ -3159,7 +3159,7 @@
 60
 01
 4b
-cb
+c3
 20
 40
 42
@@ -3639,7 +3639,7 @@
 d8
 c0
 4b
-c6
+be
 20
 40
 7f
@@ -3675,7 +3675,7 @@
 60
 01
 4c
-cf
+c7
 58
 00
 03
@@ -4535,7 +4535,7 @@
 da
 20
 4b
-c6
+be
 da
 40
 00
@@ -4554,7 +4554,7 @@
 87
 70
 4c
-de
+d6
 00
 20
 40
@@ -6662,11 +6662,11 @@
 6f
 70
 4c
-da
+d2
 01
 70
 4c
-d7
+cf
 00
 20
 60
@@ -6675,7 +6675,7 @@
 68
 00
 cc
-d7
+cf
 1f
 e0
 fe
@@ -6683,7 +6683,7 @@
 60
 00
 cc
-d7
+cf
 20
 60
 00
@@ -6691,7 +6691,7 @@
 68
 00
 cc
-d7
+cf
 1f
 e6
 7c
@@ -6703,7 +6703,7 @@
 68
 00
 cc
-d7
+cf
 c1
 00
 00
@@ -6715,14 +6715,14 @@
 60
 00
 cc
-d7
+cf
 20
 60
 00
 00
 70
 4c
-d7
+cf
 03
 20
 60
@@ -6747,7 +6747,7 @@
 da
 20
 4c
-60
+58
 20
 40
 02
@@ -6755,7 +6755,7 @@
 60
 08
 cc
-d8
+d0
 58
 00
 00
@@ -6779,7 +6779,7 @@
 68
 00
 cc
-d7
+cf
 1f
 e6
 7c
@@ -6791,7 +6791,7 @@
 68
 00
 cc
-d7
+cf
 c0
 00
 06
@@ -6803,19 +6803,19 @@
 68
 00
 cc
-d7
+cf
 c1
 90
 00
 00
 70
 4c
-d7
+cf
 00
 68
 08
 cc
-d8
+d0
 58
 00
 00
@@ -6839,7 +6839,7 @@
 68
 00
 cc
-da
+d2
 c0
 00
 06
@@ -6851,7 +6851,7 @@
 60
 00
 cc
-da
+d2
 c0
 00
 06
@@ -6866,12 +6866,12 @@
 00
 70
 4c
-d7
+cf
 00
 68
 00
 cc
-da
+d2
 c0
 01
 06
@@ -6883,7 +6883,7 @@
 60
 00
 cc
-da
+d2
 c0
 00
 86
@@ -7100,8 +7100,8 @@
 20
 28
 fa
-7f
-66
+af
+c8
 aa
 55
 08
@@ -7195,7 +7195,7 @@
 91
 40
 01
-42
+43
 aa
 55
 06
@@ -7682,7 +7682,7 @@
 55
 04
 00
-9f
+97
 4b
 01
 00
@@ -7692,7 +7692,7 @@
 55
 15
 00
-aa
+a2
 4b
 20
 15
@@ -7719,7 +7719,7 @@
 55
 03
 00
-c3
+bb
 4b
 19
 19
@@ -7728,7 +7728,7 @@
 55
 03
 00
-cd
+c5
 4b
 00
 48
@@ -7737,9 +7737,9 @@
 55
 02
 00
-e3
+db
 4b
 04
 01
-d8
-b6
+aa
+db
Index: output/memmap.format
===================================================================
--- /branch/mouse_project/Standard/output/memmap.format	(revision 761)
+++ /branch/mouse_project/Standard/output/memmap.format	(working copy)
@@ -599,6 +599,9 @@
 0x0f9e mem_rssi_noise_ms_buffer
 0x109e mem_rssi_noise_kb_buffer
 0x119e mem_24g_common_temp
+0x11be mem_data_pre
+0x11c0 mem_data_current
+0x11c2 mem_data_sum
 0x4000 mem_patch00
 0x4001 mem_patch01
 0x4002 mem_patch02
@@ -1761,125 +1764,121 @@
 0x4b09 mem_mouse_bt_send_first_package_timer
 0x4b0a mem_mouse_bt_send_first_package_flag
 0x4b0b mem_mouse_asm_flag
-0x4b0c mem_mouse_x_abs
-0x4b0d mem_mouse_y_abs
-0x4b0e mem_mouse_x_sum
-0x4b11 mem_mouse_y_sum
-0x4b14 mem_mouse_x_pre
-0x4b16 mem_mouse_y_pre
-0x4b18 mem_24g_rxbuf
-0x4b3a mem_24g_txbuf
-0x4b5a mem_24g_txpayload
-0x4b7c mem_24g_rxpayload
-0x4b9c mem_24g_rxdata_length
-0x4b9d mem_24g_pid
-0x4b9e mem_24g_datalen
-0x4b9f mem_24g_data_type
-0x4ba0 mem_24g_txlen
-0x4ba1 mem_24g_rx_window
-0x4ba3 mem_24g_ensure
-0x4ba4 mem_24g_txfail_cnt
-0x4ba6 mem_24g_get_ack_fail
-0x4ba7 mem_24g_retry
-0x4ba8 mem_24g_ch
-0x4ba9 mem_24g_current_ch_number
-0x4baa mem_24g_paring_addr
-0x4bae mem_24g_pairing_sm
-0x4baf mem_24g_ch_map1
-0x4bb3 mem_24g_ch_map2
-0x4bb7 mem_24g_ch_map3
-0x4bbb mem_24g_ch_map4
-0x4bbf mem_24g_tx_btclk
-0x4bc3 mem_24g_interval
-0x4bc4 mem_24g_interval_min
-0x4bc5 mem_24g_interval_max
-0x4bc6 mem_24g_addr
-0x4bca mem_24g_abort_pac
-0x4bcb mem_24g_check_dongle_times
-0x4bcd mem_24g_enter_hibernate
-0x4bd5 mem_24g_device_addr
-0x4bd9 mem_24g_pac_index
-0x4bda mem_24g_no_ack
-0x4bdb mem_24g_sta_crc
-0x4bde mem_24g_last_crc
-0x4be1 mem_24g_sta_pid
-0x4be2 mem_24g_last_pid
-0x4be3 mem_24g_max_retry
-0x4be4 mem_24g_mode
-0x4be5 mem_24g_rxdata_temp
-0x4c07 mem_24g_rx_addr
-0x4c0b mem_dongle_mode_init
-0x4c0c mem_dongle_work_mode
-0x4c0d mem_dongle_ms_bind_step
-0x4c0e mem_dongle_kb_bind_step
-0x4c0f mem_dongle_bind_device_status
-0x4c10 mem_24g_bind_payload
-0x4c18 mem_24g_abort_packet
-0x4c19 mem_24g_rf_laststa
-0x4c1a mem_24g_hop_btclk
-0x4c1e mem_24g_hop_interval
-0x4c1f mem_24g_mode_switch
-0x4c20 mem_24g_ackpayload_enable
-0x4c21 mem_24g_hop_packet
-0x4c22 mem_24g_pair_mode
-0x4c23 mem_24g_nodata_timer_enable
-0x4c24 mem_24g_time_slice
-0x4c25 mem_24g_kb_data_sta_data
-0x4c2d mem_24g_kb_data_last_data
-0x4c35 mem_24g_kb_multikey_sta_data
-0x4c38 mem_24g_kb_multikey_last_data
-0x4c3b mem_24g_kb_blank_data_enable
-0x4c3c mem_24g_kb_mul_blank_data_enable
-0x4c3d mem_24g_ms_blank_data_enable
-0x4c3e mem_24g_kb_addr
-0x4c42 mem_24g_ms_addr
-0x4c46 mem_24g_dg_last_ch
-0x4c47 mem_24g_dg_ch_number
-0x4c48 mem_24g_dg_config_ch_once
-0x4c49 mem_24g_kb_last_ch
-0x4c4a mem_24g_kb_ch_number
-0x4c4b mem_24g_kb_config_ch_once
-0x4c4c mem_24g_ms_last_ch
-0x4c4d mem_24g_ms_ch_number
-0x4c4e mem_24g_ms_config_ch_once
-0x4c4f mem_24g_syncword
-0x4c51 mem_24g_syncword_crc8
-0x4c52 mem_24g_get_syncword_crc8
-0x4c53 mem_24g_ota_sta_pid
-0x4c55 mem_tx_power_temp
-0x4c56 mem_rssi_hex
-0x4c57 mem_rssi_noise_avg
-0x4c58 mem_rssi_noise_index
-0x4c59 mem_rssi_signal_index
-0x4c5a mem_rssi_noise_dg_avg
-0x4c5b mem_rssi_noise_kb_avg
-0x4c5c mem_rssi_noise_ms_avg
-0x4c5d mem_rssi_noise_dg_index
-0x4c5e mem_rssi_noise_kb_index
-0x4c5f mem_rssi_noise_ms_index
-0x4c60 mem_rssi_signal_buf
-0x4c68 mem_queue_ele_num
-0x4c69 mem_queue_read
-0x4c6b mem_queue_write
-0x4c6d mem_queue_start
-0x4c6d mem_data_ele0
-0x4c8d mem_data_ele1
-0x4cad mem_data_ele2
-0x4ccd mem_queue_end
-0x4ccd mem_queue_temp
-0x4ccf mem_cb_24g_data
-0x4cd1 mem_24g_hop_fastly_cnt
-0x4cd2 mem_24g_hop_pac_retry
-0x4cd3 mem_24g_rf_hop_ch
-0x4cd4 mem_24g_rf_last_sta
-0x4cd5 mem_24g_rf_work_stage
-0x4cd6 mem_24g_sync_cnt
-0x4cd7 mem_power_ctrl_pac_succ_cnt
-0x4cd8 mem_rssi_avg_received
-0x4cd9 mem_rssi_hex_received
-0x4cda mem_power_ctrl_level
-0x4cdb mem_seqi
-0x4cdc mem_24g_auto_paring_switch
-0x4cdd mem_24g_paccnt
-0x4cde mem_24g_transmit_by_interrupt
-0x4cdf mem_24g_transmit_by_interrupt_exit_count
+0x4b0c mem_mouse_x_pre
+0x4b0e mem_mouse_y_pre
+0x4b10 mem_24g_rxbuf
+0x4b32 mem_24g_txbuf
+0x4b52 mem_24g_txpayload
+0x4b74 mem_24g_rxpayload
+0x4b94 mem_24g_rxdata_length
+0x4b95 mem_24g_pid
+0x4b96 mem_24g_datalen
+0x4b97 mem_24g_data_type
+0x4b98 mem_24g_txlen
+0x4b99 mem_24g_rx_window
+0x4b9b mem_24g_ensure
+0x4b9c mem_24g_txfail_cnt
+0x4b9e mem_24g_get_ack_fail
+0x4b9f mem_24g_retry
+0x4ba0 mem_24g_ch
+0x4ba1 mem_24g_current_ch_number
+0x4ba2 mem_24g_paring_addr
+0x4ba6 mem_24g_pairing_sm
+0x4ba7 mem_24g_ch_map1
+0x4bab mem_24g_ch_map2
+0x4baf mem_24g_ch_map3
+0x4bb3 mem_24g_ch_map4
+0x4bb7 mem_24g_tx_btclk
+0x4bbb mem_24g_interval
+0x4bbc mem_24g_interval_min
+0x4bbd mem_24g_interval_max
+0x4bbe mem_24g_addr
+0x4bc2 mem_24g_abort_pac
+0x4bc3 mem_24g_check_dongle_times
+0x4bc5 mem_24g_enter_hibernate
+0x4bcd mem_24g_device_addr
+0x4bd1 mem_24g_pac_index
+0x4bd2 mem_24g_no_ack
+0x4bd3 mem_24g_sta_crc
+0x4bd6 mem_24g_last_crc
+0x4bd9 mem_24g_sta_pid
+0x4bda mem_24g_last_pid
+0x4bdb mem_24g_max_retry
+0x4bdc mem_24g_mode
+0x4bdd mem_24g_rxdata_temp
+0x4bff mem_24g_rx_addr
+0x4c03 mem_dongle_mode_init
+0x4c04 mem_dongle_work_mode
+0x4c05 mem_dongle_ms_bind_step
+0x4c06 mem_dongle_kb_bind_step
+0x4c07 mem_dongle_bind_device_status
+0x4c08 mem_24g_bind_payload
+0x4c10 mem_24g_abort_packet
+0x4c11 mem_24g_rf_laststa
+0x4c12 mem_24g_hop_btclk
+0x4c16 mem_24g_hop_interval
+0x4c17 mem_24g_mode_switch
+0x4c18 mem_24g_ackpayload_enable
+0x4c19 mem_24g_hop_packet
+0x4c1a mem_24g_pair_mode
+0x4c1b mem_24g_nodata_timer_enable
+0x4c1c mem_24g_time_slice
+0x4c1d mem_24g_kb_data_sta_data
+0x4c25 mem_24g_kb_data_last_data
+0x4c2d mem_24g_kb_multikey_sta_data
+0x4c30 mem_24g_kb_multikey_last_data
+0x4c33 mem_24g_kb_blank_data_enable
+0x4c34 mem_24g_kb_mul_blank_data_enable
+0x4c35 mem_24g_ms_blank_data_enable
+0x4c36 mem_24g_kb_addr
+0x4c3a mem_24g_ms_addr
+0x4c3e mem_24g_dg_last_ch
+0x4c3f mem_24g_dg_ch_number
+0x4c40 mem_24g_dg_config_ch_once
+0x4c41 mem_24g_kb_last_ch
+0x4c42 mem_24g_kb_ch_number
+0x4c43 mem_24g_kb_config_ch_once
+0x4c44 mem_24g_ms_last_ch
+0x4c45 mem_24g_ms_ch_number
+0x4c46 mem_24g_ms_config_ch_once
+0x4c47 mem_24g_syncword
+0x4c49 mem_24g_syncword_crc8
+0x4c4a mem_24g_get_syncword_crc8
+0x4c4b mem_24g_ota_sta_pid
+0x4c4d mem_tx_power_temp
+0x4c4e mem_rssi_hex
+0x4c4f mem_rssi_noise_avg
+0x4c50 mem_rssi_noise_index
+0x4c51 mem_rssi_signal_index
+0x4c52 mem_rssi_noise_dg_avg
+0x4c53 mem_rssi_noise_kb_avg
+0x4c54 mem_rssi_noise_ms_avg
+0x4c55 mem_rssi_noise_dg_index
+0x4c56 mem_rssi_noise_kb_index
+0x4c57 mem_rssi_noise_ms_index
+0x4c58 mem_rssi_signal_buf
+0x4c60 mem_queue_ele_num
+0x4c61 mem_queue_read
+0x4c63 mem_queue_write
+0x4c65 mem_queue_start
+0x4c65 mem_data_ele0
+0x4c85 mem_data_ele1
+0x4ca5 mem_data_ele2
+0x4cc5 mem_queue_end
+0x4cc5 mem_queue_temp
+0x4cc7 mem_cb_24g_data
+0x4cc9 mem_24g_hop_fastly_cnt
+0x4cca mem_24g_hop_pac_retry
+0x4ccb mem_24g_rf_hop_ch
+0x4ccc mem_24g_rf_last_sta
+0x4ccd mem_24g_rf_work_stage
+0x4cce mem_24g_sync_cnt
+0x4ccf mem_power_ctrl_pac_succ_cnt
+0x4cd0 mem_rssi_avg_received
+0x4cd1 mem_rssi_hex_received
+0x4cd2 mem_power_ctrl_level
+0x4cd3 mem_seqi
+0x4cd4 mem_24g_auto_paring_switch
+0x4cd5 mem_24g_paccnt
+0x4cd6 mem_24g_transmit_by_interrupt
+0x4cd7 mem_24g_transmit_by_interrupt_exit_count
Index: output/program.lis
===================================================================
--- /branch/mouse_project/Standard/output/program.lis	(revision 761)
+++ /branch/mouse_project/Standard/output/program.lis	(working copy)
@@ -44,14 +44,14 @@
 
 p_rssi_signal:
 0027 1fe22200 copy pdata ,rega 
-0028 6808cc59 fetcht 1 ,mem_rssi_signal_index 
-0029 58004c60 setarg mem_rssi_signal_buf 
+0028 6808cc51 fetcht 1 ,mem_rssi_signal_index 
+0029 58004c58 setarg mem_rssi_signal_buf 
 002a 98408a00 iadd temp ,contw 
 002b 1a227e00 copy rega ,pdata 
 002c e0a08000 istore 1 ,contw 
 002d 18408401 increase 1 ,temp 
 002e 18410407 and_into rssi_buf_len_signal ,temp 
-002f 6008cc59 storet 1 ,mem_rssi_signal_index 
+002f 6008cc51 storet 1 ,mem_rssi_signal_index 
 0030 20600000 rtn 
 
 p_soft_reset_1:
@@ -95,7 +95,7 @@
 
 p_g24_dispatch:
 004e c6930000 rtnmark0 mark_24g 
-004f 6800ccde fetch 1 ,mem_24g_transmit_by_interrupt 
+004f 6800ccd6 fetch 1 ,mem_24g_transmit_by_interrupt 
 0050 c000805f beq g24_tx_timer_int_enable ,p_g24_transmit_by_interrupt 
 
 p_g24_transmit_process:
@@ -105,10 +105,10 @@
 
 p_g24_transmit_start:
 0054 20400112 call p_g24_transmit_packet 
-0055 6800cbae fetch 1 ,mem_24g_pairing_sm 
+0055 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 0056 c1ff8000 rtnne state_24g_pairing_success 
 0057 20400691 call power_ctrl_start 
-0058 6800ccde fetch 1 ,mem_24g_transmit_by_interrupt 
+0058 6800ccd6 fetch 1 ,mem_24g_transmit_by_interrupt 
 0059 c1008000 rtneq g24_tx_timer_int_enable 
 
 p_g24_short_sleep:
@@ -122,50 +122,50 @@
 005f 2040029a call p_g24_timer_check 
 0060 24740000 nrtn user 
 0061 20400070 call p_g24_interval_calibrate 
-0062 6800ccdf fetch 1 ,mem_24g_transmit_by_interrupt_exit_count 
+0062 6800ccd7 fetch 1 ,mem_24g_transmit_by_interrupt_exit_count 
 0063 1fe0fe01 increase 1 ,pdata 
-0064 6000ccdf store 1 ,mem_24g_transmit_by_interrupt_exit_count 
+0064 6000ccd7 store 1 ,mem_24g_transmit_by_interrupt_exit_count 
 0065 1fe67c19 sub pdata ,25 ,null 
 0066 20428068 call p_g24_transmit_by_interrupt_exit ,zero 
 0067 20200051 branch p_g24_transmit_process 
 
 p_g24_transmit_by_interrupt_exit:
-0068 704cde00 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
-0069 704cdf00 jam 0 ,mem_24g_transmit_by_interrupt_exit_count 
+0068 704cd600 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+0069 704cd700 jam 0 ,mem_24g_transmit_by_interrupt_exit_count 
 
 p_g24_interval_min:
-006a 704bd900 jam 0 ,mem_24g_pac_index 
-006b 6800cbc4 fetch 1 ,mem_24g_interval_min 
+006a 704bd100 jam 0 ,mem_24g_pac_index 
+006b 6800cbbc fetch 1 ,mem_24g_interval_min 
 
 p_g24_current_interval_store:
-006c 6000cbc3 store 1 ,mem_24g_interval 
+006c 6000cbbb store 1 ,mem_24g_interval 
 006d 20600000 rtn 
 
 p_g24_interval_max:
-006e 6800cbc5 fetch 1 ,mem_24g_interval_max 
+006e 6800cbbd fetch 1 ,mem_24g_interval_max 
 006f 2020006c branch p_g24_current_interval_store 
 
 p_g24_interval_calibrate:
-0070 6800cbd9 fetch 1 ,mem_24g_pac_index 
+0070 6800cbd1 fetch 1 ,mem_24g_pac_index 
 0071 1fe0fe01 increase 1 ,pdata 
-0072 6000cbd9 store 1 ,mem_24g_pac_index 
+0072 6000cbd1 store 1 ,mem_24g_pac_index 
 0073 c002006e beq 4 ,p_g24_interval_max 
 0074 c002806a beq 5 ,p_g24_interval_min 
 0075 20600000 rtn 
 
 p_g24_transmit_by_interrupt_enable:
-0076 704cde01 jam g24_tx_timer_int_enable ,mem_24g_transmit_by_interrupt 
-0077 704cdf00 jam 0 ,mem_24g_transmit_by_interrupt_exit_count 
+0076 704cd601 jam g24_tx_timer_int_enable ,mem_24g_transmit_by_interrupt 
+0077 704cd700 jam 0 ,mem_24g_transmit_by_interrupt_exit_count 
 0078 20600000 rtn 
 
 p_g24_nodata_transmit:
-0079 6800cbca fetch 1 ,mem_24g_abort_pac 
+0079 6800cbc2 fetch 1 ,mem_24g_abort_pac 
 007a 205a0088 call p_g24_send_abort_packet ,blank 
 
 p_g24_long_sleep:
 007b 20400081 call p_g24_lpm_wait 
 007c 24740000 nrtn user 
-007d 6801cbcd fetch 3 ,mem_24g_enter_hibernate 
+007d 6801cbc5 fetch 3 ,mem_24g_enter_hibernate 
 007e 20407f49 call clk2lpo 
 007f 600a415b storet 4 ,mem_sleep_counter 
 0080 20202b2a branch lpm_sleep 
@@ -180,120 +180,120 @@
 0087 202002d2 branch p_mouse_setgpio_lpm 
 
 p_g24_send_abort_packet:
-0088 704bca01 jam 1 ,mem_24g_abort_pac 
-0089 704cd300 jam 0 ,mem_24g_rf_hop_ch 
+0088 704bc201 jam 1 ,mem_24g_abort_pac 
+0089 704ccb00 jam 0 ,mem_24g_rf_hop_ch 
 008a 2040009f call p_g24_transmit_rf_ctrl_clear 
-008b 6000cb3a store 1 ,mem_24g_txbuf 
+008b 6000cb32 store 1 ,mem_24g_txbuf 
 008c 58000000 setarg 0 
-008d 6003cb3b store 7 ,mem_24g_txbuf + 1 
-008e 68024bd5 fetch 4 ,mem_24g_device_addr 
-008f 60024b42 store 4 ,mem_24g_txbuf + 8 
-0090 704b9e0c jam 12 ,mem_24g_datalen 
-0091 6800cb9f fetch 1 ,mem_24g_data_type 
+008d 6003cb33 store 7 ,mem_24g_txbuf + 1 
+008e 68024bcd fetch 4 ,mem_24g_device_addr 
+008f 60024b3a store 4 ,mem_24g_txbuf + 8 
+0090 704b960c jam 12 ,mem_24g_datalen 
+0091 6800cb97 fetch 1 ,mem_24g_data_type 
 0092 79207e03 set1 bit_abort ,pdata 
-0093 6000cb9f store 1 ,mem_24g_data_type 
+0093 6000cb97 store 1 ,mem_24g_data_type 
 0094 204000f3 call p_g24_txdata_enable_tx 
 0095 20200054 branch p_g24_transmit_start 
 
 p_g24_set_device_addr:
 0096 204068a8 call adc_init_data 
 0097 68024221 fetch 4 ,mem_2v_adc_vinlpm_data 
-0098 60024bd5 store 4 ,mem_24g_device_addr 
+0098 60024bcd store 4 ,mem_24g_device_addr 
 0099 247a0000 nrtn blank 
 009a 680240a0 fetch 4 ,mem_lap 
-009b 60024bd5 store 4 ,mem_24g_device_addr 
+009b 60024bcd store 4 ,mem_24g_device_addr 
 009c 20600000 rtn 
 
 p_g24_transmit_rf_sta_init:
-009d 704cd401 jam 1 ,mem_24g_rf_last_sta 
-009e 704cd600 jam 0 ,mem_24g_sync_cnt 
+009d 704ccc01 jam 1 ,mem_24g_rf_last_sta 
+009e 704cce00 jam 0 ,mem_24g_sync_cnt 
 
 p_g24_transmit_rf_ctrl_clear:
-009f 6800cb9f fetch 1 ,mem_24g_data_type 
+009f 6800cb97 fetch 1 ,mem_24g_data_type 
 00a0 1fe17e07 and_into bits_data ,pdata 
-00a1 6000cb9f store 1 ,mem_24g_data_type 
+00a1 6000cb97 store 1 ,mem_24g_data_type 
 00a2 20600000 rtn 
 
 p_g24_hop_ch_enable:
-00a3 6800cb9f fetch 1 ,mem_24g_data_type 
+00a3 6800cb97 fetch 1 ,mem_24g_data_type 
 00a4 79207e04 set1 bit_hop ,pdata 
-00a5 6000cb9f store 1 ,mem_24g_data_type 
-00a6 6000cb5a store 1 ,mem_24g_txpayload 
+00a5 6000cb97 store 1 ,mem_24g_data_type 
+00a6 6000cb52 store 1 ,mem_24g_txpayload 
 00a7 20600000 rtn 
 
 p_g24_hop_ch_disable:
-00a8 6800cb9f fetch 1 ,mem_24g_data_type 
+00a8 6800cb97 fetch 1 ,mem_24g_data_type 
 00a9 793ffe04 set0 bit_hop ,pdata 
-00aa 6000cb9f store 1 ,mem_24g_data_type 
+00aa 6000cb97 store 1 ,mem_24g_data_type 
 00ab 20600000 rtn 
 
 p_g24_transmit_hop_pac_fail:
 00ac 20400687 call power_ctrl_pac_succ_decrs 
-00ad 6800ccd5 fetch 1 ,mem_24g_rf_work_stage 
+00ad 6800cccd fetch 1 ,mem_24g_rf_work_stage 
 00ae c00080b1 beq 1 ,p_g24_transmit_hop_pac_fail_wo_hop 
 00af c00100b5 beq 2 ,p_g24_transmit_hop_pac_fail_hop_stage2 
 00b0 20600000 rtn 
 
 p_g24_transmit_hop_pac_fail_wo_hop:
-00b1 704cd602 jam 2 ,mem_24g_sync_cnt 
+00b1 704cce02 jam 2 ,mem_24g_sync_cnt 
 
 p_g24_transmit_hop_pac_fail_stage1:
-00b2 704cd200 jam 0 ,mem_24g_hop_pac_retry 
-00b3 704cd400 jam 0 ,mem_24g_rf_last_sta 
+00b2 704cca00 jam 0 ,mem_24g_hop_pac_retry 
+00b3 704ccc00 jam 0 ,mem_24g_rf_last_sta 
 00b4 2020009f branch p_g24_transmit_rf_ctrl_clear 
 
 p_g24_transmit_hop_pac_fail_hop_stage2:
-00b5 704cd300 jam 0 ,mem_24g_rf_hop_ch 
+00b5 704ccb00 jam 0 ,mem_24g_rf_hop_ch 
 00b6 202000b2 branch p_g24_transmit_hop_pac_fail_stage1 
 
 p_g24_transmit_pac_fail_hop_stage3:
-00b7 68014ba4 fetch 2 ,mem_24g_txfail_cnt 
+00b7 68014b9c fetch 2 ,mem_24g_txfail_cnt 
 00b8 1fe0fe01 increase 1 ,pdata 
-00b9 60014ba4 store 2 ,mem_24g_txfail_cnt 
+00b9 60014b9c store 2 ,mem_24g_txfail_cnt 
 00ba c2850155 bbit1 10 ,p_g24_tx_attempt_fail 
-00bb 6800ccd3 fetch 1 ,mem_24g_rf_hop_ch 
+00bb 6800cccb fetch 1 ,mem_24g_rf_hop_ch 
 00bc c00080c0 beq 1 ,p_g24_rf_hop_fastly 
-00bd 704cd301 jam 1 ,mem_24g_rf_hop_ch 
+00bd 704ccb01 jam 1 ,mem_24g_rf_hop_ch 
 
 p_g24_rf_hop_attemp_again:
-00be 6800ccd3 fetch 1 ,mem_24g_rf_hop_ch 
+00be 6800cccb fetch 1 ,mem_24g_rf_hop_ch 
 00bf c080809f bne 1 ,p_g24_transmit_rf_ctrl_clear 
 
 p_g24_rf_hop_fastly:
-00c0 6800ccd1 fetch 1 ,mem_24g_hop_fastly_cnt 
+00c0 6800ccc9 fetch 1 ,mem_24g_hop_fastly_cnt 
 00c1 1fe0fe01 increase 1 ,pdata 
-00c2 6000ccd1 store 1 ,mem_24g_hop_fastly_cnt 
+00c2 6000ccc9 store 1 ,mem_24g_hop_fastly_cnt 
 00c3 c00200c7 beq 4 ,p_g24_rf_hop_fastly_exit 
 00c4 20400212 call p_g24_ch 
-00c5 704be302 jam 2 ,mem_24g_max_retry 
+00c5 704bdb02 jam 2 ,mem_24g_max_retry 
 00c6 20200112 branch p_g24_transmit_packet 
 
 p_g24_rf_hop_fastly_exit:
 00c7 20400687 call power_ctrl_pac_succ_decrs 
-00c8 704cd100 jam 0 ,mem_24g_hop_fastly_cnt 
+00c8 704cc900 jam 0 ,mem_24g_hop_fastly_cnt 
 00c9 2020009f branch p_g24_transmit_rf_ctrl_clear 
 
 p_g24_transmit_hop_pac_succ_wo_hop:
-00ca 704cd602 jam 2 ,mem_24g_sync_cnt 
+00ca 704cce02 jam 2 ,mem_24g_sync_cnt 
 
 p_g24_transmit_hop_pac_succ:
-00cb 704cd401 jam 1 ,mem_24g_rf_last_sta 
-00cc 704cd300 jam 0 ,mem_24g_rf_hop_ch 
+00cb 704ccc01 jam 1 ,mem_24g_rf_last_sta 
+00cc 704ccb00 jam 0 ,mem_24g_rf_hop_ch 
 00cd 2020009f branch p_g24_transmit_rf_ctrl_clear 
 
 p_g24_transmit_succ_rf_config:
-00ce 6800ccd5 fetch 1 ,mem_24g_rf_work_stage 
+00ce 6800cccd fetch 1 ,mem_24g_rf_work_stage 
 00cf c00180cb beq 3 ,p_g24_transmit_hop_pac_succ 
-00d0 6800cb9f fetch 1 ,mem_24g_data_type 
+00d0 6800cb97 fetch 1 ,mem_24g_data_type 
 00d1 2fec0004 isolate0 bit_hop ,pdata 
 00d2 2020809d branch p_g24_transmit_rf_sta_init ,true 
-00d3 6800ccd5 fetch 1 ,mem_24g_rf_work_stage 
+00d3 6800cccd fetch 1 ,mem_24g_rf_work_stage 
 00d4 c00080ca beq 1 ,p_g24_transmit_hop_pac_succ_wo_hop 
 00d5 c00100cb beq 2 ,p_g24_transmit_hop_pac_succ 
 00d6 20600000 rtn 
 
 p_g24_rf_sta_check:
-00d7 6800cbae fetch 1 ,mem_24g_pairing_sm 
+00d7 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 00d8 c1ff8000 rtnne state_24g_pairing_success 
 00d9 204000dc call p_g24_rf_laststa_synccnt_check 
 00da 245600e4 ncall p_g24_rf_sync_cnt_check ,user2 
@@ -301,32 +301,32 @@
 
 p_g24_rf_laststa_synccnt_check:
 00dc 78567c00 disable user2 
-00dd 6800ccd4 fetch 1 ,mem_24g_rf_last_sta 
+00dd 6800cccc fetch 1 ,mem_24g_rf_last_sta 
 00de c1808000 rtnne 1 
-00df 6800ccd6 fetch 1 ,mem_24g_sync_cnt 
+00df 6800ccce fetch 1 ,mem_24g_sync_cnt 
 00e0 c1800000 rtnne 0 
-00e1 704cd501 jam 1 ,mem_24g_rf_work_stage 
-00e2 704be304 jam 4 ,mem_24g_max_retry 
+00e1 704ccd01 jam 1 ,mem_24g_rf_work_stage 
+00e2 704bdb04 jam 4 ,mem_24g_max_retry 
 00e3 20207feb branch enable_user2 
 
 p_g24_rf_sync_cnt_check:
-00e4 6800ccd6 fetch 1 ,mem_24g_sync_cnt 
+00e4 6800ccce fetch 1 ,mem_24g_sync_cnt 
 00e5 203a00eb branch p_g24_rf_hop_attemp ,blank 
 00e6 1fe0ffff increase -1 ,pdata 
-00e7 6000ccd6 store 1 ,mem_24g_sync_cnt 
-00e8 704cd502 jam 2 ,mem_24g_rf_work_stage 
-00e9 704be304 jam 4 ,mem_24g_max_retry 
+00e7 6000ccce store 1 ,mem_24g_sync_cnt 
+00e8 704ccd02 jam 2 ,mem_24g_rf_work_stage 
+00e9 704bdb04 jam 4 ,mem_24g_max_retry 
 00ea 20200212 branch p_g24_ch 
 
 p_g24_rf_hop_attemp:
-00eb 704cd503 jam 3 ,mem_24g_rf_work_stage 
-00ec 6800ccd3 fetch 1 ,mem_24g_rf_hop_ch 
+00eb 704ccd03 jam 3 ,mem_24g_rf_work_stage 
+00ec 6800cccb fetch 1 ,mem_24g_rf_hop_ch 
 00ed 243a00be nbranch p_g24_rf_hop_attemp_again ,blank 
-00ee 704be302 jam 2 ,mem_24g_max_retry 
+00ee 704bdb02 jam 2 ,mem_24g_max_retry 
 00ef 20200212 branch p_g24_ch 
 
 p_g24_txdata_prep:
-00f0 6800cbae fetch 1 ,mem_24g_pairing_sm 
+00f0 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 00f1 c0ff8169 bne state_24g_pairing_success ,p_g24_pairing_sm 
 
 p_g24_txdata_prep_packeage_data:
@@ -334,23 +334,23 @@
 
 p_g24_txdata_enable_tx:
 00f3 20400200 call p_g24_transmit_prep 
-00f4 704ba301 jam ensure_on_24g ,mem_24g_ensure 
+00f4 704b9b01 jam ensure_on_24g ,mem_24g_ensure 
 00f5 20600000 rtn 
 
 p_g24_package_data:
-00f6 68014ccf fetch 2 ,mem_cb_24g_data 
+00f6 68014cc7 fetch 2 ,mem_cb_24g_data 
 00f7 20407f9c call callback_func 
 00f8 203400fc branch p_g24_accumulate_mouse_data ,user 
-00f9 6803cb3b fetch 7 ,mem_24g_txbuf + 1 
+00f9 6803cb33 fetch 7 ,mem_24g_txbuf + 1 
 00fa 207a0000 rtn blank 
 00fb 20207fe7 branch enable_user 
 
 p_g24_accumulate_mouse_data:
-00fc 704bca00 jam 0 ,mem_24g_abort_pac 
+00fc 704bc200 jam 0 ,mem_24g_abort_pac 
 00fd 1a20fe01 add rega ,1 ,pdata 
-00fe 6000cb9e store 1 ,mem_24g_datalen 
+00fe 6000cb96 store 1 ,mem_24g_datalen 
 00ff 2040009f call p_g24_transmit_rf_ctrl_clear 
-0100 6000cb3a store 1 ,mem_24g_txbuf 
+0100 6000cb32 store 1 ,mem_24g_txbuf 
 0101 e8a88000 ifetcht 1 ,contw 
 0102 ea408000 ifetch 1 ,regb 
 0103 9841fe00 ior temp ,pdata 
@@ -359,7 +359,7 @@
 0106 ea420000 ifetch 4 ,regb 
 0107 e0a20000 istore 4 ,contw 
 0108 1a40a404 increase 4 ,regb 
-0109 d8a04b40 arg mem_24g_txbuf + 6 ,contw 
+0109 d8a04b38 arg mem_24g_txbuf + 6 ,contw 
 010a df200002 arg 2 ,loopcnt 
 
 p_g24_accumulation_loop:
@@ -372,13 +372,13 @@
 0111 20600000 rtn 
 
 p_g24_transmit_packet:
-0112 704ba700 jam 0 ,mem_24g_retry 
+0112 704b9f00 jam 0 ,mem_24g_retry 
 
 p_g24_transmit_loop:
 0113 d9600d00 arg param_rx_setup ,timeup 
 0114 34730200 until clkn_rt ,meet 
 0115 2040012e call p_g24_transmit_receive_ack 
-0116 6800cbda fetch 1 ,mem_24g_no_ack 
+0116 6800cbd2 fetch 1 ,mem_24g_no_ack 
 0117 c1008000 rtneq no_ack_24g 
 0118 242c013d nbranch p_g24_retransmit ,sync 
 0119 2437813d nbranch p_g24_retransmit ,user3 
@@ -387,24 +387,24 @@
 011c 20400683 call power_ctrl_pac_succ_incrs 
 
 p_g24_transmit_next_packet:
-011d 6800cb9d fetch 1 ,mem_24g_pid 
+011d 6800cb95 fetch 1 ,mem_24g_pid 
 011e 1fe0fe01 increase 1 ,pdata 
-011f 6000cb9d store 1 ,mem_24g_pid 
-0120 6800cbae fetch 1 ,mem_24g_pairing_sm 
+011f 6000cb95 store 1 ,mem_24g_pid 
+0120 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 0121 c0ff812c bne state_24g_pairing_success ,p_g24_paring_mode_start 
 0122 204000ce call p_g24_transmit_succ_rf_config 
 
 p_g24_transmit_abandon:
 0123 58000000 setarg 0 
-0124 60014ba4 store 2 ,mem_24g_txfail_cnt 
-0125 6000cba6 store 1 ,mem_24g_get_ack_fail 
-0126 6000ccd2 store 1 ,mem_24g_hop_pac_retry 
-0127 704ba300 jam ensure_off_24g ,mem_24g_ensure 
+0124 60014b9c store 2 ,mem_24g_txfail_cnt 
+0125 6000cb9e store 1 ,mem_24g_get_ack_fail 
+0126 6000ccca store 1 ,mem_24g_hop_pac_retry 
+0127 704b9b00 jam ensure_off_24g ,mem_24g_ensure 
 0128 20600000 rtn 
 
 p_g24_txbuf_clear:
 0129 df200004 arg 4 ,loopcnt 
-012a d8a04b3a arg mem_24g_txbuf ,contw 
+012a d8a04b32 arg mem_24g_txbuf ,contw 
 012b 20207ec6 branch memset0 
 
 p_g24_paring_mode_start:
@@ -414,10 +414,10 @@
 p_g24_transmit_receive_ack:
 012e 7857fc00 disable user3 
 012f 20400279 call p_g24_transmit 
-0130 6800cbda fetch 1 ,mem_24g_no_ack 
+0130 6800cbd2 fetch 1 ,mem_24g_no_ack 
 0131 c000813b beq no_ack_24g ,p_g24_transmit_no_ack 
 0132 18002a00 force 0 ,radio_ctrl 
-0133 68024bc6 fetch 4 ,mem_24g_addr 
+0133 68024bbe fetch 4 ,mem_24g_addr 
 0134 98001200 iforce access 
 0135 68088017 fetcht 1 ,mem_last_freq 
 0136 2040291f call set_freq_rx 
@@ -431,36 +431,36 @@
 013c 2020011d branch p_g24_transmit_next_packet 
 
 p_g24_retransmit:
-013d 6800cba6 fetch 1 ,mem_24g_get_ack_fail 
+013d 6800cb9e fetch 1 ,mem_24g_get_ack_fail 
 013e 1fe0fe01 increase 1 ,pdata 
-013f 6000cba6 store 1 ,mem_24g_get_ack_fail 
-0140 6800cbae fetch 1 ,mem_24g_pairing_sm 
+013f 6000cb9e store 1 ,mem_24g_get_ack_fail 
+0140 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 0141 c0ff8151 bne state_24g_pairing_success ,p_g24_tx_paring_retry 
-0142 6808cba7 fetcht 1 ,mem_24g_retry 
+0142 6808cb9f fetcht 1 ,mem_24g_retry 
 0143 18408401 increase 1 ,temp 
-0144 6008cba7 storet 1 ,mem_24g_retry 
-0145 6800cbe3 fetch 1 ,mem_24g_max_retry 
+0144 6008cb9f storet 1 ,mem_24g_retry 
+0145 6800cbdb fetch 1 ,mem_24g_max_retry 
 0146 98467e00 isub temp ,pdata 
 0147 243a0113 nbranch p_g24_transmit_loop ,blank 
-0148 6800ccd5 fetch 1 ,mem_24g_rf_work_stage 
+0148 6800cccd fetch 1 ,mem_24g_rf_work_stage 
 0149 c00180b7 beq 3 ,p_g24_transmit_pac_fail_hop_stage3 
-014a 6800ccd2 fetch 1 ,mem_24g_hop_pac_retry 
+014a 6800ccca fetch 1 ,mem_24g_hop_pac_retry 
 014b 1fe0fe01 increase 1 ,pdata 
-014c 6000ccd2 store 1 ,mem_24g_hop_pac_retry 
+014c 6000ccca store 1 ,mem_24g_hop_pac_retry 
 014d c00100ac beq 2 ,p_g24_transmit_hop_pac_fail 
 014e 204000a3 call p_g24_hop_ch_enable 
-014f 704be301 jam 1 ,mem_24g_max_retry 
+014f 704bdb01 jam 1 ,mem_24g_max_retry 
 0150 20200112 branch p_g24_transmit_packet 
 
 p_g24_tx_paring_retry:
-0151 6800cba6 fetch 1 ,mem_24g_get_ack_fail 
+0151 6800cb9e fetch 1 ,mem_24g_get_ack_fail 
 0152 c1ff8000 rtnne 0xff 
-0153 704ba600 jam 0 ,mem_24g_get_ack_fail 
+0153 704b9e00 jam 0 ,mem_24g_get_ack_fail 
 0154 20200157 branch p_g24_stop_g24_mode 
 
 p_g24_tx_attempt_fail:
 0155 58000000 setarg 0 
-0156 60014ba4 store 2 ,mem_24g_txfail_cnt 
+0156 60014b9c store 2 ,mem_24g_txfail_cnt 
 
 p_g24_stop_g24_mode:
 0157 700a993a jam bt_evt_24g_attempt_fail ,mem_fifo_temp 
@@ -468,11 +468,11 @@
 
 p_g24_ackpayload_parse:
 0159 204001e5 call p_g24_read_len_pid_crc 
-015a 6800cb9c fetch 1 ,mem_24g_rxdata_length 
+015a 6800cb94 fetch 1 ,mem_24g_rxdata_length 
 015b 207a0000 rtn blank 
 015c 98007200 iforce loopcnt 
-015d d8c04b1a arg mem_24g_rxbuf + 2 ,contr 
-015e d8a04b7c arg mem_24g_rxpayload ,contw 
+015d d8c04b12 arg mem_24g_rxbuf + 2 ,contr 
+015e d8a04b74 arg mem_24g_rxpayload ,contw 
 015f 20207f01 branch memcpy 
 
 p_g24_start_pairing_sm1:
@@ -480,44 +480,44 @@
 0161 20400164 call p_g24_pair_init 
 
 p_g24_set_pairing_sm_1:
-0162 704bae01 jam state_24g_pairing_1 ,mem_24g_pairing_sm 
+0162 704ba601 jam state_24g_pairing_1 ,mem_24g_pairing_sm 
 0163 20600000 rtn 
 
 p_g24_pair_init:
 0164 7041de20 jam tx_power_pair ,mem_tx_power 
-0165 704b9d00 jam 0 ,mem_24g_pid 
-0166 704ba84e jam g24_pair_ch ,mem_24g_ch 
-0167 68024baa fetch 4 ,mem_24g_paring_addr 
+0165 704b9500 jam 0 ,mem_24g_pid 
+0166 704ba04e jam g24_pair_ch ,mem_24g_ch 
+0167 68024ba2 fetch 4 ,mem_24g_paring_addr 
 0168 202001f2 branch p_g24_update_addr_and_synccrc8 
 
 p_g24_pairing_sm:
-0169 6800cba3 fetch 1 ,mem_24g_ensure 
+0169 6800cb9b fetch 1 ,mem_24g_ensure 
 016a c000ffe7 beq ensure_on_24g ,enable_user 
-016b 6800cbae fetch 1 ,mem_24g_pairing_sm 
+016b 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 016c c0008170 beq state_24g_pairing_1 ,p_g24_pairing_sm_1 
 016d c0010173 beq state_24g_pairing_2 ,p_g24_pairing_sm_2 
 016e c0018176 beq state_24g_pairing_3 ,p_g24_pairing_sm_3 
 016f 20202a8c branch assert 
 
 p_g24_pairing_sm_1:
-0170 704bae11 jam state_24g_pairing_1_waiting_ack ,mem_24g_pairing_sm 
+0170 704ba611 jam state_24g_pairing_1_waiting_ack ,mem_24g_pairing_sm 
 0171 70119eaa jam 0xaa ,mem_24g_common_temp 
 0172 20200178 branch p_g24_pairing_sm_common 
 
 p_g24_pairing_sm_2:
-0173 704bae12 jam state_24g_pairing_2_waiting_ack ,mem_24g_pairing_sm 
+0173 704ba612 jam state_24g_pairing_2_waiting_ack ,mem_24g_pairing_sm 
 0174 70119e55 jam 0x55 ,mem_24g_common_temp 
 0175 20200178 branch p_g24_pairing_sm_common 
 
 p_g24_pairing_sm_3:
-0176 704bae13 jam state_24g_pairing_3_waiting_ack ,mem_24g_pairing_sm 
+0176 704ba613 jam state_24g_pairing_3_waiting_ack ,mem_24g_pairing_sm 
 0177 70119e22 jam 0x22 ,mem_24g_common_temp 
 
 p_g24_pairing_sm_common:
-0178 6800cb9f fetch 1 ,mem_24g_data_type 
+0178 6800cb97 fetch 1 ,mem_24g_data_type 
 0179 1fe17e07 and_into bits_data ,pdata 
 017a 6000919f store 1 ,mem_24g_common_temp + 1 
-017b 68024bd5 fetch 4 ,mem_24g_device_addr 
+017b 68024bcd fetch 4 ,mem_24g_device_addr 
 017c 600211a0 store 4 ,mem_24g_common_temp + 2 
 
 p_g24_put_pairing_data_in_buff:
@@ -529,7 +529,7 @@
 0182 20207fe7 branch enable_user 
 
 p_g24_paring_mode:
-0183 6800cbae fetch 1 ,mem_24g_pairing_sm 
+0183 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 0184 c17f8000 rtneq state_24g_pairing_success 
 0185 c0088189 beq state_24g_pairing_1_waiting_ack ,p_g24_pairing_sm_1_waiting_ack 
 0186 c009018b beq state_24g_pairing_2_waiting_ack ,p_g24_pairing_sm_2_waiting_ack 
@@ -537,36 +537,36 @@
 0188 20600000 rtn 
 
 p_g24_pairing_sm_1_waiting_ack:
-0189 704bae02 jam state_24g_pairing_2 ,mem_24g_pairing_sm 
+0189 704ba602 jam state_24g_pairing_2 ,mem_24g_pairing_sm 
 018a 20200123 branch p_g24_transmit_abandon 
 
 p_g24_pairing_sm_2_waiting_ack:
-018b 704bae03 jam state_24g_pairing_3 ,mem_24g_pairing_sm 
+018b 704ba603 jam state_24g_pairing_3 ,mem_24g_pairing_sm 
 018c 20200123 branch p_g24_transmit_abandon 
 
 p_g24_pairing_sm_3_waiting_ack:
-018d 704baeff jam state_24g_pairing_success ,mem_24g_pairing_sm 
+018d 704ba6ff jam state_24g_pairing_success ,mem_24g_pairing_sm 
 018e 700a9939 jam bt_evt_24g_pairing_complete ,mem_fifo_temp 
 018f 20407d86 call ui_ipc_send_event 
-0190 68024b7e fetch 4 ,mem_24g_rxpayload + 2 
+0190 68024b76 fetch 4 ,mem_24g_rxpayload + 2 
 0191 204001f2 call p_g24_update_addr_and_synccrc8 
 0192 20200123 branch p_g24_transmit_abandon 
 
 p_g24_start_24g_mode:
 0193 793f8026 set0 mark_24g ,mark 
 0194 204001d6 call p_g24_ch_syncword_crc8_init 
-0195 6800cbae fetch 1 ,mem_24g_pairing_sm 
+0195 6800cba6 fetch 1 ,mem_24g_pairing_sm 
 0196 c1ff8000 rtnne state_24g_pairing_success 
 0197 204001a8 call p_g24_tx_attemp_data_prep 
 
 p_g24_tx_attemp_dongle:
 0198 58000000 setarg 0 
-0199 60014bcb store 2 ,mem_24g_check_dongle_times 
+0199 60014bc3 store 2 ,mem_24g_check_dongle_times 
 
 p_g24_tx_attemp_dongle_loop:
 019a 20402afa call lpo_calibration 
 019b 200007d0 nop 2000 
-019c 6800cbcb fetch 1 ,mem_24g_check_dongle_times 
+019c 6800cbc3 fetch 1 ,mem_24g_check_dongle_times 
 019d c07f8157 beq 0xff ,p_g24_stop_g24_mode 
 019e 2040012e call p_g24_transmit_receive_ack 
 019f 242c01b1 nbranch p_g24_attemp_txdata_retry ,sync 
@@ -575,7 +575,7 @@
 p_g24_tx_attemp_dongle_succ:
 01a1 79200026 set1 mark_24g ,mark 
 01a2 58000000 setarg 0 
-01a3 60014bcb store 2 ,mem_24g_check_dongle_times 
+01a3 60014bc3 store 2 ,mem_24g_check_dongle_times 
 01a4 700a993c jam bt_evt_24g_attempt_success ,mem_fifo_temp 
 01a5 20407d86 call ui_ipc_send_event 
 01a6 20400129 call p_g24_txbuf_clear 
@@ -583,9 +583,9 @@
 
 p_g24_tx_attemp_data_prep:
 01a8 70119eff jam 0xff ,mem_24g_common_temp 
-01a9 6800cb9f fetch 1 ,mem_24g_data_type 
+01a9 6800cb97 fetch 1 ,mem_24g_data_type 
 01aa 6000919f store 1 ,mem_24g_common_temp + 1 
-01ab 68024bd5 fetch 4 ,mem_24g_device_addr 
+01ab 68024bcd fetch 4 ,mem_24g_device_addr 
 01ac 600211a0 store 4 ,mem_24g_common_temp + 2 
 01ad d8400006 arg 6 ,temp 
 01ae da20119e arg mem_24g_common_temp ,rega 
@@ -593,9 +593,9 @@
 01b0 20200200 branch p_g24_transmit_prep 
 
 p_g24_attemp_txdata_retry:
-01b1 68014bcb fetch 2 ,mem_24g_check_dongle_times 
+01b1 68014bc3 fetch 2 ,mem_24g_check_dongle_times 
 01b2 1fe0fe01 increase 1 ,pdata 
-01b3 60014bcb store 2 ,mem_24g_check_dongle_times 
+01b3 60014bc3 store 2 ,mem_24g_check_dongle_times 
 01b4 20400212 call p_g24_ch 
 01b5 2020019a branch p_g24_tx_attemp_dongle_loop 
 
@@ -605,32 +605,32 @@
 01b8 204001a8 call p_g24_tx_attemp_data_prep 
 
 p_g24_auto_pair_restart:
-01b9 704bcb00 jam 0 ,mem_24g_check_dongle_times 
+01b9 704bc300 jam 0 ,mem_24g_check_dongle_times 
 
 p_g24_auto_pair_start_loop:
 01ba 20402afa call lpo_calibration 
 01bb 200007d0 nop 2000 
-01bc 6800cbcb fetch 1 ,mem_24g_check_dongle_times 
+01bc 6800cbc3 fetch 1 ,mem_24g_check_dongle_times 
 01bd c07f8157 beq 0xff ,p_g24_stop_g24_mode 
 01be 2040012e call p_g24_transmit_receive_ack 
 01bf 242c01c8 nbranch p_g24_auto_pair_retry ,sync 
 01c0 243781c8 nbranch p_g24_auto_pair_retry ,user3 
 01c1 20400159 call p_g24_ackpayload_parse 
 01c2 204002e9 call p_mouse_tx_power_init 
-01c3 68024bc6 fetch 4 ,mem_24g_addr 
-01c4 680a4baa fetcht 4 ,mem_24g_paring_addr 
+01c3 68024bbe fetch 4 ,mem_24g_addr 
+01c4 680a4ba2 fetcht 4 ,mem_24g_paring_addr 
 01c5 98467c00 isub temp ,null 
 01c6 20228160 branch p_g24_start_pairing_sm1 ,zero 
 01c7 202001a1 branch p_g24_tx_attemp_dongle_succ 
 
 p_g24_auto_pair_retry:
-01c8 6800cbcb fetch 1 ,mem_24g_check_dongle_times 
+01c8 6800cbc3 fetch 1 ,mem_24g_check_dongle_times 
 01c9 1fe0fe01 increase 1 ,pdata 
-01ca 6000cbcb store 1 ,mem_24g_check_dongle_times 
-01cb 6800ccdc fetch 1 ,mem_24g_auto_paring_switch 
+01ca 6000cbc3 store 1 ,mem_24g_check_dongle_times 
+01cb 6800ccd4 fetch 1 ,mem_24g_auto_paring_switch 
 01cc 1fe0fe01 increase 1 ,pdata 
 01cd 1fe17e01 and_into 1 ,pdata 
-01ce 6000ccdc store 1 ,mem_24g_auto_paring_switch 
+01ce 6000ccd4 store 1 ,mem_24g_auto_paring_switch 
 01cf c00001d8 beq 0 ,p_g24_auto_pair_device_attemp 
 01d0 c00081da beq 1 ,p_g24_auto_pair_pair_attemp 
 01d1 20600000 rtn 
@@ -638,7 +638,7 @@
 p_g24_auto_pair_all_powerful:
 01d2 7041de20 jam tx_power_pair ,mem_tx_power 
 01d3 58000f0f setarg 0x0f0f 
-01d4 60014bc6 store 2 ,mem_24g_addr 
+01d4 60014bbe store 2 ,mem_24g_addr 
 01d5 e0a10000 istore 2 ,contw 
 
 p_g24_ch_syncword_crc8_init:
@@ -662,71 +662,71 @@
 01df 202043d2 branch mouse_disable_function_flag 
 
 p_g24_put_data_in_buff:
-01e0 6008cb9e storet 1 ,mem_24g_datalen 
+01e0 6008cb96 storet 1 ,mem_24g_datalen 
 01e1 18427200 copy temp ,loopcnt 
-01e2 d8a04b3a arg mem_24g_txbuf ,contw 
+01e2 d8a04b32 arg mem_24g_txbuf ,contw 
 01e3 1a220c00 copy rega ,contr 
 01e4 20207f01 branch memcpy 
 
 p_g24_read_len_pid_crc:
-01e5 6800cb19 fetch 1 ,mem_24g_rxbuf + 1 
+01e5 6800cb11 fetch 1 ,mem_24g_rxbuf + 1 
 01e6 1fe97e00 rshift3 pdata ,pdata 
-01e7 6000cb9c store 1 ,mem_24g_rxdata_length 
+01e7 6000cb94 store 1 ,mem_24g_rxdata_length 
 01e8 1fe0fe01 increase 1 ,pdata 
-01e9 d8c04b19 arg mem_24g_rxbuf + 1 ,contr 
+01e9 d8c04b11 arg mem_24g_rxbuf + 1 ,contr 
 01ea 98c08c00 iadd contr ,contr 
 01eb e8c18000 ifetch 3 ,contr 
-01ec 6001cbdb store 3 ,mem_24g_sta_crc 
-01ed 6800cb19 fetch 1 ,mem_24g_rxbuf + 1 
+01ec 6001cbd3 store 3 ,mem_24g_sta_crc 
+01ed 6800cb11 fetch 1 ,mem_24g_rxbuf + 1 
 01ee 1fe37e00 rshift pdata ,pdata 
 01ef 1fe17e03 and pdata ,0x03 ,pdata 
-01f0 6000cbe1 store 1 ,mem_24g_sta_pid 
+01f0 6000cbd9 store 1 ,mem_24g_sta_pid 
 01f1 20600000 rtn 
 
 p_g24_update_addr_and_synccrc8:
-01f2 60024bc6 store 4 ,mem_24g_addr 
+01f2 60024bbe store 4 ,mem_24g_addr 
 
 p_g24_syncword_crc8:
 01f3 da200000 arg 0 ,rega 
 01f4 df200004 arg 4 ,loopcnt 
-01f5 d8c04bc6 arg mem_24g_addr ,contr 
+01f5 d8c04bbe arg mem_24g_addr ,contr 
 
 p_g24_syncword_crc8_loop:
 01f6 e8c08000 ifetch 1 ,contr 
 01f7 9a20a200 iadd rega ,rega 
 01f8 c20001f6 loop p_g24_syncword_crc8_loop 
 01f9 1a227e00 copy rega ,pdata 
-01fa 60014c4f store 2 ,mem_24g_syncword 
-01fb 6800cc4f fetch 1 ,mem_24g_syncword 
-01fc 6808cc50 fetcht 1 ,mem_24g_syncword + 1 
+01fa 60014c47 store 2 ,mem_24g_syncword 
+01fb 6800cc47 fetch 1 ,mem_24g_syncword 
+01fc 6808cc48 fetcht 1 ,mem_24g_syncword + 1 
 01fd 9840fe00 iadd temp ,pdata 
-01fe 6000cc51 store 1 ,mem_24g_syncword_crc8 
+01fe 6000cc49 store 1 ,mem_24g_syncword_crc8 
 01ff 20600000 rtn 
 
 p_g24_transmit_prep:
-0200 6800cb9e fetch 1 ,mem_24g_datalen 
+0200 6800cb96 fetch 1 ,mem_24g_datalen 
 0201 1fe0fe02 increase 2 ,pdata 
-0202 6000cba0 store 1 ,mem_24g_txlen 
-0203 6800cb9f fetch 1 ,mem_24g_data_type 
-0204 6000cb5a store 1 ,mem_24g_txpayload 
-0205 6800cb9e fetch 1 ,mem_24g_datalen 
+0202 6000cb98 store 1 ,mem_24g_txlen 
+0203 6800cb97 fetch 1 ,mem_24g_data_type 
+0204 6000cb52 store 1 ,mem_24g_txpayload 
+0205 6800cb96 fetch 1 ,mem_24g_datalen 
 0206 1fe9fe00 lshift3 pdata ,pdata 
-0207 6808cb9d fetcht 1 ,mem_24g_pid 
+0207 6808cb95 fetcht 1 ,mem_24g_pid 
 0208 18410403 and temp ,0x03 ,temp 
 0209 18438400 lshift temp ,temp 
 020a 9841fe00 ior temp ,pdata 
-020b 6808cbda fetcht 1 ,mem_24g_no_ack 
+020b 6808cbd2 fetcht 1 ,mem_24g_no_ack 
 020c 9840fe00 iadd temp ,pdata 
 020d e0a08000 istore 1 ,contw 
-020e 6800cb9e fetch 1 ,mem_24g_datalen 
+020e 6800cb96 fetch 1 ,mem_24g_datalen 
 020f 98007200 iforce loopcnt 
-0210 d8c04b3a arg mem_24g_txbuf ,contr 
+0210 d8c04b32 arg mem_24g_txbuf ,contr 
 0211 20207f01 branch memcpy 
 
 p_g24_ch:
-0212 6808cba9 fetcht 1 ,mem_24g_current_ch_number 
+0212 6808cba1 fetcht 1 ,mem_24g_current_ch_number 
 0213 20400216 call p_g24_ch_map_size 
-0214 6008cba9 storet 1 ,mem_24g_current_ch_number 
+0214 6008cba1 storet 1 ,mem_24g_current_ch_number 
 0215 20600000 rtn 
 
 p_g24_ch_map_size:
@@ -736,14 +736,14 @@
 0219 20600000 rtn 
 
 p_g24_ch_calc:
-021a 6800cbc6 fetch 1 ,mem_24g_addr 
+021a 6800cbbe fetch 1 ,mem_24g_addr 
 021b 1fe17e03 and_into 0x03 ,pdata 
 021c 1fefa204 mul32 pdata ,4 ,rega 
-021d 58004baf setarg mem_24g_ch_map1 
+021d 58004ba7 setarg mem_24g_ch_map1 
 021e 9a20fe00 iadd rega ,pdata 
 021f 98408c00 iadd temp ,contr 
 0220 e8c08000 ifetch 1 ,contr 
-0221 6000cba8 store 1 ,mem_24g_ch 
+0221 6000cba0 store 1 ,mem_24g_ch 
 0222 20600000 rtn 
 
 p_g24_prep:
@@ -751,7 +751,7 @@
 0224 7843fc00 disable enable_white 
 0225 58555555 setarg 0x555555 
 0226 98001e00 iforce crc24_init 
-0227 6800cba8 fetch 1 ,mem_24g_ch 
+0227 6800cba0 fetch 1 ,mem_24g_ch 
 0228 1fed8400 reverse pdata ,temp 
 0229 79200401 set1 1 ,temp 
 022a 18431c00 rshift temp ,white_init 
@@ -759,10 +759,10 @@
 
 p_g24_receive_packet:
 022c 204053c4 call le_enable 
-022d 68024bc6 fetch 4 ,mem_24g_addr 
+022d 68024bbe fetch 4 ,mem_24g_addr 
 022e 98001200 iforce access 
 022f 20402918 call set_sync_on 
-0230 6808cba8 fetcht 1 ,mem_24g_ch 
+0230 6808cba0 fetcht 1 ,mem_24g_ch 
 0231 2040291f call set_freq_rx 
 0232 58000500 setarg param_pll_setup 
 0233 20402a8f call sleep 
@@ -775,7 +775,7 @@
 0238 7830fc00 enable is_rx 
 0239 78507c00 disable is_tx 
 023a 78287c00 enable swfine 
-023b 68014ba1 fetch 2 ,mem_24g_rx_window 
+023b 68014b99 fetch 2 ,mem_24g_rx_window 
 023c 98003600 iforce stop_watch 
 023d 37c18400 correlate null ,timeout 
 023e 242c0275 nbranch p_g24_sync_timeout ,sync 
@@ -784,17 +784,17 @@
 0241 7823fc00 enable enable_white 
 0242 7824fc00 enable enable_crc 
 0243 2040026e call p_g24_receive_byte 
-0244 6000cc52 store 1 ,mem_24g_get_syncword_crc8 
-0245 6808cc51 fetcht 1 ,mem_24g_syncword_crc8 
+0244 6000cc4a store 1 ,mem_24g_get_syncword_crc8 
+0245 6808cc49 fetcht 1 ,mem_24g_syncword_crc8 
 0246 98467c00 isub temp ,null 
 0247 24228271 nbranch p_g24_end_of_packet ,zero 
 0248 2040026e call p_g24_receive_byte 
-0249 6000cb18 store 1 ,mem_24g_rxbuf 
-024a 6800cbe4 fetch 1 ,mem_24g_mode 
+0249 6000cb10 store 1 ,mem_24g_rxbuf 
+024a 6800cbdc fetch 1 ,mem_24g_mode 
 024b 1fe67c02 sub pdata ,rx_24g ,null 
 024c 20228251 branch p_g24_receive_skip ,zero 
-024d 6800cb18 fetch 1 ,mem_24g_rxbuf 
-024e 6808cb9f fetcht 1 ,mem_24g_data_type 
+024d 6800cb10 fetch 1 ,mem_24g_rxbuf 
+024e 6808cb97 fetcht 1 ,mem_24g_data_type 
 024f a8400e00 icompare bits_data ,temp 
 0250 24208271 nbranch p_g24_end_of_packet ,true 
 
@@ -813,7 +813,7 @@
 p_g24rx_nopayload:
 0259 18a22200 copy contw ,rega 
 025a 2040026e call p_g24_receive_byte 
-025b 6000ccd9 store 1 ,mem_rssi_hex_received 
+025b 6000ccd1 store 1 ,mem_rssi_hex_received 
 025c 1a220a00 copy rega ,contw 
 025d 09800018 parse demod ,bucket ,24 
 025e 78287c00 enable swfine 
@@ -829,7 +829,7 @@
 0268 20402981 call rf_write_freq 
 0269 7846fc00 disable decode_fec0 
 026a 20402918 call set_sync_on 
-026b 6800ccd9 fetch 1 ,mem_rssi_hex_received 
+026b 6800ccd1 fetch 1 ,mem_rssi_hex_received 
 026c 20400027 call p_rssi_signal 
 026d 20600000 rtn 
 
@@ -849,12 +849,12 @@
 
 p_g24_set_freq_tx:
 0276 20402918 call set_sync_on 
-0277 6808cba8 fetcht 1 ,mem_24g_ch 
+0277 6808cba0 fetcht 1 ,mem_24g_ch 
 0278 20202933 branch set_freq_tx 
 
 p_g24_transmit:
 0279 204053c4 call le_enable 
-027a 68024bc6 fetch 4 ,mem_24g_addr 
+027a 68024bbe fetch 4 ,mem_24g_addr 
 027b 98001200 iforce access 
 027c 20400223 call p_g24_prep 
 027d 20400276 call p_g24_set_freq_tx 
@@ -870,11 +870,11 @@
 0287 782dfc00 enable encode_fec1 
 0288 7823fc00 enable enable_white 
 0289 7824fc00 enable enable_crc 
-028a 6800cc51 fetch 1 ,mem_24g_syncword_crc8 
+028a 6800cc49 fetch 1 ,mem_24g_syncword_crc8 
 028b 08008608 inject mod ,8 
-028c 6800cba0 fetch 1 ,mem_24g_txlen 
+028c 6800cb98 fetch 1 ,mem_24g_txlen 
 028d 98007200 iforce loopcnt 
-028e d8c04b5a arg mem_24g_txpayload ,contr 
+028e d8c04b52 arg mem_24g_txpayload ,contr 
 
 p_g24tr_loop:
 028f e8c08000 ifetch 1 ,contr 
@@ -891,28 +891,28 @@
 
 p_g24_timer_check:
 029a 20407fe9 call disable_user 
-029b 680a4bbf fetcht 4 ,mem_24g_tx_btclk 
+029b 680a4bb7 fetcht 4 ,mem_24g_tx_btclk 
 029c 1c427e00 copy clkn_bt ,pdata 
 029d 98467c00 isub temp ,null 
 029e 24412d18 ncall g24_timer_timeout ,positive 
 029f 1fe22400 copy pdata ,regb 
-02a0 68024bbf fetch 4 ,mem_24g_tx_btclk 
-02a1 6808cbc3 fetcht 1 ,mem_24g_interval 
+02a0 68024bb7 fetch 4 ,mem_24g_tx_btclk 
+02a1 6808cbbb fetcht 1 ,mem_24g_interval 
 02a2 98408400 iadd temp ,temp 
 02a3 1a427e00 copy regb ,pdata 
 02a4 98467c00 isub temp ,null 
 02a5 24610000 nrtn positive 
 02a6 793ffe1c set0 28 ,pdata 
-02a7 60024bbf store 4 ,mem_24g_tx_btclk 
+02a7 60024bb7 store 4 ,mem_24g_tx_btclk 
 02a8 20207fe7 branch enable_user 
 
 p_rssi_noise:
 02a9 204029bb call save_rssi 
 02aa 207a0000 rtn blank 
-02ab 6808cc58 fetcht 1 ,mem_rssi_noise_index 
+02ab 6808cc50 fetcht 1 ,mem_rssi_noise_index 
 02ac da200d9e arg mem_rssi_noise_buffer ,rega 
 02ad 204002b0 call p_rssi_store 
-02ae 6008cc58 storet 1 ,mem_rssi_noise_index 
+02ae 6008cc50 storet 1 ,mem_rssi_noise_index 
 02af 20600000 rtn 
 
 p_rssi_store:
@@ -980,7 +980,7 @@
 02df 203582e7 branch p_device_init_common ,wake 
 02e0 204003cb call p_mouse_data_init 
 02e1 6800c1de fetch 1 ,mem_tx_power 
-02e2 6000cc55 store 1 ,mem_tx_power_temp 
+02e2 6000cc4d store 1 ,mem_tx_power_temp 
 02e3 20400680 call power_ctrl_pac_succ_cnt_init 
 02e4 6800c685 fetch 1 ,mem_ui_button_timeout 
 02e5 6000c6da store 1 ,mem_combination_ui_button_count 
@@ -991,7 +991,7 @@
 02e8 202074b9 branch enable_authrom 
 
 p_mouse_tx_power_init:
-02e9 6800cc55 fetch 1 ,mem_tx_power_temp 
+02e9 6800cc4d fetch 1 ,mem_tx_power_temp 
 02ea 6000c1de store 1 ,mem_tx_power 
 02eb 20600000 rtn 
 
@@ -1048,7 +1048,7 @@
 0311 58000000 setarg 0 
 0312 600146ae store 2 ,mem_mouse_direct_timer 
 0313 6000c6b4 store 1 ,mem_mouse_send_blank_timer 
-0314 60014bcb store 2 ,mem_24g_check_dongle_times 
+0314 60014bc3 store 2 ,mem_24g_check_dongle_times 
 0315 204042ca call mouse_stop_discovery 
 0316 20200160 branch p_g24_start_pairing_sm1 
 
@@ -1206,7 +1206,7 @@
 
 p_g24_factory_check:
 038b df200002 arg 2 ,loopcnt 
-038c d8c04bc6 arg mem_24g_addr ,contr 
+038c d8c04bbe arg mem_24g_addr ,contr 
 
 p_pdata_0xff_check:
 038d 20407fe7 call enable_user 
@@ -1221,7 +1221,7 @@
 
 p_mouse_cb_fuction:
 0394 580003a7 setarg p_mouse_g24_package_data 
-0395 60014ccf store 2 ,mem_cb_24g_data 
+0395 60014cc7 store 2 ,mem_cb_24g_data 
 0396 580003be setarg p_mouse_le 
 0397 600141ef store 2 ,mem_cb_le_process 
 0398 580005a6 setarg p_le_mouse_bb_event_connect_complete 
@@ -1502,14 +1502,14 @@
 046b 202065d1 branch iicd_write_protect_eep_data 
 
 p_mouse_set_24g_addr_eeprom:
-046c da204bc6 arg mem_24g_addr ,rega 
+046c da204bbe arg mem_24g_addr ,rega 
 046d da40005b arg mouse_g24_addr_eeprom_offect ,regb 
 046e d8400004 arg 4 ,temp 
 046f 20600000 rtn 
 
 p_mouse_24g_attempt_fail:
 0470 20400487 call p_mouse_sensor_powerdown_check 
-0471 704cde00 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+0471 704cd600 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
 0472 204002e9 call p_mouse_tx_power_init 
 0473 204001dc call p_g24_check_51cmd_stop_24g 
 0474 7041bd00 jam 0 ,mem_link_key_exists 
@@ -2238,28 +2238,28 @@
 067f 2020636f branch host_create_conn_send_conn_req 
 
 power_ctrl_pac_succ_cnt_init:
-0680 704cda01 jam 1 ,mem_power_ctrl_level 
-0681 704cd700 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+0680 704cd201 jam 1 ,mem_power_ctrl_level 
+0681 704ccf00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 0682 20600000 rtn 
 
 power_ctrl_pac_succ_incrs:
-0683 6800ccd7 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0683 6800cccf fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 0684 1fe0fe01 increase 1 ,pdata 
-0685 6000ccd7 store 1 ,mem_power_ctrl_pac_succ_cnt 
+0685 6000cccf store 1 ,mem_power_ctrl_pac_succ_cnt 
 0686 20600000 rtn 
 
 power_ctrl_pac_succ_decrs:
-0687 6800ccd7 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0687 6800cccf fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 0688 1fe67c02 sub pdata ,2 ,null 
 0689 2441068f ncall power_ctrl_pac_succ_cnt_reinit ,positive 
-068a 6800ccd7 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+068a 6800cccf fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 068b c1000000 rtneq 0 
 068c 1fe0ffff increase -1 ,pdata 
-068d 6000ccd7 store 1 ,mem_power_ctrl_pac_succ_cnt 
+068d 6000cccf store 1 ,mem_power_ctrl_pac_succ_cnt 
 068e 20600000 rtn 
 
 power_ctrl_pac_succ_cnt_reinit:
-068f 704cd703 jam 3 ,mem_power_ctrl_pac_succ_cnt 
+068f 704ccf03 jam 3 ,mem_power_ctrl_pac_succ_cnt 
 0690 20600000 rtn 
 
 power_ctrl_start:
@@ -2267,9 +2267,9 @@
 0692 c3858000 rtnbit1 ui_state_ble_adv 
 0693 c3838000 rtnbit1 ui_state_bt_reconnect 
 0694 c3830000 rtnbit1 ui_state_bt_discovery 
-0695 da204c60 arg mem_rssi_signal_buf ,rega 
+0695 da204c58 arg mem_rssi_signal_buf ,rega 
 0696 204002b7 call p_rssi_average 
-0697 6008ccd8 storet 1 ,mem_rssi_avg_received 
+0697 6008ccd0 storet 1 ,mem_rssi_avg_received 
 0698 58000082 setarg rssi_dis_max_24g 
 0699 c513069b bmark1 mark_24g ,power_ctrl_start_next 
 069a 58000080 setarg rssi_dis_max_ble 
@@ -2277,20 +2277,20 @@
 power_ctrl_start_next:
 069b 98467c00 isub temp ,null 
 069c 242106b3 nbranch power_ctrl_txpower_incrs_force ,positive 
-069d 6800ccd7 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+069d 6800cccf fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 069e 1fe67c02 sub pdata ,2 ,null 
 069f 242106a3 nbranch power_ctrl_txpower_decrs_check ,positive 
-06a0 6800ccd7 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+06a0 6800cccf fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 06a1 c00006b4 beq 0 ,power_ctrl_txpower_incrs 
 06a2 20600000 rtn 
 
 power_ctrl_txpower_decrs_check:
-06a3 6800ccd7 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+06a3 6800cccf fetch 1 ,mem_power_ctrl_pac_succ_cnt 
 06a4 c1900000 rtnne 32 
-06a5 704cd700 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+06a5 704ccf00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 
 power_ctrl_txpower_decrs:
-06a6 6808ccd8 fetcht 1 ,mem_rssi_avg_received 
+06a6 6808ccd0 fetcht 1 ,mem_rssi_avg_received 
 06a7 58000077 setarg rssi_dis_min_24g 
 06a8 c51306aa bmark1 mark_24g ,power_ctrl_txpower_decrs_next 
 06a9 58000075 setarg rssi_dis_min_ble 
@@ -2298,10 +2298,10 @@
 power_ctrl_txpower_decrs_next:
 06aa 98467c00 isub temp ,null 
 06ab 24610000 nrtn positive 
-06ac 6800ccda fetch 1 ,mem_power_ctrl_level 
+06ac 6800ccd2 fetch 1 ,mem_power_ctrl_level 
 06ad c00006bb beq 0 ,power_ctrl_decrs_level0 
 06ae 1fe0ffff increase -1 ,pdata 
-06af 6000ccda store 1 ,mem_power_ctrl_level 
+06af 6000ccd2 store 1 ,mem_power_ctrl_level 
 06b0 c00006bb beq 0 ,power_ctrl_decrs_level0 
 
 power_ctrl_decrs_level1:
@@ -2311,13 +2311,13 @@
 06b2 20600000 rtn 
 
 power_ctrl_txpower_incrs_force:
-06b3 704cd700 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+06b3 704ccf00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 
 power_ctrl_txpower_incrs:
-06b4 6800ccda fetch 1 ,mem_power_ctrl_level 
+06b4 6800ccd2 fetch 1 ,mem_power_ctrl_level 
 06b5 c00106b9 beq 2 ,power_ctrl_incrs_level2 
 06b6 1fe0fe01 increase 1 ,pdata 
-06b7 6000ccda store 1 ,mem_power_ctrl_level 
+06b7 6000ccd2 store 1 ,mem_power_ctrl_level 
 06b8 c00086b1 beq 1 ,power_ctrl_incrs_level1 
 
 power_ctrl_incrs_level2:
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/Standard/program/patch.prog	(revision 761)
+++ /branch/mouse_project/Standard/program/patch.prog	(working copy)
@@ -1109,7 +1109,7 @@
 	call test_gpio_init
 endif
 ifdef MOUSE_SMOOTHER	
-	call p_mouse_drawing_optima_init
+	call p_drawing_optima_init
 endif
 	call p_mouse_cb_fuction
 ifdef G24	
@@ -1939,8 +1939,8 @@
 	call mouse_t_zwheel
 	call mouse_key
 ifdef MOUSE_SMOOTHER	
-	nbranch p_mouse_drawing_optima_init,user
-	call p_mouse_drawing_optima
+	nbranch p_drawing_optima_init,user
+	call p_drawing_optima
 else
 	nrtn user
 endif
@@ -2966,75 +2966,88 @@
 
 ifdef MOUSE_SMOOTHER
 //notice: need to call p_mouse_drawing_optima_init when waked from mult
-p_mouse_drawing_optima_init:
-	arg 13,loopcnt
+p_drawing_optima_init:
+	arg 5,loopcnt
 	arg mem_mouse_asm_flag,contw
 	branch clear_mem
 
-p_mouse_drawing_optima:
+p_drawing_optima:
 	fetch 4,mem_mouse_x
 	rtn blank
-	call p_mouse_data_abs_check
-	fetch 1,mem_mouse_x_abs
-	copy pdata,rega
-	fetch 1,mem_mouse_y_abs
-	copy pdata,regb
+	call p_data_abs_check
 	setarg 0x06	//asm_flag enable condition
-	call p_mouse_data_greater_than_check
+	call p_data_greater_than_check
 	setarg 0x03	//asm_flag disable condition
-	call p_mouse_data_less_than_check
+	call p_data_less_than_check
 	fetch 1,mem_mouse_asm_flag
-	beq 1,p_mouse_drawing_optima_modify
-p_mouse_drawing_optima_reset:
-	arg 10,loopcnt
-	arg mem_mouse_x_sum,contw		//clear sum,pre
-	branch clear_mem
+	beq 1,p_drawing_optima_modify
+	branch p_drawing_optima_init
 
-p_mouse_drawing_optima_modify:
-	call p_mouse_drawing_optima_x_data
-	branch p_mouse_drawing_optima_y_data
-
-p_mouse_drawing_optima_x_data:
+p_drawing_optima_modify:
 	fetch 2,mem_mouse_x_pre
-	fetcht 2,mem_mouse_x
-	iadd temp,pdata
-	store 3,mem_mouse_x_sum
-	isolate1 16,pdata
-	branch p_x_sum_overflow,true
+	store 2,mem_data_pre
+	fetch 2,mem_mouse_x
+	store 2,mem_data_current
+	call p_drawing_optima_data
+	fetch 2,mem_data_pre
+	store 2,mem_mouse_x_pre
+	fetch 2,mem_data_current
+	store 2,mem_mouse_x
 
-	fetch 1,mem_mouse_x_sum+1
-	beq 0xff,p_x_sum_n
+	fetch 2,mem_mouse_y_pre
+	store 2,mem_data_pre
+	fetch 2,mem_mouse_y
+	store 2,mem_data_current
+	call p_drawing_optima_data
+	fetch 2,mem_data_pre
+	store 2,mem_mouse_y_pre
+	fetch 2,mem_data_current
+	store 2,mem_mouse_y
+	rtn
 
-	fetch 1,mem_mouse_x_sum
-p_x_store_pre_data:
+/**********
+input:data_pre,data_current
+output:data_pre,data_current after optima
+***********/
+p_drawing_optima_data:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	store 3,mem_data_sum
+	isolate1 16,pdata
+	branch p_data_sum_overflow,true
+	fetch 1,mem_data_sum+1
+	beq 0xff,p_data_sum_n
+	fetch 1,mem_data_sum
+p_data_store_pre:
 	rshift pdata,pdata
-	store 2,mem_mouse_x_pre
-	store 2,mem_mouse_x
+	store 2,mem_data_pre
+	store 2,mem_data_current
 	rtn
-p_x_sum_overflow:
-	fetch 1,mem_mouse_x_sum+1	//sum positive
-	beq 0,p_x_sum_overflow_p
-	fetch 3,mem_mouse_x_sum	//全负相加
-	branch p_x_store_pre_data
-p_x_sum_overflow_p:
-	jam 0,mem_mouse_x_sum+2
-	fetch 1,mem_mouse_x_sum
-	branch p_x_store_pre_data
+p_data_sum_overflow:
+	fetch 1,mem_data_sum+1	//sum positive
+	beq 0,p_data_sum_overflow_p
+	fetch 3,mem_data_sum	//全负相加
+	branch p_data_store_pre
+p_data_sum_overflow_p:
+	jam 0,mem_data_sum+2
+	fetch 1,mem_data_sum
+	branch p_data_store_pre
 
-p_x_sum_n:
-	fetch 1,mem_mouse_x_sum	//sum negetive
+p_data_sum_n:
+	fetch 1,mem_data_sum	//sum negetive
 	call p_pdata_get_half
-	store 1,mem_mouse_x_pre
-	store 1,mem_mouse_x
-	branch p_x_data_zero,blank
+	store 1,mem_data_pre
+	store 1,mem_data_current
+	branch p_data_zero,blank
 	setarg 0xff
-p_x_data_set_direction:	
-	store 1,mem_mouse_x_pre+1
-	store 1,mem_mouse_x+1
+p_data_set_direction:	
+	store 1,mem_data_pre+1
+	store 1,mem_data_current+1
 	rtn
-p_x_data_zero:
+p_data_zero:
 	setarg 0
-	branch p_x_data_set_direction
+	branch p_data_set_direction
 
 p_pdata_get_half:
 	sub pdata,0,pdata
@@ -3046,91 +3059,53 @@
 	sub pdata,0,pdata
 	rtn
 
-p_mouse_drawing_optima_y_data:
-	fetch 2,mem_mouse_y_pre
-	fetcht 2,mem_mouse_y
-	iadd temp,pdata
-	store 3,mem_mouse_y_sum
-	isolate1 16,pdata
-	branch p_y_sum_overflow,true
-
-	fetch 1,mem_mouse_y_sum+1
-	beq 0xff,p_y_sum_n
-
-	fetch 1,mem_mouse_y_sum
-p_y_store_pre_data:	
-	rshift pdata,pdata
-	store 2,mem_mouse_y_pre
-	store 2,mem_mouse_y
-	rtn
-p_y_sum_overflow:
-	fetch 1,mem_mouse_y_sum+1	//sum positive
-	beq 0,p_y_sum_overflow_p
-	fetch 3,mem_mouse_y_sum	//全负相加
-	branch p_y_store_pre_data
-p_y_sum_overflow_p:
-	jam 0,mem_mouse_y_sum+2
-	fetch 1,mem_mouse_y_sum
-	branch p_y_store_pre_data
-
-p_y_sum_n:
-	fetch 1,mem_mouse_y_sum	//sum negetive
-	call p_pdata_get_half
-	store 1,mem_mouse_y_pre
-	store 1,mem_mouse_y
-	branch p_y_data_zero,blank
-	setarg 0xff
-p_y_data_set_direction:	
-	store 1,mem_mouse_y_pre+1
-	store 1,mem_mouse_y+1
-	rtn
-p_y_data_zero:
-	setarg 0
-	branch p_y_data_set_direction
-
 //rega mouse_x, regb mouse_y, pdata refer
-p_mouse_data_greater_than_check:
+p_data_greater_than_check:
 	isub rega,null
-	nbranch p_mouse_enable_asm,positive
+	nbranch p_enable_asm,positive
 	isub regb,null
-	nbranch p_mouse_enable_asm,positive
-p_mouse_disable_asm:
+	nbranch p_enable_asm,positive
+p_disable_asm:
 	jam 0,mem_mouse_asm_flag
 	rtn
-p_mouse_data_less_than_check:
+p_data_less_than_check:
 	isub rega,null
 	nrtn positive
 	isub regb,null
 	nrtn positive
-	branch p_mouse_disable_asm
-p_mouse_enable_asm:
+	branch p_disable_asm
+p_enable_asm:
 	jam 1,mem_mouse_asm_flag
 	rtn
 
-p_mouse_data_abs_check:
-	call p_mouse_x_data_abs
-p_mouse_y_data_abs:
-	fetch 1,mem_mouse_y+1
-	beq 0xff,p_mouse_y_reversal
-	fetch 1,mem_mouse_y
-p_mouse_y_data_abs_store:
-	store 1,mem_mouse_y_abs
-	rtn
-p_mouse_x_data_abs:
-	fetch 1,mem_mouse_x+1
-	beq 0xff,p_mouse_x_reversal
-	fetch 1,mem_mouse_x
-p_mouse_x_data_abs_store:
-	store 1,mem_mouse_x_abs
-	rtn
-p_mouse_x_reversal:
+p_data_abs_check:
 	fetch 2,mem_mouse_x
-	sub pdata,0,pdata
-	branch p_mouse_x_data_abs_store
-p_mouse_y_reversal:
+	store 2,mem_data_current
+	call p_data_abs
+	copy pdata,rega
 	fetch 2,mem_mouse_y
+	store 2,mem_data_current
+	call p_data_abs
+	copy pdata,regb
+	rtn
+
+/***********
+input: data_current
+output:pdata,abs
+************/
+p_data_abs:
+	fetch 1,mem_data_current+1
+	beq 0xff,p_data_reversal
+	fetch 1,mem_data_current
+p_data_abs_store:
+	and_into 0xff,pdata
+	//output:pdata
+	rtn
+p_data_reversal:
+	fetch 2,mem_data_current
 	sub pdata,0,pdata
-	branch p_mouse_y_data_abs_store
+	branch p_data_abs_store
+
 endif
 /*
 p_hci_log:
Index: sched/mouse.dat
===================================================================
--- /branch/mouse_project/Standard/sched/mouse.dat	(revision 761)
+++ /branch/mouse_project/Standard/sched/mouse.dat	(working copy)
@@ -29,7 +29,7 @@
 #mem_patch3e:c0
 
 
-mem_device_option:42
+mem_device_option:43
 mem_lpm_mode:01
 mem_lpm_mult:20
 mem_lpm_mult_init:20
