Index: do.bat
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/do.bat	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/do.bat	(working copy)
@@ -90,11 +90,6 @@
 
 :genromrevc
 echo off
-
-perl ..\util\DeleteNote.pl ..\output\sched.rom
-perl ..\util\transform_name2addr.pl ..\output\sched.rom ..\output\sched.rom ..\output\memmap.format
-perl ..\util\sortsched.pl ..\output\sched.rom ..\output\sched.rom
-
 @echo Start to generate EEPROM code
 
 geneep -n ramcode.rom sched.rom 0 %enckey% c
Index: format/app_mouse.format
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/format/app_mouse.format	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/format/app_mouse.format	(working copy)
@@ -207,20 +207,6 @@
 1 mem_mouse_adc_last_low_voltage_flag
 1 mem_mouse_init_sensor_reset_flag
 
-1 mem_bt_rcvd_switch_req_accept
-1 mem_bt_send_max_slot_req_accept_after_switch
-1 mem_bt_send_lmp_setup_complete
-
-1 mem_l2cap_rcv
-1 mem_mouse_bt_boot_mode
-5 mem_mouse_bt_boot_data
-
-1 mem_mouse_bt_send_first_package_timer
-1 mem_mouse_bt_send_first_package_flag
-
-1 mem_mouse_asm_flag
-2 mem_mouse_x_pre
-2 mem_mouse_y_pre
 
 //modified pnp id
 1 mem_le_att_pnp_id_len
@@ -231,7 +217,6 @@
 1 mem_mouse_le_bb_connected_flag
 
 1 mem_mouse_fast_conn_flag
-1 mem_mouse_le_updata_not_accepted_flag
 )
 
 (
@@ -364,7 +349,6 @@
 0X04 P3212
 0X05 P3610
 0X06 P3065_XY
-0x07 MX8650
 
 
 //p3610 smart enable flag
@@ -417,11 +401,6 @@
 12 LE_INTERVAL_15MS
 9 LE_INTERVAL_11_25MS//11.25ms
 7 LE_INTERVAL_8_75MS//8.75ms
-6 LE_INTERVAL_7_5MS//7.5ms
-
-12 CLASSIC_INTERVAL_7_5MS
-14 CLASSIC_INTERVAL_8_75MS
-18 CLASSIC_INTERVAL_11_25MS
 )
 
 //ble fast conn 
@@ -429,4 +408,4 @@
 0x60 BLE_FAST_CONN_CHARACTER_HANDLE
 0x18 BLE_ADDR_OFFSET
 0x03 BLE_ADDR_LOOP
-)
+)
\ No newline at end of file
Index: format/bt.format
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/format/bt.format	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/format/bt.format	(working copy)
@@ -760,7 +760,6 @@
 42 mark_ble_rx_md
 43 mark_otp_encrypt
 44 mark_first_packet
-45 mark_role_switch_receive_fhs
 )
 
 (
Index: format/g24.format
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/format/g24.format	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/format/g24.format	(working copy)
@@ -451,7 +451,6 @@
 (
 81000 G24_8125_INTERVAL_PARAM
 78000 G24_78125_INTERVAL_PARAM
-12210 G24_4MS_INTERVAL_PARAM
 )
 
 (
Index: format/utility.format
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/format/utility.format	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/format/utility.format	(working copy)
@@ -146,10 +146,6 @@
 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/LeXiang/1068OnlyBLE/output/eeprom.dat	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/output/eeprom.dat	(working copy)
@@ -2,108 +2,76 @@
 02
 aa
 55
-4a
-17
+ba
+1a
 c2
 84
 00
-1a
-c0
-00
-80
-35
-c0
-01
-00
-3e
+12
 c0
 42
 85
-6b
+ba
 c0
 44
 85
-3c
-c0
-0d
-84
-20
-c0
-13
-04
-2d
-c0
-24
-04
-48
-c0
-25
-04
-4f
-c0
-2c
-84
-46
-c0
-28
-84
-58
-c0
-53
-84
-5d
-c0
-56
-84
-73
+76
 c0
-65
-b3
-e4
+00
+80
+29
 c0
-74
-84
-84
+01
+00
+32
 c0
 50
 80
-47
+3b
+c0
+54
+00
+40
 c0
 58
 80
-4c
+43
+c0
+59
+00
+4b
 c0
 62
 00
-7d
+c5
 c0
 64
 81
-17
+64
 c0
 65
 01
-1b
+68
 c0
 71
 82
-af
+c4
 c0
-73
-02
-e3
+74
+82
+d9
 c0
 75
 02
-ed
+ec
 c0
 75
-83
-00
+82
+fa
 c0
 76
 03
-27
+2a
 20
 20
 2a
@@ -111,67 +79,51 @@
 c0
 1c
 83
-2c
+2e
 c0
 21
 83
-34
+36
 c0
 25
 03
-3a
+3c
 c0
 2b
 83
-3d
+3f
 c0
 2c
 83
-4d
+51
 c0
 31
 83
-5a
+5e
 c0
 33
 03
-84
+88
 c0
 33
 83
-a3
+9f
 c0
 35
 03
-f0
+ec
 c0
 3b
 83
-fb
-c0
-7d
-04
-17
-c0
-02
-84
-97
-c0
-40
-04
-a6
-c0
-41
-04
-b0
+f7
 c0
-44
+46
 04
-db
+07
 c0
-46
+7d
 04
-0b
+13
 20
 20
 2a
@@ -183,11 +135,11 @@
 68
 08
 cc
-5e
+4c
 58
 00
 4c
-65
+53
 98
 40
 8a
@@ -211,7 +163,7 @@
 60
 08
 cc
-5e
+4c
 20
 60
 00
@@ -230,8 +182,8 @@
 d4
 20
 40
-01
-51
+00
+b9
 20
 40
 6a
@@ -283,7 +235,7 @@
 20
 3a
 00
-41
+35
 20
 20
 20
@@ -308,6 +260,18 @@
 20
 2a
 a2
+68
+00
+c8
+06
+24
+7a
+00
+00
+20
+20
+2b
+7f
 c6
 13
 00
@@ -316,8 +280,8 @@
 00
 c7
 9c
-20
-3a
+c0
+00
 7f
 ef
 68
@@ -336,98 +300,322 @@
 3a
 7f
 ef
+20
+20
+7f
+f1
+c6
+93
+00
+00
 68
 00
-c8
-06
+cc
+d1
+c0
+00
+80
+60
+20
+40
+04
+75
 24
-3a
-7f
-ef
+34
+00
+7b
 20
+40
+04
+5a
 20
-7f
-f1
-d8
 40
+04
+99
+68
 00
+cb
+a1
+c1
+ff
+80
 00
-df
 20
+40
+04
+f8
+68
 00
-08
-1a
-22
-0c
+cc
+d1
+c1
 00
-e8
-c0
 80
 00
-98
+20
 40
-84
-00
-c2
+2a
+fa
+68
+01
+c1
+6f
+20
+7a
 00
 00
-59
-18
-49
-7e
+68
 00
-1f
-e2
-04
+c0
+91
+20
+7a
 00
-c6
-93
 00
+20
+40
 00
-1f
-e6
-fc
-0a
+a0
 20
 40
-7f
-86
-18
-07
+00
+9d
+58
+00
+ec
+54
+20
+20
+2b
+93
+20
+40
+05
+bc
+24
+74
+00
+00
+20
+40
+00
+72
+68
+00
+cc
+d2
+1f
+e0
 fe
+01
+60
 00
+cc
+d2
 1f
-f2
-7e
+e6
+7c
+19
+20
+42
+80
+69
+20
+20
 00
-18
-07
-04
+4e
+70
+4c
+d1
 00
-98
+70
+4c
+d2
+00
+70
+4b
+cc
+00
+68
+00
+cb
+b7
+60
+00
+cb
+b6
+20
+60
+00
+00
+68
+00
+cb
+b8
+60
+00
+cb
+b6
+20
+60
+00
+00
+68
+00
+cb
+cc
+1f
+e0
+fe
+01
+60
+00
+cb
+cc
+c0
+02
+00
+6f
+c0
+02
+80
+6b
+20
+60
+00
+00
+70
+4c
+d1
+01
+70
+4c
+d2
+00
+20
+60
+00
+00
+68
+00
+cb
+bd
+20
+5a
+00
+87
+20
+40
+2a
+fa
+68
+01
+c1
+6f
+20
+7a
+00
+00
+68
+00
+c0
+91
+20
+7a
+00
+00
+20
+40
+00
+a0
+68
+04
+4b
+c0
+20
+40
+7f
+49
+60
+0a
 41
-84
+5b
+20
+20
+2b
+2a
+70
+4b
+bd
+01
+70
+4c
+c6
 00
 20
+40
+04
+22
 60
 00
+cb
+2d
+58
+00
+00
+00
+60
+03
+cb
+2e
+68
+02
+4b
+c8
+60
+02
+4b
+35
+70
+4b
+91
+0c
+68
 00
+cb
+92
+79
 20
+7e
+03
 60
 00
+cb
+92
+20
+40
+05
+f8
+20
+40
+04
+79
+20
+20
 00
+51
 c6
 13
 00
 00
 20
 40
-01
-47
+00
+ac
 20
 40
 00
-71
+a0
 68
 00
 c0
@@ -435,7 +623,7 @@
 c3
 00
 00
-6e
+9d
 68
 00
 80
@@ -459,11 +647,11 @@
 20
 40
 00
-7a
+a9
 20
 40
 00
-6e
+9d
 20
 40
 3e
@@ -503,31 +691,135 @@
 20
 20
 02
-b0
-20
-40
-34
-16
-20
-35
-80
-86
+c5
+d8
+c0
+18
+00
+d8
+a0
+48
+0a
 20
 40
-01
-69
-68
 00
-c1
+b7
+d8
+c0
+19
+00
+d8
+a0
+48
+25
+20
+40
+00
+b7
+d8
+c0
+1a
+00
+d8
+a0
+48
+40
+20
+40
+00
+b7
+d8
+c0
+1b
+00
+d8
+a0
+48
+5b
+df
+20
+00
+1b
+20
+20
+7f
+01
+d8
+c0
+48
+0a
+d8
+a0
+18
+00
+20
+40
+00
+b7
+d8
+c0
+48
+25
+d8
+a0
+19
+00
+20
+40
+00
+b7
+d8
+c0
+48
+40
+d8
+a0
+1a
+00
+20
+40
+00
+b7
+d8
+c0
+48
+5b
+d8
+a0
+1b
+00
+20
+20
+00
+b7
+20
+40
+34
+16
+20
+35
+80
+cf
+70
+80
+78
+20
+20
+40
+06
+94
+68
+00
+c1
 de
 60
 00
 cc
-5a
+48
 20
 40
 04
-ff
+e7
 68
 00
 c6
@@ -543,47 +835,31 @@
 20
 40
 00
-8b
+d1
 20
 20
 74
 b9
-68
-00
-cc
-5a
-60
-00
-c1
-de
-20
-60
-00
-00
 24
 55
-80
-d6
+81
+1b
 20
 40
 00
-b7
+fa
 20
 75
 80
 00
 20
 40
-05
-6d
-20
-40
 01
-36
+86
 20
 40
 01
-1f
+6c
 c6
 13
 00
@@ -591,11 +867,15 @@
 20
 20
 00
-93
-20
-40
+d8
+68
 00
-88
+cc
+48
+60
+00
+c1
+de
 68
 00
 c2
@@ -603,15 +883,15 @@
 c0
 19
 80
-98
+de
 c0
 1a
 00
-9b
+e1
 20
 20
 02
-5e
+1b
 68
 03
 41
@@ -626,7 +906,7 @@
 74
 70
 4b
-19
+08
 01
 70
 47
@@ -639,7 +919,7 @@
 68
 08
 cb
-1b
+0a
 18
 46
 7c
@@ -647,7 +927,7 @@
 24
 22
 80
-a2
+e8
 58
 00
 02
@@ -663,7 +943,7 @@
 20
 40
 00
-a8
+ee
 58
 00
 00
@@ -703,7 +983,7 @@
 20
 20
 00
-a9
+ef
 68
 02
 46
@@ -718,24 +998,12 @@
 7a
 c0
 7f
-80
-b4
-20
-20
-02
-b0
-68
-00
-c6
-e1
-60
-00
-c7
-7a
+bd
+66
 20
 20
-02
-b0
+3d
+80
 70
 42
 12
@@ -747,23 +1015,31 @@
 20
 40
 00
-b7
+fa
 20
 40
 40
 c0
+68
+00
+c6
+e0
+c0
+02
+c0
+d5
 20
 40
 40
 d9
 c0
 18
-00
-c5
+01
+0a
 c0
 18
-80
-c7
+81
+0c
 20
 40
 40
@@ -774,8 +1050,8 @@
 e8
 20
 20
+01
 00
-bb
 70
 4a
 fe
@@ -787,23 +1063,23 @@
 20
 40
 00
-b9
+fc
 20
 20
 64
 11
 20
 40
-00
-cc
+01
+11
 20
 20
 40
 e0
 20
 40
-00
-cc
+01
+11
 68
 00
 c6
@@ -835,7 +1111,7 @@
 20
 20
 00
-af
+f5
 58
 00
 00
@@ -862,8 +1138,8 @@
 13
 20
 40
-68
-a8
+04
+1c
 68
 10
 8a
@@ -886,8 +1162,8 @@
 1e
 20
 40
-00
-f8
+01
+45
 58
 00
 00
@@ -916,13 +1192,33 @@
 40
 58
 18
+68
+02
+46
+d3
+c2
+8a
+01
+2c
+20
+60
+00
+00
 20
 40
 65
 9c
-20
+68
+02
+46
+d3
+2f
+ef
+fe
+19
+24
 40
-65
+e5
 c2
 20
 40
@@ -931,19 +1227,27 @@
 20
 40
 01
-13
+60
 20
 40
-00
-ec
+02
+07
+20
+40
+65
+df
+20
+40
+01
+38
 68
 00
 cb
-1b
+0a
 c0
 7f
-80
-f4
+81
+40
 20
 60
 00
@@ -955,7 +1259,7 @@
 da
 20
 4b
-1b
+0a
 da
 40
 00
@@ -971,7 +1275,7 @@
 da
 20
 4b
-1b
+0a
 da
 40
 00
@@ -984,10 +1288,14 @@
 42
 10
 34
-5f
-ff
-ff
-ff
+58
+00
+00
+00
+1f
+e4
+7e
+00
 60
 03
 44
@@ -1115,7 +1423,7 @@
 20
 40
 02
-f0
+f2
 20
 20
 3d
@@ -1134,8 +1442,8 @@
 62
 20
 20
-65
-d1
+66
+06
 d8
 40
 00
@@ -1159,7 +1467,7 @@
 c3
 0f
 01
-26
+73
 68
 00
 8a
@@ -1171,15 +1479,15 @@
 24
 20
 81
-26
+73
 20
 40
 00
-b9
+fc
 20
 40
-00
-d0
+01
+15
 68
 00
 c7
@@ -1200,14 +1508,26 @@
 83
 00
 00
-79
-3f
+68
+02
+46
+d3
+c4
+08
 80
-26
-20
-60
-00
 00
+20
+40
+01
+7d
+20
+34
+05
+5f
+20
+20
+05
+5e
 df
 20
 00
@@ -1215,7 +1535,7 @@
 d8
 c0
 4b
-cb
+b9
 20
 40
 7f
@@ -1239,7 +1559,7 @@
 c2
 00
 01
-31
+81
 20
 60
 00
@@ -1247,7 +1567,15 @@
 58
 00
 01
-5a
+9b
+60
+01
+4c
+c2
+58
+00
+01
+9f
 60
 01
 41
@@ -1255,7 +1583,7 @@
 58
 00
 04
-05
+01
 60
 01
 41
@@ -1263,7 +1591,7 @@
 58
 00
 01
-88
+b2
 60
 01
 41
@@ -1271,7 +1599,7 @@
 58
 00
 00
-67
+96
 60
 01
 41
@@ -1279,7 +1607,7 @@
 58
 00
 01
-b1
+c7
 60
 01
 41
@@ -1287,7 +1615,7 @@
 58
 00
 01
-ae
+c4
 60
 01
 41
@@ -1295,7 +1623,7 @@
 58
 00
 02
-04
+20
 60
 01
 41
@@ -1303,91 +1631,39 @@
 58
 00
 02
-14
+2e
 60
 01
 41
 fd
-20
-60
-00
-00
-d8
-c0
-18
-00
-d8
-a0
-48
-0a
-20
-40
-01
-4f
-d8
-c0
-19
+58
 00
-20
-40
+3d
+36
+60
 01
-4f
-d8
-c0
-1a
-00
-20
-40
+42
 01
-4f
-d8
-c0
-1b
-00
-df
 20
+60
 00
-1b
-20
-20
-7f
-01
-d8
-c0
-48
-0a
-d8
-a0
-18
 00
 20
 40
+44
 01
-4f
-d8
-a0
-19
-00
-20
-40
+68
 01
-4f
-d8
-a0
-1a
-00
+46
+9f
 20
-40
-01
-4f
-d8
-a0
-1b
+7a
+00
 00
 20
 20
-01
-4f
+00
+78
 20
 40
 58
@@ -1399,11 +1675,11 @@
 68
 00
 cb
-1b
+0a
 c0
 7f
 81
-61
+a6
 68
 00
 c6
@@ -1423,7 +1699,7 @@
 20
 5a
 01
-ab
+c1
 68
 02
 46
@@ -1440,148 +1716,40 @@
 74
 00
 00
-20
-40
+68
 01
-83
+46
+9f
+24
+5a
+01
+af
 20
 20
+06
+99
+70
+48
+06
 01
-6e
 70
-47
-a0
+48
 07
-70
-47
-a1
-04
-58
-00
-47
-a0
-60
-01
-42
-18
-20
-20
-7e
-38
-da
-20
-46
-9a
-20
-40
-7e
-3d
-20
-54
-01
-72
+02
 20
 60
 00
 00
-68
+20
+77
 00
-c7
-c1
-1f
-e0
-fe
-01
-60
 00
-c7
+68
+00
 c1
+e2
 20
-60
-00
-00
-da
-20
-46
-9a
-20
-40
-7e
-54
-20
-34
-01
-7a
-20
-60
-00
-00
-20
-40
-56
-52
-68
-00
-c7
-c1
-1f
-e6
-7c
-01
-24
-41
-56
-50
-68
-00
-c7
-c1
-20
-7a
-00
-00
-1f
-e0
-ff
-ff
-60
-00
-c7
-c1
-20
-20
-3f
-90
-68
-01
-46
-9f
-20
-7a
-00
-00
-70
-48
-06
-01
-70
-48
-07
-0a
-20
-60
-00
-00
-20
-77
-00
-00
-68
-00
-c1
-e2
-20
-7a
+7a
 00
 00
 20
@@ -1599,7 +1767,7 @@
 20
 5a
 01
-ab
+c1
 68
 02
 46
@@ -1620,98 +1788,18 @@
 74
 00
 00
-20
-40
-01
-83
-68
-00
-cb
-03
-c0
-00
-81
-9a
-68
-00
-cb
-0a
-20
-7a
-00
-00
-20
-20
-3f
-81
-68
-00
-c6
-9a
-60
-00
-cb
-04
-68
-00
-c6
-9b
-e0
-a0
-80
-00
-68
-00
-c6
-9d
-e0
-a0
-80
-00
 68
 01
 46
 9f
-e0
-a1
-00
-00
-da
-20
-00
-07
-20
-40
-4d
-63
-68
+24
+5a
 01
-42
-4e
-e0
-a1
-00
-00
-58
-00
-02
-a1
-e0
-a1
-00
-00
-68
-02
-cb
-04
-e0
-a2
-80
-00
+af
 20
-60
-00
-00
+20
+3f
+81
 20
 40
 58
@@ -1722,8 +1810,8 @@
 01
 20
 20
-00
-c1
+01
+11
 20
 40
 7e
@@ -1743,62 +1831,42 @@
 c0
 0a
 01
-c0
+d1
 c0
 0a
 81
-c7
+d8
 c0
 14
 81
-d1
+e2
 c0
 19
 01
-d3
+e4
 c0
 20
 01
-da
-c0
-02
-01
-e8
-c0
-09
-81
-e8
-c0
-13
-81
-ef
-c0
-0c
-b3
-df
-c0
-10
-81
-f1
+eb
 c0
-00
+1c
 81
-f7
+f6
 c0
-01
-01
-fa
+1d
+02
+0f
 c0
-15
-81
-ff
+1e
+02
+1e
 20
 20
 41
 7d
 70
 4b
-1a
+09
 01
 68
 00
@@ -1807,31 +1875,31 @@
 24
 3a
 01
-c4
+d5
 70
 4b
-18
+07
 14
 20
 40
-00
-c1
+01
+06
 20
 40
-01
-69
+06
+94
 20
 20
 41
 c3
 70
 4b
-1a
+09
 00
 20
 40
 02
-10
+2a
 58
 00
 00
@@ -1854,8 +1922,8 @@
 00
 20
 40
-01
-69
+06
+94
 20
 40
 58
@@ -1879,15 +1947,15 @@
 c0
 00
 81
-d6
+e7
 20
 20
 01
-d8
+e9
 20
 40
 01
-d1
+e2
 70
 46
 c6
@@ -1921,9 +1989,9 @@
 7c
 0c
 20
-21
-01
-e6
+61
+00
+00
 58
 00
 00
@@ -1939,135 +2007,179 @@
 20
 40
 01
-d1
+e2
+20
+20
+03
+45
+20
+40
+01
+06
 70
 47
-c4
+8b
 01
+d8
+e0
+00
+03
 20
-60
+40
+43
+d2
+58
 00
 00
-70
-4b
-1c
-01
-20
-20
-03
-9a
-68
+00
+60
 01
+47
+07
+70
 46
-82
-c3
-86
-00
+a7
 00
-c3
-83
+68
 00
+c6
+e0
+1f
+e6
+7c
+05
+20
+42
+c0
+39
+24
+42
+c0
+5d
+68
 00
-c3
-85
-80
+cc
+48
+60
 00
+c1
+de
 68
-02
-46
-d3
-c3
-82
-80
 00
+80
+04
+c2
+89
+82
+0b
+20
+40
+02
+07
 20
 20
-33
-a7
+65
+d1
+da
 20
+4b
+b9
+da
 40
-43
-8e
-20
+00
+5b
+d8
+40
+00
+04
 20
-33
-a7
-68
+60
 00
-c8
-08
-c1
-01
+00
+da
+40
+4b
+b9
+ea
+42
 00
 00
-1f
-e0
-fe
-01
 60
-00
-c8
-08
-70
-41
-e3
-12
+02
+47
+7b
 20
 20
-34
-0e
+44
+35
+20
+40
+02
+2a
 70
+4c
+d1
+00
+68
+00
+cc
 48
-09
+60
 00
+c1
+de
 20
 40
+05
+60
+70
+41
+bd
 00
-c1
 20
+40
+43
+16
+df
 20
-42
-ca
-70
-4a
-ff
-00
-70
-4b
-01
-00
-70
-4b
-0a
 00
+03
+d8
+c0
+47
+22
 20
 40
+01
+7f
+20
+34
 02
-10
+1b
 20
 20
-41
-d9
-68
-00
-c8
-08
-c1
-81
-00
 00
+d8
 70
-48
-08
-00
+47
+9d
+01
 70
-41
-e3
-0e
+47
+9e
+28
 20
+60
+00
+00
 20
-34
-0e
+40
+01
+06
+20
+20
+3f
+8d
 78
 34
 7c
@@ -2091,7 +2203,7 @@
 20
 40
 02
-10
+2a
 20
 40
 74
@@ -2105,17 +2217,9 @@
 3e
 9f
 20
-40
-00
-73
-68
-08
-c6
-f3
-20
 20
-67
-ed
+3e
+bf
 68
 00
 ca
@@ -2130,32 +2234,44 @@
 00
 20
 20
-00
-d0
+01
+15
 20
 40
 02
-61
+73
 20
 40
 02
-92
+a7
 20
 40
 02
-35
+3b
 20
 40
 02
-55
+43
 20
 40
 02
-a0
+46
 20
 40
 02
-3a
+6a
+20
+40
+02
+4e
+20
+40
+02
+b5
+20
+40
+42
+31
 20
 40
 42
@@ -2166,76 +2282,16 @@
 37
 20
 40
-02
-2a
-20
-40
-02
-2d
-20
-40
-02
-22
-20
-40
-42
-31
-20
-40
-02
-25
-20
-20
 42
 3a
-da
-60
-48
-09
-da
-40
-63
-7a
 20
 20
-33
-6d
-da
-60
-4b
-09
-da
-40
 02
-28
-20
-20
-33
-6d
-70
 4b
-0a
-01
-20
-60
-00
-00
-da
-60
-46
-c6
-da
-40
-3d
-60
-20
-20
-33
-6d
 68
 00
 cb
-1a
+09
 20
 7a
 00
@@ -2243,11 +2299,11 @@
 da
 60
 4b
-18
+07
 da
 40
 02
-32
+40
 20
 20
 33
@@ -2255,7 +2311,7 @@
 68
 00
 cb
-19
+08
 24
 7a
 00
@@ -2267,11 +2323,23 @@
 da
 60
 48
+09
+da
+40
+63
+7a
+20
+20
+33
+6d
+da
+60
+48
 07
 da
 40
 02
-38
+49
 20
 20
 33
@@ -2284,6 +2352,18 @@
 60
 00
 00
+da
+60
+46
+c6
+da
+40
+3d
+60
+20
+20
+33
+6d
 68
 00
 c6
@@ -2299,7 +2379,7 @@
 c0
 03
 02
-46
+5a
 68
 00
 c6
@@ -2339,7 +2419,7 @@
 20
 40
 02
-49
+5d
 20
 20
 43
@@ -2351,11 +2431,15 @@
 da
 40
 02
-4c
+60
 20
 20
 33
 6d
+20
+40
+02
+2a
 68
 01
 46
@@ -2407,7 +2491,7 @@
 20
 3a
 02
-5c
+71
 1f
 e0
 ff
@@ -2428,18 +2512,6 @@
 20
 34
 0a
-70
-47
-9d
-01
-70
-47
-9e
-28
-20
-60
-00
-00
 68
 02
 46
@@ -2475,7 +2547,7 @@
 20
 40
 02
-78
+8a
 20
 40
 69
@@ -2491,7 +2563,7 @@
 20
 40
 02
-83
+98
 68
 00
 c2
@@ -2503,7 +2575,7 @@
 c3
 00
 02
-73
+85
 70
 4a
 fd
@@ -2539,7 +2611,7 @@
 c0
 01
 02
-7b
+8d
 20
 20
 68
@@ -2556,10 +2628,22 @@
 10
 80
 78
+70
+89
+71
+8f
+68
+00
+c2
+2e
+60
+10
+89
+73
 20
 40
 68
-f4
+f8
 68
 10
 80
@@ -2599,7 +2683,7 @@
 1f
 e0
 fe
-08
+06
 98
 46
 7c
@@ -2679,7 +2763,7 @@
 24
 21
 02
-9e
+b3
 20
 60
 00
@@ -2707,7 +2791,7 @@
 da
 40
 02
-a5
+ba
 20
 20
 33
@@ -2755,49 +2839,49 @@
 20
 40
 02
-dd
+d3
 68
 00
 c6
 e0
 c0
 02
-02
-ce
+bd
+aa
 c0
-03
 02
-be
+3d
+96
 c0
 03
-82
-be
-c0
-01
 02
-d5
+ca
+20
+20
+3d
+83
 68
 00
 c7
 7a
-1f
-e6
-7c
-01
 20
-42
-82
-bc
+5a
+02
+d1
 68
 00
 c7
 7a
 c0
 00
-3d
+bd
 8a
 c0
 01
+3d
+8c
+c0
+01
 bd
 8e
 20
@@ -2807,199 +2891,111 @@
 70
 47
 7a
-02
+01
 20
 60
 00
 00
 68
+02
+46
+d3
+c4
+0b
+80
 00
-c7
-7a
-1f
-e6
-7c
+70
+46
+df
 01
-20
-42
-82
-bc
 68
 00
-c7
-7a
-c0
-00
-02
-c8
-c0
-01
-82
-cb
-68
+c6
+f4
+60
 00
 c7
-81
-1f
-e0
-ff
-ff
+15
+20
 60
 00
-c6
-b5
-20
-20
-3d
-c1
-68
 00
-c7
-7f
-1f
-e0
-ff
-ff
-20
-20
-02
-c6
-68
+70
+48
+08
 00
-c7
-82
-1f
-e0
-ff
-ff
-20
+70
+41
+e3
+0e
 20
-02
-c6
+40
+41
+e7
 68
-00
-c7
-7a
-1f
-e6
-7c
 01
-20
 42
+08
+c2
+83
+c1
+f5
+c2
+80
+33
+a9
+c2
+80
 82
-bc
-68
-00
-c7
-7a
-c0
-00
-3d
-9d
-c0
-01
-bd
-a1
-20
-20
-3d
-9f
-68
-00
-c7
-7a
-20
-5a
+e3
+c2
+81
 02
-bc
-68
-00
-c7
-7a
-c0
-00
-bd
-88
-c0
-01
+e6
+c2
+81
 82
-db
+e6
 20
 20
-3d
-8e
-58
-00
-00
-05
+42
+b0
+c2
+82
+82
+e6
+c2
+81
+82
+e6
 20
 20
-3d
-be
+42
+b0
 68
-02
-46
-d3
-c4
-0b
-80
-00
-70
-46
-df
 01
-68
-00
-c6
-f4
-60
-00
-c7
-15
-20
-60
-00
-00
-78
-54
-7c
-00
-58
-00
-00
-00
-60
-03
 46
-9b
-20
-40
-3f
-b5
-20
-40
-40
-79
+82
+c2
+86
+42
+b0
 20
 40
-40
-7e
+33
+a9
 20
 40
 40
-99
-24
-34
-05
-6d
-20
-40
-05
-70
+83
+c0
+03
+82
+1b
 20
 20
-3f
-a0
+33
+a7
 70
 47
 9d
@@ -3008,6 +3004,18 @@
 47
 9e
 00
+c5
+13
+02
+f0
+20
+20
+42
+6d
+20
+40
+05
+60
 20
 20
 42
@@ -3023,15 +3031,15 @@
 20
 3a
 02
-f5
+f7
 60
 01
 47
 c2
 20
 20
-02
-f8
+03
+1d
 58
 00
 11
@@ -3043,51 +3051,23 @@
 20
 20
 02
-f4
-d8
-40
-00
-02
-da
-20
-47
-c2
-da
-40
-00
-5f
-20
-20
-65
-d1
-d8
-40
-00
-02
-da
-20
-47
-c2
-da
-40
-00
-5f
-20
-20
-65
-df
+f6
 70
 4b
-19
+08
+00
+68
 00
+cc
+48
+60
+00
+c1
+de
 70
 47
 9c
 00
-20
-40
-00
-88
 68
 01
 46
@@ -3095,7 +3075,7 @@
 c2
 85
 83
-0f
+0a
 68
 02
 46
@@ -3103,11 +3083,11 @@
 c3
 0c
 03
-0f
+0a
 20
 40
-02
-fc
+03
+21
 68
 09
 47
@@ -3126,8 +3106,8 @@
 a1
 20
 40
-02
-f8
+03
+1d
 18
 0a
 7e
@@ -3150,12 +3130,12 @@
 a3
 70
 4b
-1b
+0a
 5a
 20
 40
-00
-f0
+01
+3c
 20
 40
 34
@@ -3207,20 +3187,52 @@
 20
 40
 83
-22
+25
 20
 20
 42
 c4
-70
+d8
+40
+00
+02
+da
+20
 47
-9f
+c2
+da
+40
 00
+5f
 20
+20
+65
+d1
+d8
 40
 00
-a8
-58
+02
+da
+20
+47
+c2
+da
+40
+00
+5f
+20
+20
+65
+df
+70
+47
+9f
+00
+20
+40
+00
+ee
+58
 00
 00
 05
@@ -3240,14 +3252,10 @@
 01
 46
 ac
-70
-4a
-fe
-01
 20
 40
-00
-cc
+01
+11
 20
 20
 42
@@ -3278,8 +3286,8 @@
 1e
 20
 40
-05
-10
+04
+f8
 20
 20
 53
@@ -3315,7 +3323,7 @@
 20
 40
 00
-2b
+1f
 20
 20
 54
@@ -3323,7 +3331,7 @@
 20
 40
 03
-43
+47
 20
 20
 55
@@ -3344,6 +3352,14 @@
 60
 00
 00
+70
+47
+c4
+01
+20
+60
+00
+00
 68
 00
 c3
@@ -3354,8 +3370,8 @@
 0c
 24
 21
-01
-e4
+03
+45
 68
 00
 c3
@@ -3371,7 +3387,7 @@
 20
 21
 03
-3f
+41
 68
 00
 c3
@@ -3383,7 +3399,7 @@
 20
 20
 03
-41
+43
 68
 00
 84
@@ -3395,7 +3411,7 @@
 20
 40
 03
-52
+56
 24
 74
 00
@@ -3443,11 +3459,11 @@
 c2
 82
 83
-6e
+72
 20
 40
-05
-02
+04
+ea
 68
 00
 c7
@@ -3455,7 +3471,7 @@
 24
 3a
 03
-64
+68
 68
 00
 84
@@ -3463,7 +3479,7 @@
 c3
 02
 03
-68
+6c
 68
 00
 82
@@ -3471,7 +3487,7 @@
 20
 3a
 03
-68
+6c
 20
 20
 56
@@ -3499,7 +3515,7 @@
 c0
 82
 83
-6b
+6f
 70
 47
 8e
@@ -3510,8 +3526,8 @@
 92
 20
 5a
-01
-76
+06
+a1
 20
 20
 56
@@ -3519,11 +3535,11 @@
 20
 40
 03
-70
+74
 20
 20
 03
-7c
+80
 68
 00
 c6
@@ -3574,8 +3590,8 @@
 00
 20
 20
-05
-06
+04
+ee
 68
 00
 c7
@@ -3659,7 +3675,7 @@
 c0
 01
 83
-93
+97
 20
 20
 56
@@ -3670,44 +3686,12 @@
 db
 c0
 00
-03
-97
-c0
-00
 83
-9e
+9a
 20
 20
 5c
 65
-20
-40
-5c
-7b
-68
-00
-cb
-1c
-20
-7a
-00
-00
-68
-00
-c3
-d8
-60
-00
-c1
-72
-60
-00
-c7
-c5
-20
-60
-00
-00
 e8
 c2
 80
@@ -3735,11 +3719,11 @@
 c0
 02
 03
-a7
+a3
 c0
 03
 03
-e5
+e1
 20
 20
 56
@@ -3751,7 +3735,7 @@
 20
 40
 03
-7d
+81
 20
 40
 7e
@@ -3767,7 +3751,7 @@
 c0
 08
 03
-b6
+b2
 1f
 ec
 84
@@ -3779,7 +3763,7 @@
 20
 21
 03
-c4
+c0
 d8
 40
 47
@@ -3863,7 +3847,7 @@
 c0
 05
 03
-c6
+c2
 20
 20
 58
@@ -3879,7 +3863,7 @@
 c2
 81
 83
-de
+da
 20
 40
 57
@@ -3907,7 +3891,7 @@
 20
 22
 83
-d4
+d0
 68
 01
 04
@@ -3930,8 +3914,8 @@
 a5
 68
 00
-cb
-10
+ca
+ff
 1f
 e0
 a2
@@ -3950,8 +3934,8 @@
 00
 68
 00
-cb
-10
+ca
+ff
 1f
 e2
 72
@@ -3959,7 +3943,7 @@
 d8
 c0
 4b
-11
+00
 20
 20
 7f
@@ -3975,7 +3959,7 @@
 24
 22
 83
-c9
+c5
 20
 40
 5a
@@ -3983,7 +3967,7 @@
 24
 34
 03
-c9
+c5
 70
 04
 7a
@@ -3999,18 +3983,18 @@
 c0
 00
 83
-e9
+e5
 c0
 02
 83
-eb
+e7
 20
 20
 5a
-f6
+f5
 70
 4b
-19
+08
 01
 20
 20
@@ -4047,7 +4031,7 @@
 20
 40
 03
-f6
+f2
 d8
 e0
 00
@@ -4087,7 +4071,7 @@
 20
 37
 03
-fe
+fa
 24
 36
 d8
@@ -4211,7 +4195,7 @@
 c0
 09
 04
-1d
+19
 20
 20
 7d
@@ -4228,905 +4212,825 @@
 20
 5a
 bf
+20
+40
 68
+a8
+68
+02
+40
+a0
+60
+02
+4b
+c8
+20
+60
 00
-80
-0e
-1f
-e0
-fe
+00
+70
+4c
+c7
 01
+70
+4c
+c9
+00
+68
+00
+cb
+92
+1f
+e1
+7e
+07
 60
 00
-80
-0e
+cb
+92
 20
-40
-24
-35
+60
+00
+00
+68
+00
+cb
+92
 79
 20
+7e
+04
+60
 00
-2c
-20
-40
-22
-f2
+cb
+92
+60
+00
+cb
+4d
 20
-2c
-04
-2b
+60
+00
+00
+68
+00
+cb
+92
 79
 3f
-80
-2c
-20
-40
-24
-55
-24
-3a
+fe
 04
-24
-20
+60
+00
+cb
+92
 20
-20
-fc
-79
-3f
-80
-2c
-20
-20
-21
-5f
+60
+00
+00
 20
 40
-21
-c9
-24
-74
+04
+ee
+68
+00
+cc
+c8
+c0
+00
+84
+34
+c0
+01
+04
+38
+20
+60
 00
 00
-78
-54
-7c
+70
+4c
+c9
+02
+70
+4c
+c5
 00
 70
+4c
+c7
 00
-11
-20
-79
-3f
-80
-0b
-79
-3f
-80
-2d
 20
-40
-2a
-4f
-20
-40
-22
-e6
-c5
-05
-84
-3a
 20
-40
-24
-55
-24
-3a
 04
-33
-c5
-16
-84
-42
-20
-20
-21
-ec
-20
-40
-2a
-4d
-d8
-20
-00
-10
-20
-40
 22
-dc
-79
-20
-00
-2d
-79
-3f
-80
-0b
-18
-00
-08
-01
 70
+4c
+c6
 00
-11
-02
 20
 20
 04
-33
+35
 68
-02
 01
-65
+4b
+97
 1f
 e0
 fe
-08
+01
 60
-02
 01
-65
-20
-20
-21
-f8
-c5
-16
-26
-4d
-20
-20
-25
-8f
-20
-40
-33
-af
-20
-40
-26
-e9
-70
-0a
-99
-02
-20
-40
-7d
-86
-20
-40
-5c
-f7
-20
-40
-4d
-6b
-20
-20
-24
-6e
+4b
+97
+c2
+85
+04
+dc
 68
 00
-80
-30
-2f
-ef
-fe
+cc
+c6
+c0
 00
-20
-40
 84
-53
-20
-20
-24
-8a
+43
+70
+4c
+c6
+01
 68
 00
+cc
+c6
+c0
 80
-47
-2f
-ef
+84
+22
+68
+00
+cc
+c4
+1f
+e0
 fe
-03
+01
+60
+00
+cc
+c4
+c0
+02
+04
+4a
 20
 40
-85
 06
-24
-40
-85
+0a
+70
+4b
+d6
 02
 20
 20
-05
-10
-20
-40
-24
-f0
-24
-2c
-28
-f9
-20
-40
-29
-bb
+04
+99
 20
 40
+04
+ee
+70
+4c
+c4
 00
-2b
 20
 20
-25
-18
+04
+22
+70
+4c
+c9
+02
+70
+4c
+c7
+01
+70
+4c
 c6
-13
-00
 00
 20
-40
-2a
-fa
+20
+04
+22
 68
+00
+cc
+c8
+c0
 01
-c1
-6f
-20
-7a
+84
+4e
+68
 00
+cb
+92
+2f
+ec
 00
+04
+20
+20
+84
+20
 68
 00
+cc
+c8
 c0
-91
+00
+84
+4d
+c0
+01
+04
+4e
 20
-7a
+60
 00
 00
 68
 00
-c6
-5a
+cb
+a1
+c1
+ff
+80
+00
 20
-3a
+40
+04
+5f
+24
+56
 04
 67
-68
-00
-c5
-b1
 20
-7a
+60
 00
 00
+78
+56
+7c
+00
 68
 00
-c4
-c0
-24
-7a
+cc
+c7
+c1
+80
+80
 00
+68
 00
-20
-40
-2c
-3a
-24
-7a
+cc
+c9
+c1
+80
 00
 00
+70
+4c
+c8
+01
+70
+4b
+d6
+04
+20
+20
+7f
+eb
 68
 00
-c0
-40
-2f
-e0
-0e
-03
-24
+cc
+c9
 20
-ab
-9d
-68
-01
-40
-42
-d8
-40
+3a
+04
+6f
+1f
+e0
 ff
 ff
-98
-46
-7c
-00
-20
-62
-80
+60
 00
+cc
+c9
+70
+4c
+c8
+02
 20
+40
+06
+0a
+70
+4b
+d6
+04
 20
-2b
-7d
-78
-55
-fc
-00
-68
+60
 00
-80
-30
-c4
 00
-80
+70
+4c
+c8
+03
+68
 00
+cc
+c6
 24
-36
-ab
-d0
+3a
+04
+41
 20
 40
-2b
-cb
+06
+0a
+70
+4b
+d6
+02
+20
+60
+00
+00
 68
-01
+00
+cb
+a1
+c0
+ff
+85
+33
+20
 40
-c1
-60
+04
+7b
+20
+40
+05
+f8
+70
+4b
+96
 01
+20
+60
 00
-3e
-68
 00
-80
-47
+68
+01
+4c
 c2
-81
-ab
-de
-c5
-86
-ab
-de
 20
 40
-52
-74
-24
-3a
-2b
-de
+7f
+9c
 20
-5a
+34
 04
 81
+68
+03
+cb
+2e
+20
+7a
+00
+00
 20
 20
-2b
-be
+7f
+e7
 70
+4b
+bd
 00
-8a
+1a
+20
+fe
 01
-70
-00
-8b
+60
 00
+cb
+91
 20
+40
+04
+22
 60
 00
+cb
+2d
+e8
+a8
+80
 00
-70
-48
-08
-00
-70
-41
-e3
-0e
-20
+ea
 40
+80
+00
+98
 41
-e7
-68
-01
-42
-08
-c2
-83
-c1
-f5
-c2
-80
-33
-a9
-c2
+fe
+00
+e0
+a0
 80
-84
-8e
-c2
-81
-04
-91
-c2
-81
-84
-91
-20
-20
-42
-b0
-c2
-82
-84
-91
-c2
-81
-84
-91
-20
-20
-42
-b0
-68
-01
-46
-82
-c2
-86
-42
-b0
-20
-40
-33
-a9
-20
-40
+00
+1a
 40
-83
-c0
-03
-02
-5e
-20
-20
-33
-a7
-68
+a4
 01
+df
+20
+00
 02
-64
-1f
-e2
-0c
+ea
+41
 00
-e8
-c0
-80
 00
-60
+e0
+a1
 00
-cb
+00
+1a
+40
+a4
 02
-1f
-e1
-04
-0f
-1f
-f1
-fe
+c2
 00
-c0
-03
-84
-9f
-20
-20
-4d
-39
+04
+8c
+d8
+a0
+4b
+33
+df
 20
+00
+02
+ea
 40
-4d
-53
-70
-4b
-03
+80
 00
-68
+e8
+a8
+80
 00
-cb
-02
-2f
-ef
+98
+40
 fe
 00
+e0
+a0
+80
+00
+1a
+40
+a4
+01
+c2
+00
+04
+92
 20
 60
-80
+00
 00
 70
 4b
-03
-01
-20
+9a
+00
+d9
 60
+0d
 00
+34
+73
+02
 00
+20
+40
+04
+b5
 68
 00
-85
-52
-60
+cb
+cd
+c1
 00
+80
+00
+24
+2c
+04
+c4
+24
+37
 84
-c9
-c0
-09
-84
-aa
+c4
 20
+40
+04
+b0
 20
-5d
-b4
+40
+04
+e0
 20
 40
-5d
-cf
-70
-4a
-ff
-01
+04
+ea
 68
 00
 cb
+90
+1f
+e0
+fe
 01
+60
+00
+cb
+90
+68
+00
+cb
+a1
+c0
+ff
+84
+b3
 20
-7a
+40
+04
+51
+58
+00
+00
+00
+60
+01
+4b
+97
+60
 00
+cb
+99
+60
 00
+cc
+c5
 70
 4b
-01
-02
+96
+00
 20
 60
 00
 00
-78
-54
-7c
+df
+20
 00
+04
+d8
+a0
+4b
+2d
+20
+20
+7e
+c6
 20
 40
-62
-c1
-68
-00
-80
-48
+04
+e7
 20
-7a
-00
-00
-c2
-83
-84
-b9
-c0
-01
-84
-c9
-c0
-18
-84
-c5
-c0
-0b
-84
-c7
 20
+05
+4e
+78
+57
+fc
+00
 20
-60
-10
-c0
-42
-04
-bc
+40
+06
+73
+68
+00
+cb
+cd
 c0
-41
+00
 84
-bf
-20
-20
-60
-3f
-20
-40
-04
 c2
+18
+00
+2a
+00
 68
+02
+4b
+b9
+98
 00
+12
+00
+68
+08
 80
-48
+17
 20
+40
+29
+1f
 20
-60
-99
+40
+29
+24
 20
 40
-04
-c2
-68
-00
-80
-48
+06
+2d
 20
+57
+86
+6b
 20
-61
-0d
-68
+60
+00
 00
-c6
-5a
-20
-3a
-61
-2b
-20
 20
-61
-24
-70
-4b
-01
-01
+40
+06
+6b
 20
 20
-61
-c3
-70
-4b
-09
 04
-20
-20
-61
 a4
-18
-00
-7e
-02
-20
-40
-62
-98
 68
 00
-80
-49
+cb
+99
+1f
 e0
-a0
-80
-00
+fe
+01
 60
 00
-ca
-fc
-20
-40
-62
-a7
+cb
+99
 68
 00
-ca
-fc
+cb
+a1
 c0
-17
-04
-d2
-20
-20
+ff
+84
+d8
+68
+08
+cb
+9a
+18
+40
+84
+01
 60
-51
+08
+cb
+9a
 68
 00
-ca
-ff
-20
-7a
+cb
+d6
+98
+46
+7e
 00
+24
+3a
+04
+9a
+68
 00
-70
-4a
-ff
+cc
+c8
+c0
+01
+84
+3a
+68
+00
+cc
+c5
+1f
+e0
+fe
+01
+60
 00
+cc
+c5
+c0
+01
+04
+2f
+20
+40
+04
+26
+70
+4b
+d6
+01
+20
+20
+04
+99
 68
 00
 cb
-01
+99
 c1
-81
-00
+ff
+80
 00
 70
 4b
+99
 00
-01
-1c
-42
-7e
-00
-60
-02
-04
-e9
 20
-60
+20
+04
+de
+58
+00
 00
 00
+60
+01
+4b
+97
+70
+0a
+99
+3a
+20
+20
+7d
+86
 20
 40
-62
-bc
-24
-7a
-00
-00
+05
+69
 68
 00
-80
-55
+cb
+8f
 20
 7a
 00
 00
-c0
-02
-04
-fd
-c0
-08
-04
-e2
-20
-20
-63
-20
-68
-00
-c5
-5b
-c1
-00
-00
-00
-c0
-00
-84
-e6
-20
-20
-63
-5f
-20
-74
-80
-00
-68
+98
 00
-81
-6d
-c2
-80
-04
-ea
-20
-20
-63
-99
-68
+72
 00
-cb
-01
+d8
 c0
-00
-e3
-9d
-68
-00
-c1
-bd
-20
-3a
-63
-a9
-68
-00
-84
-d1
-c4
-01
-80
-00
-c4
-01
-00
-00
-68
-00
-cb
-00
-20
-7a
-00
-00
-70
 4b
-00
-00
-68
-02
-04
-e9
+0d
 d8
-40
-00
-14
-98
-40
-84
-00
-1c
-42
-7e
-00
-98
-46
-7c
-00
-24
-21
-04
-fb
-20
-20
-63
-49
-70
+a0
 4b
-00
-01
-20
-60
-00
-00
-70
-48
-09
-14
+6f
 20
 20
-63
-6f
+7f
+01
 70
 4c
-df
+cd
 01
 70
 4c
-dc
+ca
 00
 20
 60
@@ -5135,7 +5039,7 @@
 68
 00
 cc
-dc
+ca
 1f
 e0
 fe
@@ -5143,7 +5047,7 @@
 60
 00
 cc
-dc
+ca
 20
 60
 00
@@ -5151,19 +5055,19 @@
 68
 00
 cc
-dc
+ca
 1f
 e6
 7c
 02
 24
 41
-05
-0e
+04
+f6
 68
 00
 cc
-dc
+ca
 c1
 00
 00
@@ -5175,14 +5079,14 @@
 60
 00
 cc
-dc
+ca
 20
 60
 00
 00
 70
 4c
-dc
+ca
 03
 20
 60
@@ -5196,38 +5100,30 @@
 85
 80
 00
-c3
-83
-80
-00
-c3
-83
-00
-00
 da
 20
 4c
-65
+53
 20
 40
-00
-56
+05
+d9
 60
 08
 cc
-dd
-58
-00
-00
-82
-c5
-13
-05
-1a
-58
-00
-00
-80
+cb
+28
+0f
+fe
+26
+20
+40
+85
+08
+24
+40
+85
+0c
 98
 46
 7c
@@ -5235,11 +5131,11 @@
 24
 21
 05
-32
+20
 68
 00
 cc
-dc
+ca
 1f
 e6
 7c
@@ -5247,95 +5143,127 @@
 24
 21
 05
-22
+10
 68
 00
 cc
-dc
+ca
 c0
 00
 05
-33
+21
 20
 60
 00
 00
-68
+58
 00
-cc
-dc
-c1
-90
 00
+82
+20
+60
 00
-70
-4c
-dc
 00
-68
-08
-cc
-dd
 58
 00
 00
 77
-c5
-13
-05
-29
-58
-00
-00
-75
-98
-46
-7c
-00
-24
-61
+20
+60
 00
 00
-68
+58
 00
-cc
-df
-c0
 00
-05
-3a
-1f
-e0
-ff
-ff
+80
+20
 60
 00
-cc
-df
-c0
 00
-05
-3a
-70
-41
-de
+58
 00
+00
+75
 20
 60
 00
 00
-70
-4c
-dc
+68
+00
+cc
+ca
+c1
+90
+00
+00
+70
+4c
+ca
+00
+68
+08
+cc
+cb
+28
+0f
+fe
+26
+20
+40
+85
+0a
+24
+40
+85
+0e
+98
+46
+7c
+00
+24
+61
+00
 00
 68
 00
 cc
-df
+cd
+c0
+00
+05
+28
+1f
+e0
+ff
+ff
+60
+00
+cc
+cd
+c0
+00
+05
+28
+70
+41
+de
+00
+20
+60
+00
+00
+70
+4c
+ca
+00
+68
+00
+cc
+cd
 c0
 01
 05
-38
+26
 1f
 e0
 fe
@@ -5343,11 +5271,11 @@
 60
 00
 cc
-df
+cd
 c0
 00
 85
-30
+1e
 70
 41
 de
@@ -5364,2469 +5292,2468 @@
 60
 00
 00
-60
-08
-80
-17
-18
-40
-a2
-00
+79
 20
-40
-29
-81
-58
-00
-05
 00
+26
 20
 40
-2a
-8f
-70
-89
-06
-01
-70
-89
-00
-3c
+05
+2e
 70
-89
+4b
+a1
 01
-e0
 20
+60
 00
 00
-0a
-70
-89
-02
-01
 70
-89
-02
-3d
+41
+de
 20
+70
+4b
+90
 00
-00
-0a
 70
-89
-03
-b7
+4b
+9b
+4e
+68
+02
+4b
+9d
 20
+20
+05
+ea
+68
 00
+cb
+96
+c0
 00
-0a
-70
-89
-02
-7d
+ff
+e7
 68
 00
-c1
-de
+cb
+a1
 c0
-01
-05
-54
+00
+85
+3a
 c0
-02
+01
 05
-59
+3d
 c0
-10
-05
-68
-20
+01
+85
 40
-05
-5e
-70
-89
-55
-d0
+20
+20
+2a
+8c
 70
-89
-56
-e0
+4b
+a1
+11
 70
-89
-58
-6c
+11
+9e
+aa
 20
 20
-29
+05
+42
+70
 4b
+a1
+12
+70
+11
+9e
+55
+20
 20
-40
 05
-63
+42
 70
-89
-55
-d0
+4b
+a1
+13
 70
-89
-56
-e0
+11
+9e
+22
+68
+00
+cb
+92
+1f
+e1
+7e
+07
+60
+00
+91
+9f
+68
+02
+4b
+c8
+60
+02
+11
+a0
 70
-89
-58
-3c
+11
+a4
+00
+da
 20
+11
+9e
+d8
+40
+00
+07
 20
-29
-53
+40
+05
+64
 20
 40
 05
-5e
-70
-89
-55
-d0
-70
-89
-56
-c0
-70
-89
-58
-6c
+f8
 20
+40
+04
+79
 20
-29
-5b
-70
-89
-4c
-5b
-70
-89
-4d
-96
-70
-89
-4e
-2c
-70
-89
-4f
-46
 20
-60
+7f
+e7
+68
 00
+cb
+a1
+c1
+7f
+80
 00
-70
-89
-4c
-fb
-70
-89
-4d
-ef
-70
-89
-4e
-ec
-70
-89
-4f
-5e
+c0
+08
+85
+54
+c0
+09
+05
+56
+c0
+09
+85
+58
 20
 60
 00
 00
 70
-89
-56
-c2
-70
-89
-55
-d0
+4b
+a1
+02
 20
-60
-00
-00
-18
-00
-2a
-08
 20
+04
+aa
+70
+4b
+a1
+03
 20
-28
-fa
-df
 20
-00
-05
-d8
-a0
+04
+aa
+70
 4b
-0b
-20
+a1
+ff
+70
+0a
+99
+39
 20
-7e
-d4
+40
+7d
+86
 68
 02
-46
-9b
-20
-7a
-00
-00
+4b
+71
 20
 40
 05
-c1
-58
+ea
+20
+20
+04
+aa
+20
+60
 00
 00
-06
 20
-40
-05
-b4
-58
+60
 00
 00
-03
+79
+3f
+80
+26
 20
 40
-05
-ba
-68
-00
-cb
-0b
-c0
+53
+ce
+d8
+e0
 00
-85
-7a
+03
 20
 20
-05
-6d
-68
-01
+43
+d2
+60
+08
+cb
+91
+18
+42
+72
+00
+d8
+a0
 4b
+2d
+1a
+22
 0c
-60
+00
+20
+20
+7f
 01
-11
-be
 68
-01
-46
-9b
+00
+cb
+0c
+1f
+e9
+7e
+00
 60
+00
+cb
+8f
+1f
+e0
+fe
 01
-11
+d8
 c0
-20
-40
-05
-8d
-68
-01
-11
-be
-60
-01
 4b
 0c
-68
-01
-11
+98
 c0
+8c
+00
+e8
+c1
+80
+00
 60
 01
-46
-9b
-68
-01
-4b
-0e
-60
-01
-11
-be
+cb
+ce
 68
-01
-46
-9d
+00
+cb
+0c
+1f
+e3
+7e
+00
+1f
+e1
+7e
+03
 60
-01
-11
-c0
+00
+cb
+d4
 20
-40
-05
-8d
-68
-01
-11
-be
 60
-01
-4b
-0e
-68
-01
-11
-c0
+00
+00
 60
-01
-46
-9d
+08
+80
+17
+18
+40
+a2
+00
 20
-60
+40
+29
+81
+58
 00
+05
 00
-68
-01
-11
-be
-68
-09
-11
-c0
-98
+20
 40
-fe
+2a
+8f
+70
+89
+06
+01
+70
+89
 00
-60
+3c
+70
+89
 01
-91
-c2
-2f
-ef
-fe
-10
-20
+e0
 20
-85
-9a
-68
 00
-91
-c3
-c0
-7f
-85
-a1
-68
-00
-91
-c2
-1f
-e3
-7e
 00
-60
-01
-11
-be
-60
+0a
+70
+89
+02
 01
-11
-c0
+70
+89
+02
+3d
+20
+00
+00
+0a
+70
+89
+03
+b7
 20
-60
 00
 00
+0a
+70
+89
+02
+7d
 68
 00
-91
-c3
+c1
+de
 c0
 00
 05
-9e
-68
+8c
+c0
+00
+85
+94
+c0
 01
-91
-c2
-20
-20
 05
-96
-70
-11
-c4
-00
-68
-00
-91
-c2
+9c
+c0
+02
+05
+a4
+c0
+10
+05
+b6
 20
 20
 05
-96
-68
-00
-91
-c2
+8c
 20
 40
 05
 ac
-60
-00
-91
-be
-60
-00
-91
-c0
-20
-3a
-05
-aa
-58
-00
-00
-ff
-60
-00
-91
-bf
-60
-00
-91
-c1
-20
-60
-00
-00
+70
+89
+4b
+ba
+70
+89
+55
+d0
+70
+89
+56
+e0
+70
+89
+57
+88
+70
+89
 58
-00
-00
-00
+6c
+70
+89
+59
+10
 20
 20
-05
-a7
-1f
-e6
-7e
-00
-60
-00
-8a
-ae
-68
-00
-8a
-ae
-1f
-e3
-7e
-00
-60
-00
-8a
-ae
-68
-00
-8a
-ae
-1f
-e6
-7e
-00
+29
+4b
 20
-60
-00
-00
-9a
-26
-7c
-00
-24
-21
-05
-bf
-9a
-46
-7c
-00
-24
-21
+40
 05
-bf
+b1
 70
+89
 4b
-0b
-00
-20
-60
-00
-00
-9a
-26
-7c
-00
-24
-61
-00
-00
-9a
-46
-7c
-00
-24
-61
-00
-00
+ba
+70
+89
+55
+d0
+70
+89
+56
+e0
+70
+89
+57
+88
+70
+89
+58
+3c
+70
+89
+59
+10
 20
 20
+29
+4f
+20
+40
 05
-b8
+b1
 70
+89
 4b
-0b
-01
+ba
+70
+89
+55
+d0
+70
+89
+56
+e0
+70
+89
+57
+88
+70
+89
+58
+3c
+70
+89
+59
+10
 20
-60
-00
-00
-68
-01
-46
-9b
-60
-01
-11
-c0
+20
+29
+53
 20
 40
 05
-ca
-1f
-e2
-22
-00
-68
-01
-46
-9d
-60
-01
-11
+ac
+70
+89
+4b
+ba
+70
+89
+55
+d0
+70
+89
+56
 c0
+70
+89
+57
+88
+70
+89
+58
+6c
+70
+89
+59
+10
 20
-40
-05
-ca
-1f
-e2
-24
-00
+20
+29
+5b
+70
+89
+4c
+5b
+70
+89
+4d
+96
+70
+89
+4e
+2c
+70
+89
+4f
+46
 20
 60
 00
 00
-68
+70
+89
+4c
+fb
+70
+89
+4d
+ef
+70
+89
+4e
+ec
+70
+89
+4f
+5e
+20
+60
 00
-91
-c1
-c0
-7f
-85
-cf
-68
 00
-91
-c0
-1f
-e1
-7e
-ff
+70
+89
+4b
+ba
+70
+89
+56
+c2
+70
+89
+55
+d0
 20
 60
 00
 00
-68
-01
-11
-c0
-1f
-e6
-7e
+18
 00
+2a
+08
 20
 20
-05
-cd
-2b
-af
-aa
-55
-08
-00
-a1
-00
-00
+28
+fa
+20
+40
+7f
+e9
+68
+0a
+4b
+b2
+1c
+42
+7e
 00
+98
+46
+7c
 00
+24
+41
+2d
+18
+1f
+e2
+24
 00
+68
+02
+4b
+b2
+68
+08
+cb
+b6
+98
+40
+84
 00
+1a
+42
+7e
 00
+98
+46
+7c
 00
+24
+61
 00
-aa
-55
-01
 00
-6c
-0c
-ff
-aa
-55
-0a
+79
+3f
+fe
+1c
+60
+02
+4b
+b2
+20
+20
+7f
+e7
+20
+40
+29
+bb
+20
+7a
 00
+00
+68
+08
+cc
+4b
+da
+20
+0d
 9e
-11
+20
+40
+05
+d2
+60
+08
+cc
+4b
+20
+60
+00
 00
+1a
+22
+7e
 00
+98
+40
+8a
 00
+68
 00
+80
+18
+e0
+a0
+80
 00
+18
+40
+84
+01
+18
+41
+04
+07
+20
+60
 00
 00
+d8
+40
 00
 00
+df
+20
 00
-aa
-55
-21
+08
+1a
+22
+0c
 00
+e8
+c0
+80
 00
+98
 40
-06
+84
 00
+c2
 00
-08
-40
+05
+dc
+18
+49
+7e
 00
+1f
+e2
+04
 00
+c6
+93
 00
 00
-05
-02
-02
+1f
+e6
+fc
+0a
+20
+40
+7f
+86
+18
+07
+fe
 00
+1f
+f2
+7e
 00
+18
+07
+04
 00
+98
+41
+84
 00
 20
-02
+60
 00
 00
-82
 20
-02
-00
-10
-0e
+60
 00
 00
-48
-1e
+60
+02
+4b
+b9
+da
+20
 00
 00
+df
 20
-aa
-55
-0b
 00
-27
-40
-02
-08
-04
-80
-02
-c8
 04
+d8
+c0
+4b
+b9
+e8
+c0
 80
 00
-05
-11
-aa
-55
-01
+9a
+20
+a2
 00
-3f
-40
-04
-aa
-55
-02
+c2
 00
-91
-40
+05
+ee
+1a
+22
+7e
+00
+60
 01
-43
-aa
-55
-06
+4c
+42
+68
 00
-a0
+cc
+42
+68
+08
+cc
+43
+98
 40
-26
-10
-19
-20
-18
-10
-aa
-55
-18
+fe
 00
-ad
-40
-12
+60
 00
+cc
+44
+20
+60
 00
-02
-12
 00
+68
 00
+cb
+91
+1f
+e0
+fe
 02
+60
 00
+cb
+93
+68
 00
-20
-00
-00
-40
-20
+cb
+92
+60
 00
+cb
+4d
+68
 00
+cb
+91
+1f
+e9
+fe
 00
-80
+68
+08
+cb
+90
+18
+41
 04
+03
+18
+43
+84
+00
+98
+41
+fe
 00
+68
 08
-8f
-47
-aa
-55
-01
-00
-d1
+cb
+cd
+98
 40
-01
-aa
-55
-0b
+fe
 00
-72
-41
-20
+e0
+a0
+80
 00
+68
 00
-8f
-10
-ca
+cb
+91
+98
 00
-0a
-0b
-ef
-07
-aa
-55
-05
+72
 00
-e3
-41
+d8
+c0
+4b
+2d
+20
+20
+7f
+01
+68
+08
+cb
+9c
+20
+40
+06
 0e
+60
+08
+cb
+9c
+20
+60
+00
 00
+20
+40
+06
+12
+18
+40
+84
 01
+18
+41
+04
+03
+20
+60
 00
-02
-aa
-55
-05
 00
+68
+00
+cb
+b9
+1f
+e1
+7e
 03
-42
-90
 1f
+ef
+a2
+04
+58
 00
+4b
+a2
+9a
+20
+fe
 00
-06
-aa
-55
-04
+98
+40
+8c
 00
-11
-42
+e8
+c0
 80
 00
+60
 00
-ff
-aa
-55
-03
+cb
+9b
+20
+60
 00
-1a
-42
-01
-13
-47
-aa
-55
-02
 00
-2d
-42
-02
-32
-aa
-55
-01
+78
+44
+fc
 00
-3a
-42
-ff
-aa
+78
+43
+fc
+00
+58
 55
-02
+55
+55
+98
 00
-41
-42
+1e
 00
-84
-aa
-55
-1d
+68
 00
-6f
-43
+cb
+9b
 1f
-03
-19
-c2
-03
-02
+ed
+84
+00
+79
+20
+04
 01
-05
-03
-03
-12
 18
-10
-09
-42
-6c
-75
-65
-74
-6f
-6f
-74
-68
-20
-4d
-53
-35
-2e
-30
-aa
-55
-12
-00
-8f
 43
-1f
-10
-09
-42
-6c
-75
-65
-74
-6f
-6f
-74
-68
+1c
+00
 20
-4d
-53
-35
-2e
-30
-aa
-55
-10
+60
+00
 00
-af
-43
-0f
-42
-6c
-75
-65
-74
-6f
-6f
-74
-68
 20
-4d
+40
 53
-35
-2e
-30
-aa
-55
+c4
+68
 02
+4b
+b9
+98
 00
-6f
-44
-19
-00
-aa
-55
-01
-00
-8d
-44
-07
-aa
-55
-08
+12
 00
-96
-44
-07
+20
+40
+29
+18
+68
+08
+cb
+9b
+20
+40
+29
+1f
+58
 00
-07
+05
 00
 20
-00
-2c
-01
-aa
-55
+40
+2a
+8f
+20
+40
+29
+24
+20
+40
 06
+1b
+78
+57
+fc
 00
-a0
-44
-8e
-b1
-3a
-0e
-8e
-ed
-aa
-55
-01
-00
-e5
-44
-50
-aa
-55
-02
-00
-fa
-44
-22
-00
-aa
-55
-10
+78
+26
+fc
 00
-15
-45
-0f
-42
-6c
-75
-65
-74
-6f
-6f
-74
-68
-20
-4d
-53
-33
-2e
+78
 30
-aa
-55
-01
+fc
 00
-5a
-45
-0a
-aa
-55
-04
+78
+50
+7c
 00
-5a
-46
-01
-03
+78
+28
+7c
 00
-04
-aa
-55
+68
 01
+4b
+94
+98
 00
-62
-46
-03
-aa
-55
-05
+36
 00
+37
+c1
 84
-46
-01
-1e
-ff
-08
-07
-aa
-55
-07
 00
-a5
+24
+2c
+06
+6f
+78
 46
-07
+fc
 00
+78
+25
+fc
 00
-50
+78
+23
+fc
 00
-70
-17
-aa
-55
-05
+78
+24
+fc
 00
-d2
-46
-02
+09
+80
+00
+08
+19
+89
+7e
 00
+60
 00
-90
+cc
 45
-aa
-55
-1e
-00
-db
+68
+08
+cc
+44
+98
 46
-01
-ff
-00
-00
+7c
 00
+24
+22
+86
+6b
+09
+80
 00
-02
-07
-03
-02
-17
-18
-1c
-04
-06
-ff
-ff
-ff
-ff
-ff
-08
 08
-ff
-ff
-1b
-08
-04
-00
-ff
-ff
-aa
-55
-01
-00
-03
-47
-02
-aa
-55
-06
+19
+89
+7e
 00
-09
-47
-96
+60
 00
-5a
+cb
+0b
+68
 00
-64
+cb
+d7
+1f
+e6
+7c
+02
+20
+22
+86
+4b
+68
 00
-aa
-55
+cb
+0b
+68
 08
+cb
+92
+a8
+40
+0e
 00
+24
 20
-47
-01
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-aa
-55
+86
+6b
+09
+80
+00
 08
+19
+89
+7e
 00
-7f
-47
-01
-02
-03
-04
-15
-1a
+e0
+a0
+80
+00
+1f
+e9
+7e
+00
+1f
+e1
+72
+1f
+20
 22
-2a
-aa
+86
 55
-0e
+09
+80
+00
+08
+19
+89
+7e
 00
-8e
-47
-03
-4b
-ba
-55
-d0
-56
 e0
-57
-88
-58
-6c
-59
-10
-ff
-aa
-55
-41
+a0
+80
 00
-c5
-47
-20
-25
+c2
 00
-02
-03
-28
-01
-12
-26
+06
+51
+18
+a2
+22
 00
-02
-4d
-2a
-07
+09
+80
 00
+08
+19
+89
+7e
 00
+60
 00
+cc
+cc
+1a
+22
+0a
 00
+09
+80
 00
+18
+78
+28
+7c
 00
+db
+60
+06
+64
+1f
+ef
+7e
 00
-27
+1f
+f1
+7e
 00
-02
-02
-29
-02
+e0
+a1
+80
 00
+78
+45
+fc
 00
-28
+20
+23
+06
+6b
+78
+37
+fc
 00
-02
-08
-29
-02
-11
-01
-29
+68
 00
-02
-03
-28
-01
-0e
-2a
+80
+17
+1f
+e0
+a2
 00
-02
-4d
-2a
-07
+20
+40
+29
+81
+78
+46
+fc
+00
+20
+40
+29
+18
+68
 00
+cc
+cc
+20
+40
 00
+1f
+20
+60
 00
 00
+78
+4d
+fc
 00
+78
+45
+fc
 00
+20
+40
+26
+4d
+20
+60
 00
-2b
 00
-02
-08
+20
+20
+06
+6b
+20
+40
 29
-02
-11
-02
-aa
-55
+18
+68
 08
-00
-10
-4b
-07
+cb
+9b
+20
+20
+29
+33
+20
+40
+53
+c4
+68
 02
-35
-12
-22
-aa
-01
-00
-aa
-55
-04
-00
-a4
 4b
-01
+b9
+98
 00
-c0
 12
-aa
-55
-15
 00
-af
-4b
 20
-15
-10
-05
-ff
-00
-13
-2c
-42
+40
 06
-15
-36
-48
-0f
-1a
-3a
-4c
-11
-23
+1b
+20
+40
+06
+70
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+19
 31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+fe
+00
+08
+00
+86
+28
+78
+4e
+fc
+00
+78
+2d
+fc
+00
+78
+23
+fc
+00
+78
+24
+fc
+00
+68
+00
+cc
+44
+08
+00
+86
+08
+68
+00
+cb
+93
+98
+00
+72
+00
+d8
+c0
+4b
+4d
+e8
+c0
+80
+00
+08
+00
+86
+08
+c2
+00
+06
+89
+78
+24
+7c
+00
+08
+00
+86
+18
+78
+44
+7c
+00
+37
+d3
+82
+00
+20
+00
+00
+64
+78
+4e
+fc
+00
+78
 4d
+fc
+00
+20
+60
+00
+00
+70
+47
+a0
+07
+70
+47
+a1
+04
+58
+00
+47
+a0
+60
+01
+42
+18
+20
+20
+7e
+38
+da
+20
+46
+9a
+20
+40
+7e
+3d
+20
+54
+06
+9d
+20
+60
+00
+00
+68
+00
+c7
+c1
+1f
+e0
+fe
+01
+60
+00
+c7
+c1
+20
+60
+00
+00
+da
+20
+46
+9a
+20
+40
+7e
+54
+20
+34
+06
+a5
+20
+60
+00
+00
+20
+40
+56
+52
+68
+00
+c7
+c1
+1f
+e6
+7c
+01
+24
+41
+56
+50
+68
+00
+c7
+c1
+20
+7a
+00
+00
+1f
+e0
+ff
+ff
+60
+00
+c7
+c1
+20
+20
+3f
+90
+fe
+6c
 aa
 55
-03
+08
 00
-c8
-4b
-19
-19
-1c
+75
+41
+8f
+10
+ca
+00
+0a
+0b
+ef
+07
 aa
 55
-03
+01
 00
-d2
-4b
+57
+41
 00
-48
-60
 aa
 55
-02
+08
 00
-e8
-4b
-04
-01
-a0
-37
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+a1
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+02
+00
+bd
+40
+02
+24
+aa
+55
+08
+00
+ad
+40
+12
+00
+00
+02
+12
+00
+00
+02
+aa
+55
+02
+00
+bb
+40
+20
+00
+aa
+55
+04
+00
+b7
+40
+20
+00
+00
+40
+aa
+55
+04
+00
+bf
+40
+80
+04
+00
+08
+aa
+55
+01
+00
+ce
+4c
+00
+aa
+55
+02
+00
+41
+42
+00
+84
+aa
+55
+01
+00
+de
+41
+00
+aa
+55
+0d
+00
+8f
+47
+4b
+ba
+55
+d0
+56
+e0
+57
+88
+58
+6c
+59
+10
 ff
+aa
+55
+02
+00
+c3
+40
+8f
+47
+aa
+55
+01
+00
+00
+40
+06
+aa
+55
+01
+00
+03
+40
+00
+aa
+55
+03
+00
+09
+40
+00
+00
+00
+aa
+55
+02
+00
+10
+40
+20
+02
+aa
+55
+03
+00
+14
+40
+02
+01
+06
+aa
+55
+02
+00
+18
+40
+10
+06
+aa
+55
+02
+00
+1c
+40
+08
+1e
+aa
+55
+08
+00
+27
+40
+02
+08
+04
+80
+02
+c8
+04
+80
+aa
+55
+02
+00
+30
+40
+00
+10
+aa
+55
+01
+00
+39
+40
+00
+aa
+55
+01
+00
+3f
+40
+04
+aa
+55
+01
+00
+92
+40
+42
+aa
+55
+01
+00
+91
+40
+01
+aa
+55
+01
+00
+72
+41
+20
+aa
+55
+01
+00
+c5
+47
+20
+aa
+55
+02
+00
+54
+41
+00
+00
+aa
+55
+02
+00
+d5
+46
+90
+45
+aa
+55
+01
+00
+07
+42
+06
+aa
+55
+06
+00
+a0
+40
+26
+10
+19
+20
+18
+10
+aa
+55
+0d
+00
+15
+45
+0c
+42
+54
+20
+33
+2e
+30
+20
+4d
+6f
+75
+73
+65
+aa
+55
+05
+00
+e3
+41
+0e
+00
+01
+00
+02
+aa
+55
+01
+00
+5a
+45
+0a
+aa
+55
+01
+00
+62
+46
+03
+aa
+55
+01
+00
+5a
+46
+01
+aa
+55
+01
+00
+8d
+45
+00
+aa
+55
+01
+00
+5a
+41
+00
+aa
+55
+03
+00
+5b
+46
+03
+00
+04
+aa
+55
+01
+00
+84
+46
+01
+aa
+55
+01
+00
+d1
+40
+01
+aa
+55
+1d
+00
+6f
+43
+1f
+03
+19
+c2
+03
+02
+01
+05
+03
+03
+12
+18
+10
+09
+42
+6c
+75
+65
+74
+6f
+6f
+74
+68
+20
+4d
+6f
+75
+73
+65
+aa
+55
+12
+00
+8f
+43
+1f
+10
+09
+42
+6c
+75
+65
+74
+6f
+6f
+74
+68
+20
+4d
+6f
+75
+73
+65
+aa
+55
+10
+00
+af
+43
+0f
+42
+6c
+75
+65
+74
+6f
+6f
+74
+68
+20
+4d
+6f
+75
+73
+65
+aa
+55
+08
+00
+96
+44
+07
+00
+07
+00
+20
+00
+2c
+01
+aa
+55
+04
+00
+82
+44
+00
+00
+00
+00
+aa
+55
+01
+00
+8d
+44
+07
+aa
+55
+06
+00
+a0
+44
+8e
+b1
+3a
+0e
+8e
+ed
+aa
+55
+01
+00
+e5
+44
+50
+aa
+55
+02
+00
+6f
+44
+19
+00
+aa
+55
+02
+00
+fa
+44
+22
+00
+aa
+55
+02
+00
+87
+46
+08
+07
+aa
+55
+04
+00
+a8
+46
+50
+00
+70
+17
+aa
+55
+01
+00
+14
+42
 ff
+aa
+55
+01
+00
+86
+46
 ff
+aa
+55
+01
+00
+85
+46
+1e
+aa
+55
+01
+00
+d2
+46
+02
+aa
+55
+01
+00
+03
+47
+02
+aa
+55
+02
+00
+2d
+42
+02
+32
+aa
+55
+06
+00
+09
+47
+96
+00
+5a
+00
+64
+00
+aa
+55
+19
+00
+e0
+46
+00
+02
+07
+03
+02
+17
+18
+1c
+04
+06
 ff
 ff
 ff
 ff
 ff
+08
+08
 ff
 ff
+1b
+08
+04
+00
 ff
+05
+aa
+55
+01
+00
+3a
+42
 ff
+aa
+55
+01
+00
+dc
+46
 ff
+aa
+55
+01
+00
+a5
+46
+07
+aa
+55
+01
+00
+6c
+0c
 ff
+aa
+55
+01
+00
+fd
+46
+19
+aa
+55
+01
+00
+f5
+46
+04
+aa
+55
+0c
+00
+7f
+47
+00
+01
+02
+03
+15
+1a
+22
+2a
+04
+05
+07
+08
+aa
+55
+02
+00
+1b
+42
+13
+47
+aa
+55
+01
+00
+1a
+42
+01
+aa
+55
+40
+00
+c6
+47
+25
+00
+02
+03
+28
+01
+12
+26
+00
+02
+4d
+2a
+07
+00
+00
+00
+00
+00
+00
+00
+27
+00
+02
+02
+29
+02
+00
+00
+28
+00
+02
+08
+29
+02
+11
+01
+29
+00
+02
+03
+28
+01
+0e
+2a
+00
+02
+4d
+2a
+07
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+02
+08
+29
+02
+11
+02
+aa
+55
+08
+00
 ff
+4a
+07
+02
+35
+12
+22
+aa
+01
+00
+aa
+55
+01
+00
+d7
+4b
+01
+aa
+55
+01
+00
+92
+4b
+01
+aa
+55
+01
+00
+d6
+4b
+04
+aa
+55
+01
+00
+cd
+4b
+00
+aa
+55
+02
+00
+94
+4b
+c0
+12
+aa
+55
+03
+00
+b6
+4b
+19
+19
+1c
+aa
+55
+10
+00
+a2
+4b
+00
+13
+2c
+42
+06
+15
+36
+48
+0f
+1a
+3a
+4c
+11
+23
+31
+4d
+aa
+55
+01
+00
+a1
+4b
 ff
+aa
+55
+04
+00
+9d
+4b
+20
+15
+10
+05
+aa
+55
+0a
+00
+9e
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+08
+00
+c0
+4b
+00
+48
+60
+00
+00
+00
+00
+00
+aa
+55
+08
+00
+20
+47
+01
 ff
 ff
 ff
@@ -7834,6 +7761,79 @@
 ff
 ff
 ff
+aa
+55
+07
+00
+3e
+47
+34
+11
+22
+33
+44
+55
+66
+aa
+55
+07
+00
+5b
+47
+34
+11
+22
+33
+44
+55
+66
+aa
+55
+03
+00
+00
+47
+00
+70
+00
+aa
+55
+02
+00
+03
+42
+80
+1f
+aa
+55
+01
+00
+11
+42
+80
+aa
+55
+01
+00
+1f
+47
+00
+aa
+55
+01
+00
+db
+46
+01
+aa
+55
+01
+00
+8e
+47
+03
+d1
+26
 ff
 ff
 ff
@@ -16380,5 +16380,5 @@
 ff
 ff
 ff
-e3
-1f
+3e
+25
Index: output/memmap.format
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/output/memmap.format	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/output/memmap.format	(working copy)
@@ -599,9 +599,6 @@
 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
@@ -1755,137 +1752,125 @@
 0x4afc mem_lmi_opcode_temp
 0x4afd mem_mouse_adc_last_low_voltage_flag
 0x4afe mem_mouse_init_sensor_reset_flag
-0x4aff mem_bt_rcvd_switch_req_accept
-0x4b00 mem_bt_send_max_slot_req_accept_after_switch
-0x4b01 mem_bt_send_lmp_setup_complete
-0x4b02 mem_l2cap_rcv
-0x4b03 mem_mouse_bt_boot_mode
-0x4b04 mem_mouse_bt_boot_data
-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_pre
-0x4b0e mem_mouse_y_pre
-0x4b10 mem_le_att_pnp_id_len
-0x4b11 mem_le_att_pnp_id
-0x4b18 mem_mouse_send_secutiry_request_timer
-0x4b19 mem_le_send_security_request_flag
-0x4b1a mem_mouse_le_bb_connected_flag
-0x4b1b mem_mouse_fast_conn_flag
-0x4b1c mem_mouse_le_updata_not_accepted_flag
-0x4b1d mem_24g_rxbuf
-0x4b3f mem_24g_txbuf
-0x4b5f mem_24g_txpayload
-0x4b81 mem_24g_rxpayload
-0x4ba1 mem_24g_rxdata_length
-0x4ba2 mem_24g_pid
-0x4ba3 mem_24g_datalen
-0x4ba4 mem_24g_data_type
-0x4ba5 mem_24g_txlen
-0x4ba6 mem_24g_rx_window
-0x4ba8 mem_24g_ensure
-0x4ba9 mem_24g_txfail_cnt
-0x4bab mem_24g_get_ack_fail
-0x4bac mem_24g_retry
-0x4bad mem_24g_ch
-0x4bae mem_24g_current_ch_number
-0x4baf mem_24g_paring_addr
-0x4bb3 mem_24g_pairing_sm
-0x4bb4 mem_24g_ch_map1
-0x4bb8 mem_24g_ch_map2
-0x4bbc mem_24g_ch_map3
-0x4bc0 mem_24g_ch_map4
-0x4bc4 mem_24g_tx_btclk
-0x4bc8 mem_24g_interval
-0x4bc9 mem_24g_interval_min
-0x4bca mem_24g_interval_max
-0x4bcb mem_24g_addr
-0x4bcf mem_24g_abort_pac
-0x4bd0 mem_24g_check_dongle_times
-0x4bd2 mem_24g_enter_hibernate
-0x4bda mem_24g_device_addr
-0x4bde mem_24g_pac_index
-0x4bdf mem_24g_no_ack
-0x4be0 mem_24g_sta_crc
-0x4be3 mem_24g_last_crc
-0x4be6 mem_24g_sta_pid
-0x4be7 mem_24g_last_pid
-0x4be8 mem_24g_max_retry
-0x4be9 mem_24g_mode
-0x4bea mem_24g_rxdata_temp
-0x4c0c mem_24g_rx_addr
-0x4c10 mem_dongle_mode_init
-0x4c11 mem_dongle_work_mode
-0x4c12 mem_dongle_ms_bind_step
-0x4c13 mem_dongle_kb_bind_step
-0x4c14 mem_dongle_bind_device_status
-0x4c15 mem_24g_bind_payload
-0x4c1d mem_24g_abort_packet
-0x4c1e mem_24g_rf_laststa
-0x4c1f mem_24g_hop_btclk
-0x4c23 mem_24g_hop_interval
-0x4c24 mem_24g_mode_switch
-0x4c25 mem_24g_ackpayload_enable
-0x4c26 mem_24g_hop_packet
-0x4c27 mem_24g_pair_mode
-0x4c28 mem_24g_nodata_timer_enable
-0x4c29 mem_24g_time_slice
-0x4c2a mem_24g_kb_data_sta_data
-0x4c32 mem_24g_kb_data_last_data
-0x4c3a mem_24g_kb_multikey_sta_data
-0x4c3d mem_24g_kb_multikey_last_data
-0x4c40 mem_24g_kb_blank_data_enable
-0x4c41 mem_24g_kb_mul_blank_data_enable
-0x4c42 mem_24g_ms_blank_data_enable
-0x4c43 mem_24g_kb_addr
-0x4c47 mem_24g_ms_addr
-0x4c4b mem_24g_dg_last_ch
-0x4c4c mem_24g_dg_ch_number
-0x4c4d mem_24g_dg_config_ch_once
-0x4c4e mem_24g_kb_last_ch
-0x4c4f mem_24g_kb_ch_number
-0x4c50 mem_24g_kb_config_ch_once
-0x4c51 mem_24g_ms_last_ch
-0x4c52 mem_24g_ms_ch_number
-0x4c53 mem_24g_ms_config_ch_once
-0x4c54 mem_24g_syncword
-0x4c56 mem_24g_syncword_crc8
-0x4c57 mem_24g_get_syncword_crc8
-0x4c58 mem_24g_ota_sta_pid
-0x4c5a mem_tx_power_temp
-0x4c5b mem_rssi_hex
-0x4c5c mem_rssi_noise_avg
-0x4c5d mem_rssi_noise_index
-0x4c5e mem_rssi_signal_index
-0x4c5f mem_rssi_noise_dg_avg
-0x4c60 mem_rssi_noise_kb_avg
-0x4c61 mem_rssi_noise_ms_avg
-0x4c62 mem_rssi_noise_dg_index
-0x4c63 mem_rssi_noise_kb_index
-0x4c64 mem_rssi_noise_ms_index
-0x4c65 mem_rssi_signal_buf
-0x4c6d mem_queue_ele_num
-0x4c6e mem_queue_read
-0x4c70 mem_queue_write
-0x4c72 mem_queue_start
-0x4c72 mem_data_ele0
-0x4c92 mem_data_ele1
-0x4cb2 mem_data_ele2
-0x4cd2 mem_queue_end
-0x4cd2 mem_queue_temp
-0x4cd4 mem_cb_24g_data
-0x4cd6 mem_24g_hop_fastly_cnt
-0x4cd7 mem_24g_hop_pac_retry
-0x4cd8 mem_24g_rf_hop_ch
-0x4cd9 mem_24g_rf_last_sta
-0x4cda mem_24g_rf_work_stage
-0x4cdb mem_24g_sync_cnt
-0x4cdc mem_power_ctrl_pac_succ_cnt
-0x4cdd mem_rssi_avg_received
-0x4cde mem_rssi_hex_received
-0x4cdf mem_power_ctrl_level
-0x4ce0 mem_seqi
-0x4ce1 mem_24g_auto_paring_switch
-0x4ce2 mem_24g_paccnt
-0x4ce3 mem_24g_transmit_by_interrupt
-0x4ce4 mem_24g_transmit_by_interrupt_exit_count
+0x4aff mem_le_att_pnp_id_len
+0x4b00 mem_le_att_pnp_id
+0x4b07 mem_mouse_send_secutiry_request_timer
+0x4b08 mem_le_send_security_request_flag
+0x4b09 mem_mouse_le_bb_connected_flag
+0x4b0a mem_mouse_fast_conn_flag
+0x4b0b mem_24g_rxbuf
+0x4b2d mem_24g_txbuf
+0x4b4d mem_24g_txpayload
+0x4b6f mem_24g_rxpayload
+0x4b8f mem_24g_rxdata_length
+0x4b90 mem_24g_pid
+0x4b91 mem_24g_datalen
+0x4b92 mem_24g_data_type
+0x4b93 mem_24g_txlen
+0x4b94 mem_24g_rx_window
+0x4b96 mem_24g_ensure
+0x4b97 mem_24g_txfail_cnt
+0x4b99 mem_24g_get_ack_fail
+0x4b9a mem_24g_retry
+0x4b9b mem_24g_ch
+0x4b9c mem_24g_current_ch_number
+0x4b9d mem_24g_paring_addr
+0x4ba1 mem_24g_pairing_sm
+0x4ba2 mem_24g_ch_map1
+0x4ba6 mem_24g_ch_map2
+0x4baa mem_24g_ch_map3
+0x4bae mem_24g_ch_map4
+0x4bb2 mem_24g_tx_btclk
+0x4bb6 mem_24g_interval
+0x4bb7 mem_24g_interval_min
+0x4bb8 mem_24g_interval_max
+0x4bb9 mem_24g_addr
+0x4bbd mem_24g_abort_pac
+0x4bbe mem_24g_check_dongle_times
+0x4bc0 mem_24g_enter_hibernate
+0x4bc8 mem_24g_device_addr
+0x4bcc mem_24g_pac_index
+0x4bcd mem_24g_no_ack
+0x4bce mem_24g_sta_crc
+0x4bd1 mem_24g_last_crc
+0x4bd4 mem_24g_sta_pid
+0x4bd5 mem_24g_last_pid
+0x4bd6 mem_24g_max_retry
+0x4bd7 mem_24g_mode
+0x4bd8 mem_24g_rxdata_temp
+0x4bfa mem_24g_rx_addr
+0x4bfe mem_dongle_mode_init
+0x4bff mem_dongle_work_mode
+0x4c00 mem_dongle_ms_bind_step
+0x4c01 mem_dongle_kb_bind_step
+0x4c02 mem_dongle_bind_device_status
+0x4c03 mem_24g_bind_payload
+0x4c0b mem_24g_abort_packet
+0x4c0c mem_24g_rf_laststa
+0x4c0d mem_24g_hop_btclk
+0x4c11 mem_24g_hop_interval
+0x4c12 mem_24g_mode_switch
+0x4c13 mem_24g_ackpayload_enable
+0x4c14 mem_24g_hop_packet
+0x4c15 mem_24g_pair_mode
+0x4c16 mem_24g_nodata_timer_enable
+0x4c17 mem_24g_time_slice
+0x4c18 mem_24g_kb_data_sta_data
+0x4c20 mem_24g_kb_data_last_data
+0x4c28 mem_24g_kb_multikey_sta_data
+0x4c2b mem_24g_kb_multikey_last_data
+0x4c2e mem_24g_kb_blank_data_enable
+0x4c2f mem_24g_kb_mul_blank_data_enable
+0x4c30 mem_24g_ms_blank_data_enable
+0x4c31 mem_24g_kb_addr
+0x4c35 mem_24g_ms_addr
+0x4c39 mem_24g_dg_last_ch
+0x4c3a mem_24g_dg_ch_number
+0x4c3b mem_24g_dg_config_ch_once
+0x4c3c mem_24g_kb_last_ch
+0x4c3d mem_24g_kb_ch_number
+0x4c3e mem_24g_kb_config_ch_once
+0x4c3f mem_24g_ms_last_ch
+0x4c40 mem_24g_ms_ch_number
+0x4c41 mem_24g_ms_config_ch_once
+0x4c42 mem_24g_syncword
+0x4c44 mem_24g_syncword_crc8
+0x4c45 mem_24g_get_syncword_crc8
+0x4c46 mem_24g_ota_sta_pid
+0x4c48 mem_tx_power_temp
+0x4c49 mem_rssi_hex
+0x4c4a mem_rssi_noise_avg
+0x4c4b mem_rssi_noise_index
+0x4c4c mem_rssi_signal_index
+0x4c4d mem_rssi_noise_dg_avg
+0x4c4e mem_rssi_noise_kb_avg
+0x4c4f mem_rssi_noise_ms_avg
+0x4c50 mem_rssi_noise_dg_index
+0x4c51 mem_rssi_noise_kb_index
+0x4c52 mem_rssi_noise_ms_index
+0x4c53 mem_rssi_signal_buf
+0x4c5b mem_queue_ele_num
+0x4c5c mem_queue_read
+0x4c5e mem_queue_write
+0x4c60 mem_queue_start
+0x4c60 mem_data_ele0
+0x4c80 mem_data_ele1
+0x4ca0 mem_data_ele2
+0x4cc0 mem_queue_end
+0x4cc0 mem_queue_temp
+0x4cc2 mem_cb_24g_data
+0x4cc4 mem_24g_hop_fastly_cnt
+0x4cc5 mem_24g_hop_pac_retry
+0x4cc6 mem_24g_rf_hop_ch
+0x4cc7 mem_24g_rf_last_sta
+0x4cc8 mem_24g_rf_work_stage
+0x4cc9 mem_24g_sync_cnt
+0x4cca mem_power_ctrl_pac_succ_cnt
+0x4ccb mem_rssi_avg_received
+0x4ccc mem_rssi_hex_received
+0x4ccd mem_power_ctrl_level
+0x4cce mem_seqi
+0x4ccf mem_24g_auto_paring_switch
+0x4cd0 mem_24g_paccnt
+0x4cd1 mem_24g_transmit_by_interrupt
+0x4cd2 mem_24g_transmit_by_interrupt_exit_count
Index: output/program.lis
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/output/program.lis	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/output/program.lis	(working copy)
@@ -1,2019 +1,2285 @@
 include "bt_format "
 org 0x0000
-0000 c284001a bbit1 8 ,pf_patch_ext 
-0001 c0008035 beq patch00_1 ,p_soft_reset_1 
-0002 c001003e beq patch00_2 ,p_soft_reset_2 
-0003 c042856b beq patch10_5 ,p_shutdown_radio 
-0004 c044853c beq patch11_1 ,p_set_freq_tx 
-0005 c00d8420 beq patch03_3 ,p_page_wait_fhs_reply_ok 
-0006 c013042d beq patch04_6 ,p_role_switch_master 
-0007 c0240448 beq patch09_0 ,p_quit_connection_cont 
-0008 c025044f beq patch09_2 ,p_prepare_tx 
-0009 c02c8446 beq patch0b_1 ,p_process_dmh 
-000a c0288458 beq patch0a_1 ,p_slave_conn_recv_packet 
-000b c053845d beq patch14_7 ,p_lpm_dispatch 
-000c c0568473 beq patch15_5 ,p_lpm_set_mult 
-000d c065b3e4 beq patch19_3 ,app_bt_start_reconnect + 3 
-000e c0748484 beq patch1d_1 ,p_mouse_bb_disconnected 
-000f c0508047 beq patch14_1 ,p_init_param 
-0010 c058804c beq patch16_1 ,p_lpm_check_wake_lock 
-0011 c062007d beq patch18_4 ,p_device_init 
-0012 c0648117 beq patch19_1 ,p_app_flag_store 
-0013 c065011b beq patch19_2 ,p_app_initflag_check 
-0014 c07182af beq patch1c_3 ,p_mouse_seting_dpi 
-0015 c07302e3 beq patch1c_6 ,p_mouse_motion 
-0016 c07502ed beq patch1d_2 ,p_mouse_bb_event_discovery_btn 
-0017 c0758300 beq patch1d_3 ,p_mouse_start_discovery 
-0018 c0760327 beq patch1d_4 ,p_mouse_stop_discovery 
-0019 20202a8e branch loop 
+0000 c2840012 bbit1 8 ,pf_patch_ext 
+0001 c04285ba beq patch10_5 ,p_shutdown_radio 
+0002 c0448576 beq patch11_1 ,p_set_freq_tx 
+0003 c0008029 beq patch00_1 ,p_soft_reset_1 
+0004 c0010032 beq patch00_2 ,p_soft_reset_2 
+0005 c050803b beq patch14_1 ,p_init_param 
+0006 c0540040 beq patch15_0 ,p_lpm_dispatch_next2 
+0007 c0588043 beq patch16_1 ,p_lpm_check_wake_lock 
+0008 c059004b beq patch16_2 ,p_g24_dispatch 
+0009 c06200c5 beq patch18_4 ,p_device_init 
+000a c0648164 beq patch19_1 ,p_app_flag_store 
+000b c0650168 beq patch19_2 ,p_app_initflag_check 
+000c c07182c4 beq patch1c_3 ,p_mouse_seting_dpi 
+000d c07482d9 beq patch1d_1 ,p_mouse_bb_disconnected 
+000e c07502ec beq patch1d_2 ,p_mouse_bb_event_discovery_btn 
+000f c07582fa beq patch1d_3 ,p_mouse_start_discovery 
+0010 c076032a beq patch1d_4 ,p_mouse_stop_discovery 
+0011 20202a8e branch loop 
 
 pf_patch_ext:
-001a c01c832c beq patch27_1 ,p_le_slave_match 
-001b c0218334 beq patch28_3 ,p_le_next_adv_channel 
-001c c025033a beq patch29_2 ,p_le_receive_skip 
-001d c02b833d beq patch2a_7 ,p_le_update_param 
-001e c02c834d beq patch2b_1 ,p_le_update_channel_map 
-001f c031835a beq patch2c_3 ,p_le_prepare_tx 
-0020 c0330384 beq patch2c_6 ,p_le_parse 
-0021 c03383a3 beq patch2c_7 ,p_le_parse_l2cap 
-0022 c03503f0 beq patch2d_2 ,p_le_adv_not_match 
-0023 c03b83fb beq patch2e_7 ,p_le_lpm_setmult 
-0024 c07d0417 beq patch3f_2 ,p_check_51cmd_once_continue 
-0025 c0028497 beq patch20_5 ,p_hid_rx_process 
-0026 c04004a6 beq patch30_0 ,p_parse_lmp_accepted 
-0027 c04104b0 beq patch30_2 ,p_send_lmp 
-0028 c04404db beq patch31_0 ,p_process_conn_sm 
-0029 c046040b beq patch31_4 ,p_twspi_reset 
-002a 20202a8e branch loop 
+0012 c01c832e beq patch27_1 ,p_le_slave_match 
+0013 c0218336 beq patch28_3 ,p_le_next_adv_channel 
+0014 c025033c beq patch29_2 ,p_le_receive_skip 
+0015 c02b833f beq patch2a_7 ,p_le_update_param 
+0016 c02c8351 beq patch2b_1 ,p_le_update_channel_map 
+0017 c031835e beq patch2c_3 ,p_le_prepare_tx 
+0018 c0330388 beq patch2c_6 ,p_le_parse 
+0019 c033839f beq patch2c_7 ,p_le_parse_l2cap 
+001a c03503ec beq patch2d_2 ,p_le_adv_not_match 
+001b c03b83f7 beq patch2e_7 ,p_le_lpm_setmult 
+001c c0460407 beq patch31_4 ,p_twspi_reset 
+001d c07d0413 beq patch3f_2 ,p_check_51cmd_once_continue 
+001e 20202a8e branch loop 
 
 p_rssi_signal:
-002b 1fe22200 copy pdata ,rega 
-002c 6808cc5e fetcht 1 ,mem_rssi_signal_index 
-002d 58004c65 setarg mem_rssi_signal_buf 
-002e 98408a00 iadd temp ,contw 
-002f 1a227e00 copy rega ,pdata 
-0030 e0a08000 istore 1 ,contw 
-0031 18408401 increase 1 ,temp 
-0032 18410407 and_into rssi_buf_len_signal ,temp 
-0033 6008cc5e storet 1 ,mem_rssi_signal_index 
-0034 20600000 rtn 
+001f 1fe22200 copy pdata ,rega 
+0020 6808cc4c fetcht 1 ,mem_rssi_signal_index 
+0021 58004c53 setarg mem_rssi_signal_buf 
+0022 98408a00 iadd temp ,contw 
+0023 1a227e00 copy rega ,pdata 
+0024 e0a08000 istore 1 ,contw 
+0025 18408401 increase 1 ,temp 
+0026 18410407 and_into rssi_buf_len_signal ,temp 
+0027 6008cc4c storet 1 ,mem_rssi_signal_index 
+0028 20600000 rtn 
 
 p_soft_reset_1:
-0035 d8a009ae arg mem_sp_state ,contw 
-0036 df20000c arg 12 ,loopcnt 
-0037 20407ed4 call clear_mem 
-0038 20400151 call p_mouse_le_txbuff_load 
-0039 20406a03 call rfcomm_init 
-003a 20405cf6 call init_lmp 
-003b 2455ac65 ncall lpm_disable_exen_output ,wake 
-003c 20407ccd call ui_init + 1 
-003d 2020200c branch soft_reset + 11 
+0029 d8a009ae arg mem_sp_state ,contw 
+002a df20000c arg 12 ,loopcnt 
+002b 20407ed4 call clear_mem 
+002c 204000b9 call p_mouse_le_txbuff_load 
+002d 20406a03 call rfcomm_init 
+002e 20405cf6 call init_lmp 
+002f 2455ac65 ncall lpm_disable_exen_output ,wake 
+0030 20407ccd call ui_init + 1 
+0031 2020200c branch soft_reset + 11 
 
 p_soft_reset_2:
-003e 2055b2e3 call app_lpm_init ,wake 
-003f 2040756a call publickey_init 
-0040 2055ab41 call lpm_recover_clk ,wake 
+0032 2055b2e3 call app_lpm_init ,wake 
+0033 2040756a call publickey_init 
+0034 2055ab41 call lpm_recover_clk ,wake 
 
 p_sp_cal_loop:
-0041 204076dc call sp_calc_sequence 
-0042 6800c65a fetch 1 ,mem_ssp_enable 
-0043 203a2012 branch main_loop ,blank 
-0044 6800c5b1 fetch 1 ,mem_sp_local_key_invalid 
-0045 203a0041 branch p_sp_cal_loop ,blank 
-0046 20202012 branch main_loop 
+0035 204076dc call sp_calc_sequence 
+0036 6800c65a fetch 1 ,mem_ssp_enable 
+0037 203a2012 branch main_loop ,blank 
+0038 6800c5b1 fetch 1 ,mem_sp_local_key_invalid 
+0039 203a0035 branch p_sp_cal_loop ,blank 
+003a 20202012 branch main_loop 
 
 p_init_param:
-0047 58000a06 setarg param_le_version 
-0048 6001c510 store 3 ,mem_lmp_version 
-0049 58001d87 setarg param_le_subversion 
-004a 60014513 store 2 ,mem_lmp_version + 3 
-004b 20202aa2 branch init_param + 12 
+003b 58000a06 setarg param_le_version 
+003c 6001c510 store 3 ,mem_lmp_version 
+003d 58001d87 setarg param_le_subversion 
+003e 60014513 store 2 ,mem_lmp_version + 3 
+003f 20202aa2 branch init_param + 12 
+
+p_lpm_dispatch_next2:
+0040 6800c806 fetch 1 ,mem_mouse_wheel_trigger 
+0041 247a0000 nrtn blank 
+0042 20202b7f branch lpm_dispatch_next2 
 
 p_lpm_check_wake_lock:
-004c c6130000 rtnmark1 mark_24g 
-004d 6800c79c fetch 1 ,mem_mouse_clear_sensor_data_flag 
-004e 203a7fef branch disable_blank ,blank 
-004f 6800c7c4 fetch 1 ,mem_mouse_le_conn_param_reject 
-0050 c000ffef beq le_lpm_disable ,disable_blank 
-0051 68014248 fetch 2 ,mem_sdp_remote_cid 
-0052 243a7fef nbranch disable_blank ,blank 
-0053 6800c806 fetch 1 ,mem_mouse_wheel_trigger 
-0054 243a7fef nbranch disable_blank ,blank 
-0055 20207ff1 branch enable_blank 
-
-p_rssi_average:
-0056 d8400000 arg 0 ,temp 
-0057 df200008 arg rssi_buf_len_signal + 1 ,loopcnt 
-0058 1a220c00 copy rega ,contr 
-
-p_rssi_average_loop:
-0059 e8c08000 ifetch 1 ,contr 
-005a 98408400 iadd temp ,temp 
-005b c2000059 loop p_rssi_average_loop 
-005c 18497e00 rshift3 temp ,pdata 
-005d 1fe20400 copy pdata ,temp 
-005e c6930000 rtnmark0 mark_24g 
-005f 1fe6fc0a div pdata ,10 
-0060 20407f86 call wait_div_end 
-0061 1807fe00 quotient pdata 
-0062 1ff27e00 lshift4 pdata ,pdata 
-0063 18070400 remainder temp 
-0064 98418400 ior temp ,temp 
-0065 20600000 rtn 
-0066 20600000 rtn 
+0043 c6130000 rtnmark1 mark_24g 
+0044 6800c79c fetch 1 ,mem_mouse_clear_sensor_data_flag 
+0045 c0007fef beq 0 ,disable_blank 
+0046 6800c7c4 fetch 1 ,mem_mouse_le_conn_param_reject 
+0047 c000ffef beq le_lpm_disable ,disable_blank 
+0048 68014248 fetch 2 ,mem_sdp_remote_cid 
+0049 243a7fef nbranch disable_blank ,blank 
+004a 20207ff1 branch enable_blank 
+
+p_g24_dispatch:
+004b c6930000 rtnmark0 mark_24g 
+004c 6800ccd1 fetch 1 ,mem_24g_transmit_by_interrupt 
+004d c0008060 beq g24_tx_timer_int_enable ,p_g24_transmit_by_interrupt 
+
+p_g24_transmit_process:
+004e 20400475 call p_g24_txdata_prep 
+004f 2434007b nbranch p_g24_nodata_transmit ,user 
+0050 2040045a call p_g24_rf_sta_check 
+
+p_g24_transmit_start:
+0051 20400499 call p_g24_transmit_packet 
+0052 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+0053 c1ff8000 rtnne state_24g_pairing_success 
+0054 204004f8 call power_ctrl_start 
+
+p_g24_short_sleep:
+0055 6800ccd1 fetch 1 ,mem_24g_transmit_by_interrupt 
+0056 c1008000 rtneq g24_tx_timer_int_enable 
+0057 20402afa call lpo_calibration 
+0058 6801c16f fetch 3 ,mem_clks_per_lpo 
+0059 207a0000 rtn blank 
+005a 6800c091 fetch 1 ,mem_lpm_mode 
+005b 207a0000 rtn blank 
+005c 204000a0 call p_mouse_setgpio_lpm 
+005d 2040009d call p_clear_wake 
+005e 5800ec54 setarg 60500 
+005f 20202b93 branch lpm_dispatch_sleep 
+
+p_g24_transmit_by_interrupt:
+0060 204005bc call p_g24_timer_check 
+0061 24740000 nrtn user 
+0062 20400072 call p_g24_interval_calibrate 
+0063 6800ccd2 fetch 1 ,mem_24g_transmit_by_interrupt_exit_count 
+0064 1fe0fe01 increase 1 ,pdata 
+0065 6000ccd2 store 1 ,mem_24g_transmit_by_interrupt_exit_count 
+0066 1fe67c19 sub pdata ,25 ,null 
+0067 20428069 call p_g24_transmit_by_interrupt_exit ,zero 
+0068 2020004e branch p_g24_transmit_process 
+
+p_g24_transmit_by_interrupt_exit:
+0069 704cd100 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+006a 704cd200 jam 0 ,mem_24g_transmit_by_interrupt_exit_count 
+
+p_g24_interval_min:
+006b 704bcc00 jam 0 ,mem_24g_pac_index 
+006c 6800cbb7 fetch 1 ,mem_24g_interval_min 
+006d 6000cbb6 store 1 ,mem_24g_interval 
+006e 20600000 rtn 
+
+p_g24_interval_max:
+006f 6800cbb8 fetch 1 ,mem_24g_interval_max 
+0070 6000cbb6 store 1 ,mem_24g_interval 
+0071 20600000 rtn 
+
+p_g24_interval_calibrate:
+0072 6800cbcc fetch 1 ,mem_24g_pac_index 
+0073 1fe0fe01 increase 1 ,pdata 
+0074 6000cbcc store 1 ,mem_24g_pac_index 
+0075 c002006f beq 4 ,p_g24_interval_max 
+0076 c002806b beq 5 ,p_g24_interval_min 
+0077 20600000 rtn 
+
+p_g24_transmit_by_interrupt_enable:
+0078 704cd101 jam g24_tx_timer_int_enable ,mem_24g_transmit_by_interrupt 
+0079 704cd200 jam 0 ,mem_24g_transmit_by_interrupt_exit_count 
+007a 20600000 rtn 
+
+p_g24_nodata_transmit:
+007b 6800cbbd fetch 1 ,mem_24g_abort_pac 
+007c 205a0087 call p_g24_send_abort_packet ,blank 
+
+p_g24_long_sleep:
+007d 20402afa call lpo_calibration 
+007e 6801c16f fetch 3 ,mem_clks_per_lpo 
+007f 207a0000 rtn blank 
+0080 6800c091 fetch 1 ,mem_lpm_mode 
+0081 207a0000 rtn blank 
+0082 204000a0 call p_mouse_setgpio_lpm 
+0083 68044bc0 fetch 8 ,mem_24g_enter_hibernate 
+0084 20407f49 call clk2lpo 
+0085 600a415b storet 4 ,mem_sleep_counter 
+0086 20202b2a branch lpm_sleep 
+
+p_g24_send_abort_packet:
+0087 704bbd01 jam 1 ,mem_24g_abort_pac 
+0088 704cc600 jam 0 ,mem_24g_rf_hop_ch 
+0089 20400422 call p_g24_transmit_rf_ctrl_clear 
+008a 6000cb2d store 1 ,mem_24g_txbuf 
+008b 58000000 setarg 0 
+008c 6003cb2e store 7 ,mem_24g_txbuf + 1 
+008d 68024bc8 fetch 4 ,mem_24g_device_addr 
+008e 60024b35 store 4 ,mem_24g_txbuf + 8 
+008f 704b910c jam 12 ,mem_24g_datalen 
+0090 6800cb92 fetch 1 ,mem_24g_data_type 
+0091 79207e03 set1 bit_abort ,pdata 
+0092 6000cb92 store 1 ,mem_24g_data_type 
+0093 204005f8 call p_g24_transmit_prep 
+0094 20400479 call p_g24_txdata_enable_tx 
+0095 20200051 branch p_g24_transmit_start 
 
 p_mouse_before_lpm:
-0067 c6130000 rtnmark1 mark_24g 
-0068 20400147 call p_mouse_le_txbuff_save 
-0069 20400071 call p_mouse_setgpio_lpm 
-006a 6800c040 fetch 1 ,mem_context 
-006b c300006e bbit0 state_inconn ,p_clear_wake 
-006c 680080a0 fetch 1 ,mem_lpm_current_mult 
-006d 247a0000 nrtn blank 
+0096 c6130000 rtnmark1 mark_24g 
+0097 204000ac call p_mouse_le_txbuff_save 
+0098 204000a0 call p_mouse_setgpio_lpm 
+0099 6800c040 fetch 1 ,mem_context 
+009a c300009d bbit0 state_inconn ,p_clear_wake 
+009b 680080a0 fetch 1 ,mem_lpm_current_mult 
+009c 247a0000 nrtn blank 
 
 p_clear_wake:
-006e 58000000 setarg 0 
-006f 600400a1 store 8 ,mem_gpio_wakeup_low 
-0070 20600000 rtn 
+009d 58000000 setarg 0 
+009e 600400a1 store 8 ,mem_gpio_wakeup_low 
+009f 20600000 rtn 
 
 p_mouse_setgpio_lpm:
-0071 2040007a call p_mouse_set_sdio_high 
-0072 2040006e call p_clear_wake 
-
-p_mouse_setgpio_lpm_before:
-0073 20403ebf call mouse_lpm_before_common 
-0074 68120070 hfetch 4 ,core_gpio_oe0 
-0075 681a0078 hfetcht 4 ,core_gpio_pu0 
-0076 98418400 ior temp ,temp 
-0077 18440400 invert temp ,temp 
-0078 601a007c hstoret 4 ,core_gpio_pd0 
-0079 20600000 rtn 
+00a0 204000a9 call p_mouse_set_sdio_high 
+00a1 2040009d call p_clear_wake 
+00a2 20403ebf call mouse_lpm_before_common 
+00a3 68120070 hfetch 4 ,core_gpio_oe0 
+00a4 681a0078 hfetcht 4 ,core_gpio_pu0 
+00a5 98418400 ior temp ,temp 
+00a6 18440400 invert temp ,temp 
+00a7 601a007c hstoret 4 ,core_gpio_pd0 
+00a8 20600000 rtn 
 
 p_mouse_set_sdio_high:
-007a 6800cafe fetch 1 ,mem_mouse_init_sensor_reset_flag 
-007b 207a0000 rtn blank 
-007c 202002b0 branch p_mouse_seting_sensor_type 
+00a9 6800cafe fetch 1 ,mem_mouse_init_sensor_reset_flag 
+00aa 207a0000 rtn blank 
+00ab 202002c5 branch p_mouse_seting_dpi + 1 
+
+p_mouse_le_txbuff_save:
+00ac d8c01800 arg mem_le_tx_buffer0 ,contr 
+00ad d8a0480a arg mem_le_tx_buffer0_omemalloc ,contw 
+00ae 204000b7 call p_mouse_le_txbuff_copy 
+00af d8c01900 arg mem_le_tx_buffer1 ,contr 
+00b0 d8a04825 arg mem_le_tx_buffer1_omemalloc ,contw 
+00b1 204000b7 call p_mouse_le_txbuff_copy 
+00b2 d8c01a00 arg mem_le_tx_buffer2 ,contr 
+00b3 d8a04840 arg mem_le_tx_buffer2_omemalloc ,contw 
+00b4 204000b7 call p_mouse_le_txbuff_copy 
+00b5 d8c01b00 arg mem_le_tx_buffer3 ,contr 
+00b6 d8a0485b arg mem_le_tx_buffer3_omemalloc ,contw 
+
+p_mouse_le_txbuff_copy:
+00b7 df20001b arg 27 ,loopcnt 
+00b8 20207f01 branch memcpy 
+
+p_mouse_le_txbuff_load:
+00b9 d8c0480a arg mem_le_tx_buffer0_omemalloc ,contr 
+00ba d8a01800 arg mem_le_tx_buffer0 ,contw 
+00bb 204000b7 call p_mouse_le_txbuff_copy 
+00bc d8c04825 arg mem_le_tx_buffer1_omemalloc ,contr 
+00bd d8a01900 arg mem_le_tx_buffer1 ,contw 
+00be 204000b7 call p_mouse_le_txbuff_copy 
+00bf d8c04840 arg mem_le_tx_buffer2_omemalloc ,contr 
+00c0 d8a01a00 arg mem_le_tx_buffer2 ,contw 
+00c1 204000b7 call p_mouse_le_txbuff_copy 
+00c2 d8c0485b arg mem_le_tx_buffer3_omemalloc ,contr 
+00c3 d8a01b00 arg mem_le_tx_buffer3 ,contw 
+00c4 202000b7 branch p_mouse_le_txbuff_copy 
 
 p_device_init:
-007d 20403416 call app_lpm_mult_enable 
-007e 20358086 branch p_device_init_common ,wake 
-007f 20400169 call p_mouse_data_init 
-0080 6800c1de fetch 1 ,mem_tx_power 
-0081 6000cc5a store 1 ,mem_tx_power_temp 
-0082 204004ff call power_ctrl_pac_succ_cnt_init 
-0083 6800c685 fetch 1 ,mem_ui_button_timeout 
-0084 6000c6da store 1 ,mem_combination_ui_button_count 
-0085 204043ca call mouse_bt_discovery_button_down_disable 
+00c5 20403416 call app_lpm_mult_enable 
+00c6 203580cf branch p_device_init_common ,wake 
+00c7 70807820 jam 0x20 ,core_gpio_pu0 
+00c8 20400694 call p_mouse_data_init 
+00c9 6800c1de fetch 1 ,mem_tx_power 
+00ca 6000cc48 store 1 ,mem_tx_power_temp 
+00cb 204004e7 call power_ctrl_pac_succ_cnt_init 
+00cc 6800c685 fetch 1 ,mem_ui_button_timeout 
+00cd 6000c6da store 1 ,mem_combination_ui_button_count 
+00ce 204043ca call mouse_bt_discovery_button_down_disable 
 
 p_device_init_common:
-0086 2040008b call p_mouse_init 
-0087 202074b9 branch enable_authrom 
-
-p_mouse_tx_power_init:
-0088 6800cc5a fetch 1 ,mem_tx_power_temp 
-0089 6000c1de store 1 ,mem_tx_power 
-008a 20600000 rtn 
+00cf 204000d1 call p_mouse_init 
+00d0 202074b9 branch enable_authrom 
 
 p_mouse_init:
-008b 245580d6 ncall p_mouse_setting_config ,wake 
-008c 204000b7 call p_mouse_spi_init 
-008d 20758000 rtn wake 
-008e 2040056d call p_drawing_optima_init 
-008f 20400136 call p_mouse_cb_fuction 
-0090 2040011f call p_mouse_wakeup_from_power 
-0091 c6130000 rtnmark1 mark_24g 
-0092 20200093 branch p_mouse_check_reconn_target 
+00d1 2455811b ncall p_mouse_setting_config ,wake 
+00d2 204000fa call p_mouse_spi_init 
+00d3 20758000 rtn wake 
+00d4 20400186 call p_mouse_cb_fuction 
+00d5 2040016c call p_mouse_wakeup_from_power 
+00d6 c6130000 rtnmark1 mark_24g 
+00d7 202000d8 branch p_mouse_check_reconn_target 
 
 p_mouse_check_reconn_target:
-0093 20400088 call p_mouse_tx_power_init 
-0094 6800c210 fetch 1 ,mem_xrecord_mode 
-0095 c0198098 beq rec_3_mode ,p_mouse3_0_check_reconn_target 
-0096 c01a009b beq rec_4_mode ,p_mouse4_0_check_reconn_target 
-0097 2020025e branch p_mouse_null_enter_hibernate_enable 
+00d8 6800cc48 fetch 1 ,mem_tx_power_temp 
+00d9 6000c1de store 1 ,mem_tx_power 
+00da 6800c210 fetch 1 ,mem_xrecord_mode 
+00db c01980de beq rec_3_mode ,p_mouse3_0_check_reconn_target 
+00dc c01a00e1 beq rec_4_mode ,p_mouse4_0_check_reconn_target 
+00dd 2020021b branch p_mouse_null_enter_hibernate_enable 
 
 p_mouse3_0_check_reconn_target:
-0098 680341d0 fetch 6 ,mem_hci_plap 
-0099 203a33eb branch app_bt_start_discovery_short ,blank 
-009a 20204274 branch mouse3_0_check_reconn_target + 3 
+00de 680341d0 fetch 6 ,mem_hci_plap 
+00df 203a33eb branch app_bt_start_discovery_short ,blank 
+00e0 20204274 branch mouse3_0_check_reconn_target + 3 
 
 p_mouse4_0_check_reconn_target:
-009b 704b1901 jam 1 ,mem_le_send_security_request_flag 
-009c 70479f01 jam 1 ,mem_mouse_le_reconnect_flag 
-009d 680146a8 fetch 2 ,mem_mouse_direct_timeout 
-009e 6808cb1b fetcht 1 ,mem_mouse_fast_conn_flag 
-009f 18467cff sub temp ,0xff ,null 
-00a0 242280a2 nbranch p_mouse4_0_check_reconn_target_next ,zero 
-00a1 58000258 setarg 0x0258 
+00e1 704b0801 jam 1 ,mem_le_send_security_request_flag 
+00e2 70479f01 jam 1 ,mem_mouse_le_reconnect_flag 
+00e3 680146a8 fetch 2 ,mem_mouse_direct_timeout 
+00e4 6808cb0a fetcht 1 ,mem_mouse_fast_conn_flag 
+00e5 18467cff sub temp ,0xff ,null 
+00e6 242280e8 nbranch p_mouse4_0_check_reconn_target_next ,zero 
+00e7 58000258 setarg 0x0258 
 
 p_mouse4_0_check_reconn_target_next:
-00a2 600146ae store 2 ,mem_mouse_direct_timer 
-00a3 20403418 call app_lpm_mult_disable 
-00a4 204000a8 call p_le_check_adv_flag 
-00a5 58000004 setarg adv_flag_bredr_not_supported 
-00a6 e0c08000 istore 1 ,contr 
-00a7 20207df4 branch check_51cmd_adv 
+00e8 600146ae store 2 ,mem_mouse_direct_timer 
+00e9 20403418 call app_lpm_mult_disable 
+00ea 204000ee call p_le_check_adv_flag 
+00eb 58000004 setarg adv_flag_bredr_not_supported 
+00ec e0c08000 istore 1 ,contr 
+00ed 20207df4 branch check_51cmd_adv 
 
 p_le_check_adv_flag:
-00a8 da204370 arg mem_le_adv_data ,rega 
+00ee da204370 arg mem_le_adv_data ,rega 
 
 p_le_check_adv_flag_loop:
-00a9 ea208000 ifetch 1 ,rega 
-00aa 207a0000 rtn blank 
-00ab 98c0a200 iadd contr ,rega 
-00ac e8c08000 ifetch 1 ,contr 
-00ad c1008000 rtneq 0x01 
-00ae 202000a9 branch p_le_check_adv_flag_loop 
+00ef ea208000 ifetch 1 ,rega 
+00f0 207a0000 rtn blank 
+00f1 98c0a200 iadd contr ,rega 
+00f2 e8c08000 ifetch 1 ,contr 
+00f3 c1008000 rtneq 0x01 
+00f4 202000ef branch p_le_check_adv_flag_loop 
 
 p_mouse_dpi_config:
-00af 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-00b0 c30a3d66 bbit0 mouse_enable_eeprom ,mouse_dpi_config 
-00b1 6800c77a fetch 1 ,mem_mouse_dpi 
-00b2 c07f80b4 beq 0xff ,p_mouse_dpi_config_default 
-00b3 202002b0 branch p_mouse_seting_sensor_type 
-
-p_mouse_dpi_config_default:
-00b4 6800c6e1 fetch 1 ,mem_config_sensor_motion 
-00b5 6000c77a store 1 ,mem_mouse_dpi 
-00b6 202002b0 branch p_mouse_seting_sensor_type 
+00f5 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+00f6 c30a3d66 bbit0 mouse_enable_eeprom ,mouse_dpi_config 
+00f7 6800c77a fetch 1 ,mem_mouse_dpi 
+00f8 c07fbd66 beq 0xff ,mouse_dpi_config 
+00f9 20203d80 branch mouse_seting_dpi + 2 
 
 p_mouse_spi_init:
-00b7 70421276 jam 0x76 ,mem_spi_init_clk 
-00b8 20203d36 branch mouse_spi_init 
+00fa 70421276 jam 0x76 ,mem_spi_init_clk 
+00fb 20203d36 branch mouse_spi_init 
 
 p_mouse_init_sunt:
-00b9 204000b7 call p_mouse_spi_init 
-00ba 204040c0 call mouse_spi_sdio_gpio_pollup 
+00fc 204000fa call p_mouse_spi_init 
+00fd 204040c0 call mouse_spi_sdio_gpio_pollup 
+00fe 6800c6e0 fetch 1 ,mem_config_sensor_type 
+00ff c002c0d5 beq p3610 ,mouse_init_3610sensor 
 
 p_mouse_init_sensor:
-00bb 204040d9 call mouse_read_sensor_id 
-00bc c01800c5 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
-00bd c01880c7 beq p3065_id1 ,p_mouse_p3065_init_param 
-00be 204040d1 call mouse_twspi_reset 
-00bf 200003e8 nop 1000 
-00c0 202000bb branch p_mouse_init_sensor 
+0100 204040d9 call mouse_read_sensor_id 
+0101 c018010a beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+0102 c018810c beq p3065_id1 ,p_mouse_p3065_init_param 
+0103 204040d1 call mouse_twspi_reset 
+0104 200003e8 nop 1000 
+0105 20200100 branch p_mouse_init_sensor 
 
 p_mouse_init_sensor_reset:
-00c1 704afe01 jam 1 ,mem_mouse_init_sensor_reset_flag 
-00c2 2040640f call spi_ncs_enable 
-00c3 204000b9 call p_mouse_init_sunt 
-00c4 20206411 branch spi_ncs_disable 
+0106 704afe01 jam 1 ,mem_mouse_init_sensor_reset_flag 
+0107 2040640f call spi_ncs_enable 
+0108 204000fc call p_mouse_init_sunt 
+0109 20206411 branch spi_ncs_disable 
 
 p_mouse_init_p32xx_id2_judge:
-00c5 204000cc call p_mouse_sensor_poweron 
-00c6 202040e0 branch mouse_init_p32xx_id2_judge 
+010a 20400111 call p_mouse_sensor_poweron 
+010b 202040e0 branch mouse_init_p32xx_id2_judge 
 
 p_mouse_p3065_init_param:
-00c7 204000cc call p_mouse_sensor_poweron 
-00c8 6800c6de fetch 1 ,mem_sensor_id2 
-00c9 c03840e8 beq p3065_xy_id2 ,mouse_p3065xy_init_param 
-00ca 7046e001 jam p3065 ,mem_config_sensor_type 
-00cb 20600000 rtn 
+010c 20400111 call p_mouse_sensor_poweron 
+010d 6800c6de fetch 1 ,mem_sensor_id2 
+010e c03840e8 beq p3065_xy_id2 ,mouse_p3065xy_init_param 
+010f 7046e001 jam p3065 ,mem_config_sensor_type 
+0110 20600000 rtn 
 
 p_mouse_sensor_poweron:
-00cc 58008006 setarg 0x8006 
-00cd 20406413 call twspi_write 
-00ce 20002ee0 nop 12000 
-00cf 202000af branch p_mouse_dpi_config 
+0111 58008006 setarg 0x8006 
+0112 20406413 call twspi_write 
+0113 20002ee0 nop 12000 
+0114 202000f5 branch p_mouse_dpi_config 
 
 p_mouse_sensor_powerdown:
-00d0 58000006 setarg 0x06 
-00d1 20406414 call twspi_read 
-00d2 1fe1fe08 or pdata ,0x08 ,pdata 
-00d3 1fed7e00 lshift8 pdata ,pdata 
-00d4 1fe0fe06 add pdata ,0x06 ,pdata 
-00d5 20206413 branch twspi_write 
+0115 58000006 setarg 0x06 
+0116 20406414 call twspi_read 
+0117 1fe1fe08 or pdata ,0x08 ,pdata 
+0118 1fed7e00 lshift8 pdata ,pdata 
+0119 1fe0fe06 add pdata ,0x06 ,pdata 
+011a 20206413 branch twspi_write 
 
 p_mouse_setting_config:
-00d6 204068a8 call adc_init_data 
-00d7 68108a00 hfetch 1 ,core_usb_config 
-00d8 793ffe04 set0 4 ,pdata 
-00d9 60108a00 hstore 1 ,core_usb_config 
-00da 20403e6e call mouse_gpio_init 
-00db 20403e1e call mouse_param_init 
-00dc 204000f8 call p_mouse_bt_sdp_update 
-00dd 58000000 setarg 0 
-00de 60014154 store 2 ,mem_lpm_interval 
-00df 20403e54 call mouse_adc_init 
-00e0 20405810 call le_set_config_fixed_ltk 
-00e1 20405839 call le_set_justwork 
-00e2 2040582c call le_set_fixed_ltk 
-00e3 20405818 call le_set_config_read_authentication 
+011b 2040041c call p_g24_set_device_addr 
+011c 68108a00 hfetch 1 ,core_usb_config 
+011d 793ffe04 set0 4 ,pdata 
+011e 60108a00 hstore 1 ,core_usb_config 
+011f 20403e6e call mouse_gpio_init 
+0120 20403e1e call mouse_param_init 
+0121 20400145 call p_mouse_bt_sdp_update 
+0122 58000000 setarg 0 
+0123 60014154 store 2 ,mem_lpm_interval 
+0124 20403e54 call mouse_adc_init 
+0125 20405810 call le_set_config_fixed_ltk 
+0126 20405839 call le_set_justwork 
+0127 2040582c call le_set_fixed_ltk 
+0128 20405818 call le_set_config_read_authentication 
+0129 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+012a c28a012c bbit1 mouse_enable_eeprom ,p_mouse_init_iic 
+012b 20600000 rtn 
 
 p_mouse_init_iic:
-00e4 2040659c call iic_init_390k 
-00e5 204065c2 call clear_eeprom_size_2k 
-00e6 2040443f call mouse_load_eeprom_dpi 
-00e7 20400113 call p_mouse_init_environment 
-00e8 204000ec call p_mouse_load_fast_conn_flag 
-00e9 6800cb1b fetch 1 ,mem_mouse_fast_conn_flag 
-00ea c07f80f4 beq 0xff ,p_mouse_fast_conn_init 
-00eb 20600000 rtn 
+012c 2040659c call iic_init_390k 
+012d 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+012e 2feffe19 isolate1 mouse_enable_2k_eeprom ,pdata 
+012f 2440e5c2 ncall clear_eeprom_size_2k ,true 
+0130 2040443f call mouse_load_eeprom_dpi 
+0131 20400160 call p_mouse_init_environment 
+0132 20400207 call p_mouse_set_24g_addr_eeprom 
+0133 204065df call iicd_read_eep_data 
+0134 20400138 call p_mouse_load_fast_conn_flag 
+0135 6800cb0a fetch 1 ,mem_mouse_fast_conn_flag 
+0136 c07f8140 beq 0xff ,p_mouse_fast_conn_init 
+0137 20600000 rtn 
 
 p_mouse_load_fast_conn_flag:
-00ec d8400001 arg 1 ,temp 
-00ed da204b1b arg mem_mouse_fast_conn_flag ,rega 
-00ee da400064 arg mouse_fast_conn_flag_offset ,regb 
-00ef 202065df branch iicd_read_eep_data 
+0138 d8400001 arg 1 ,temp 
+0139 da204b0a arg mem_mouse_fast_conn_flag ,rega 
+013a da400064 arg mouse_fast_conn_flag_offset ,regb 
+013b 202065df branch iicd_read_eep_data 
 
 p_mouse_store_fast_conn_flag:
-00f0 d8400001 arg 1 ,temp 
-00f1 da204b1b arg mem_mouse_fast_conn_flag ,rega 
-00f2 da400064 arg mouse_fast_conn_flag_offset ,regb 
-00f3 202065d1 branch iicd_write_protect_eep_data 
+013c d8400001 arg 1 ,temp 
+013d da204b0a arg mem_mouse_fast_conn_flag ,rega 
+013e da400064 arg mouse_fast_conn_flag_offset ,regb 
+013f 202065d1 branch iicd_write_protect_eep_data 
 
 p_mouse_fast_conn_init:
-00f4 70421034 jam 0x34 ,mem_xrecord_mode 
-00f5 5fffffff setarg -1 
-00f6 600344a0 store 6 ,mem_le_lap 
-00f7 20600000 rtn 
+0140 70421034 jam 0x34 ,mem_xrecord_mode 
+0141 58000000 setarg 0 
+0142 1fe47e00 invert pdata ,pdata 
+0143 600344a0 store 6 ,mem_le_lap 
+0144 20600000 rtn 
 
 p_mouse_bt_sdp_update:
-00f8 204074b9 call enable_authrom 
-00f9 d8c08c00 arg 0x8c00 ,contr 
-00fa d8a04876 arg mem_mouse_uuid_list ,contw 
-00fb df200171 arg 369 ,loopcnt 
-00fc 20407f01 call memcpy 
-00fd 580f0209 setarg 0x0f0209 
-00fe e0a18000 istore 3 ,contw 
-00ff 58120009 setarg 0x120009 
-0100 e0a18000 istore 3 ,contw 
-0101 58100209 setarg 0x100209 
-0102 e0a18000 istore 3 ,contw 
-0103 58000009 setarg 0x000009 
-0104 e0a18000 istore 3 ,contw 
-0105 d8c08d71 arg 0x8d71 ,contr 
-0106 df200109 arg 265 ,loopcnt 
-0107 20407f01 call memcpy 
-0108 70488d00 jam 0 ,mem_mouse_uuid_list + 23 
-0109 7048856d jam 0x6d ,mem_mouse_uuid_list + 15 
-010a 5800401f setarg 0x401f 
-010b 600149db store 2 ,mem_mouse_uuid_list + 357 
-010c 58006d04 setarg 0x6d04 
-010d 60014a44 store 2 ,mem_mouse_uuid_list + 462 
-010e 580016b0 setarg 0x16b0 
-010f 60014a4a store 2 ,mem_mouse_uuid_list + 468 
-0110 58004876 setarg mem_mouse_uuid_list 
-0111 60014575 store 2 ,mem_ui_uuid_table 
-0112 20600000 rtn 
+0145 204074b9 call enable_authrom 
+0146 d8c08c00 arg 0x8c00 ,contr 
+0147 d8a04876 arg mem_mouse_uuid_list ,contw 
+0148 df200171 arg 369 ,loopcnt 
+0149 20407f01 call memcpy 
+014a 580f0209 setarg 0x0f0209 
+014b e0a18000 istore 3 ,contw 
+014c 58120009 setarg 0x120009 
+014d e0a18000 istore 3 ,contw 
+014e 58100209 setarg 0x100209 
+014f e0a18000 istore 3 ,contw 
+0150 58000009 setarg 0x000009 
+0151 e0a18000 istore 3 ,contw 
+0152 d8c08d71 arg 0x8d71 ,contr 
+0153 df200109 arg 265 ,loopcnt 
+0154 20407f01 call memcpy 
+0155 70488d00 jam 0 ,mem_mouse_uuid_list + 23 
+0156 7048856d jam 0x6d ,mem_mouse_uuid_list + 15 
+0157 5800401f setarg 0x401f 
+0158 600149db store 2 ,mem_mouse_uuid_list + 357 
+0159 58006d04 setarg 0x6d04 
+015a 60014a44 store 2 ,mem_mouse_uuid_list + 462 
+015b 580016b0 setarg 0x16b0 
+015c 60014a4a store 2 ,mem_mouse_uuid_list + 468 
+015d 58004876 setarg mem_mouse_uuid_list 
+015e 60014575 store 2 ,mem_ui_uuid_table 
+015f 20600000 rtn 
 
 p_mouse_init_environment:
-0113 204033c4 call app_initflag_check 
-0114 2022c316 branch mouse_eeprom_load_recon_info ,zero 
-0115 204002f0 call p_le_addr_random_config 
-0116 20203dcb branch mouse_init_environment + 2 
+0160 204033c4 call app_initflag_check 
+0161 2022c316 branch mouse_eeprom_load_recon_info ,zero 
+0162 204002f2 call p_le_addr_random_config 
+0163 20203dcb branch mouse_init_environment + 2 
 
 p_app_flag_store:
-0117 d8400002 arg 2 ,temp 
-0118 da200aaa arg mem_timeup ,rega 
-0119 da400062 arg mouse_eeprom_module_init_flag ,regb 
-011a 202065d1 branch iicd_write_protect_eep_data 
+0164 d8400002 arg 2 ,temp 
+0165 da200aaa arg mem_timeup ,rega 
+0166 da400062 arg mouse_eeprom_module_init_flag ,regb 
+0167 20206606 branch iicd_write_eep_data 
 
 p_app_initflag_check:
-011b d8400002 arg 2 ,temp 
-011c da200a9a arg mem_pdatatemp ,rega 
-011d da400062 arg mouse_eeprom_module_init_flag ,regb 
-011e 202033c8 branch app_initflag_check + 4 
+0168 d8400002 arg 2 ,temp 
+0169 da200a9a arg mem_pdatatemp ,rega 
+016a da400062 arg mouse_eeprom_module_init_flag ,regb 
+016b 202033c8 branch app_initflag_check + 4 
 
 p_mouse_wakeup_from_power:
-011f 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-0120 c30f0126 bbit0 mouse_enable_wakeup_from_power ,p_mouse_wakeup_no_from_power 
-0121 68008abd fetch 1 ,mem_wakup_from_power_flag 
-0122 2fec0003 isolate0 gpio_latch ,pdata 
-0123 24208126 nbranch p_mouse_wakeup_no_from_power ,true 
-0124 204000b9 call p_mouse_init_sunt 
-0125 204000d0 call p_mouse_sensor_powerdown 
+016c 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+016d c30f0173 bbit0 mouse_enable_wakeup_from_power ,p_mouse_wakeup_no_from_power 
+016e 68008abd fetch 1 ,mem_wakup_from_power_flag 
+016f 2fec0003 isolate0 gpio_latch ,pdata 
+0170 24208173 nbranch p_mouse_wakeup_no_from_power ,true 
+0171 204000fc call p_mouse_init_sunt 
+0172 20400115 call p_mouse_sensor_powerdown 
 
 p_mouse_wakeup_no_from_power:
-0126 6800c71f fetch 1 ,mem_reconn_times_init 
-0127 6000c71e store 1 ,mem_reconn_times 
-0128 6800c6f5 fetch 1 ,mem_config_function_enable 
-0129 c3828000 rtnbit1 enable_select_device_by_gpio_button 
-012a c3830000 rtnbit1 enable_select_device_by_switch 
-012b 793f8026 set0 mark_24g ,mark 
-012c 20600000 rtn 
+0173 6800c71f fetch 1 ,mem_reconn_times_init 
+0174 6000c71e store 1 ,mem_reconn_times 
+0175 6800c6f5 fetch 1 ,mem_config_function_enable 
+0176 c3828000 rtnbit1 enable_select_device_by_gpio_button 
+0177 c3830000 rtnbit1 enable_select_device_by_switch 
+
+p_mouse_start_24g_mode:
+0178 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+0179 c4088000 rtnbit0 mouse_enable_24g 
+017a 2040017d call p_g24_factory_check 
+017b 2034055f branch p_g24_auto_pair_start ,user 
+017c 2020055e branch p_g24_start_24g_mode 
 
 p_g24_factory_check:
-012d df200002 arg 2 ,loopcnt 
-012e d8c04bcb arg mem_24g_addr ,contr 
+017d df200002 arg 2 ,loopcnt 
+017e d8c04bb9 arg mem_24g_addr ,contr 
 
 p_pdata_0xff_check:
-012f 20407fe7 call enable_user 
-0130 5800ffff setarg 0xffff 
+017f 20407fe7 call enable_user 
+0180 5800ffff setarg 0xffff 
 
 p_pdata_0xff_check_loop:
-0131 e8c90000 ifetcht 2 ,contr 
-0132 98467c00 isub temp ,null 
-0133 2442ffe9 ncall disable_user ,zero 
-0134 c2000131 loop p_pdata_0xff_check_loop 
-0135 20600000 rtn 
+0181 e8c90000 ifetcht 2 ,contr 
+0182 98467c00 isub temp ,null 
+0183 2442ffe9 ncall disable_user ,zero 
+0184 c2000181 loop p_pdata_0xff_check_loop 
+0185 20600000 rtn 
 
 p_mouse_cb_fuction:
-0136 5800015a setarg p_mouse_le 
-0137 600141ef store 2 ,mem_cb_le_process 
-0138 58000405 setarg p_le_mouse_bb_event_connect_complete 
-0139 600141f9 store 2 ,mem_cb_att_write 
-013a 58000188 setarg p_mouse_bt 
-013b 600141f1 store 2 ,mem_cb_bt_process 
-013c 58000067 setarg p_mouse_before_lpm 
-013d 600141ed store 2 ,mem_cb_before_lpm 
-013e 580001b1 setarg p_mouse_priority_bb_event 
-013f 600141f5 store 2 ,mem_cb_bb_event_process 
-0140 580001ae setarg p_mouse_idle 
-0141 600141f3 store 2 ,mem_cb_idle_process 
-0142 58000204 setarg p_mouse_before_hibernate 
-0143 600141eb store 2 ,mem_cb_before_hibernate 
-0144 58000214 setarg p_mouse_bb_event_timer 
-0145 600141fd store 2 ,mem_cb_event_timer 
-0146 20600000 rtn 
-
-p_mouse_le_txbuff_save:
-0147 d8c01800 arg mem_le_tx_buffer0 ,contr 
-0148 d8a0480a arg mem_le_tx_buffer0_omemalloc ,contw 
-0149 2040014f call p_mouse_le_txbuff_copy 
-014a d8c01900 arg mem_le_tx_buffer1 ,contr 
-014b 2040014f call p_mouse_le_txbuff_copy 
-014c d8c01a00 arg mem_le_tx_buffer2 ,contr 
-014d 2040014f call p_mouse_le_txbuff_copy 
-014e d8c01b00 arg mem_le_tx_buffer3 ,contr 
-
-p_mouse_le_txbuff_copy:
-014f df20001b arg 27 ,loopcnt 
-0150 20207f01 branch memcpy 
-
-p_mouse_le_txbuff_load:
-0151 d8c0480a arg mem_le_tx_buffer0_omemalloc ,contr 
-0152 d8a01800 arg mem_le_tx_buffer0 ,contw 
-0153 2040014f call p_mouse_le_txbuff_copy 
-0154 d8a01900 arg mem_le_tx_buffer1 ,contw 
-0155 2040014f call p_mouse_le_txbuff_copy 
-0156 d8a01a00 arg mem_le_tx_buffer2 ,contw 
-0157 2040014f call p_mouse_le_txbuff_copy 
-0158 d8a01b00 arg mem_le_tx_buffer3 ,contw 
-0159 2020014f branch p_mouse_le_txbuff_copy 
+0186 5800019b setarg p_mouse_g24_package_data 
+0187 60014cc2 store 2 ,mem_cb_24g_data 
+0188 5800019f setarg p_mouse_le 
+0189 600141ef store 2 ,mem_cb_le_process 
+018a 58000401 setarg p_le_mouse_bb_event_connect_complete 
+018b 600141f9 store 2 ,mem_cb_att_write 
+018c 580001b2 setarg p_mouse_bt 
+018d 600141f1 store 2 ,mem_cb_bt_process 
+018e 58000096 setarg p_mouse_before_lpm 
+018f 600141ed store 2 ,mem_cb_before_lpm 
+0190 580001c7 setarg p_mouse_priority_bb_event 
+0191 600141f5 store 2 ,mem_cb_bb_event_process 
+0192 580001c4 setarg p_mouse_idle 
+0193 600141f3 store 2 ,mem_cb_idle_process 
+0194 58000220 setarg p_mouse_before_hibernate 
+0195 600141eb store 2 ,mem_cb_before_hibernate 
+0196 5800022e setarg p_mouse_bb_event_timer 
+0197 600141fd store 2 ,mem_cb_event_timer 
+0198 58003d36 setarg mouse_spi_write_flash_cb 
+0199 60014201 store 2 ,mem_cb_spi_flash_write_complate 
+019a 20600000 rtn 
+
+p_mouse_g24_package_data:
+019b 20404401 call mouse_g24_package_data 
+019c 6801469f fetch 2 ,mem_mouse_z 
+019d 207a0000 rtn blank 
+019e 20200078 branch p_g24_transmit_by_interrupt_enable 
 
 p_mouse_le:
-015a 20405892 call le_fifo_check_nearly_full 
-015b 247a0000 nrtn blank 
-015c 6800cb1b fetch 1 ,mem_mouse_fast_conn_flag 
-015d c07f8161 beq 0xff ,p_mouse_le_next 
-015e 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
-015f 1fe17e03 and pdata ,0x03 ,pdata 
-0160 c1818000 rtnne 0x03 
+019f 20405892 call le_fifo_check_nearly_full 
+01a0 247a0000 nrtn blank 
+01a1 6800cb0a fetch 1 ,mem_mouse_fast_conn_flag 
+01a2 c07f81a6 beq 0xff ,p_mouse_le_next 
+01a3 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
+01a4 1fe17e03 and pdata ,0x03 ,pdata 
+01a5 c1818000 rtnne 0x03 
 
 p_mouse_le_next:
-0161 6800c79c fetch 1 ,mem_mouse_clear_sensor_data_flag 
-0162 205a01ab call p_mouse_clear_sensor_data ,blank 
-0163 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-0164 c282c179 bbit1 mouse_bt_discovery_button_down_flag ,mouse_le_send_empty_packet 
-0165 20403f97 call mouse_motion 
-0166 24740000 nrtn user 
-0167 20400183 call p_mouse_wheel_trigger 
-0168 2020016e branch p_mouse_data_push 
-
-p_mouse_data_init:
-0169 7047a007 jam 7 ,mem_mouse_data_queue 
-016a 7047a104 jam 4 ,mem_mouse_data_queue + 1 
-016b 580047a0 setarg mem_mouse_data_queue 
-016c 60014218 store 2 ,mem_queue_ptr 
-016d 20207e38 branch queue_init 
-
-p_mouse_data_push:
-016e da20469a arg mem_mouse_key ,rega 
-016f 20407e3d call queue_push 
-0170 20540172 call p_mouse_queue_increase ,user 
-0171 20600000 rtn 
-
-p_mouse_queue_increase:
-0172 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
-0173 1fe0fe01 increase 1 ,pdata 
-0174 6000c7c1 store 1 ,mem_mouse_data_queue_num 
-0175 20600000 rtn 
-
-p_mouse_data_pull:
-0176 da20469a arg mem_mouse_key ,rega 
-0177 20407e54 call queue_pop 
-0178 2034017a branch p_mouse_fill_data_le ,user 
-0179 20600000 rtn 
-
-p_mouse_fill_data_le:
-017a 20405652 call le_clear_md 
-017b 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
-017c 1fe67c01 sub pdata ,1 ,null 
-017d 24415650 ncall le_set_md ,positive 
-017e 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
-017f 207a0000 rtn blank 
-0180 1fe0ffff increase -1 ,pdata 
-0181 6000c7c1 store 1 ,mem_mouse_data_queue_num 
-0182 20203f90 branch mouse_fill_data_le 
+01a6 6800c79c fetch 1 ,mem_mouse_clear_sensor_data_flag 
+01a7 205a01c1 call p_mouse_clear_sensor_data ,blank 
+01a8 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+01a9 c282c179 bbit1 mouse_bt_discovery_button_down_flag ,mouse_le_send_empty_packet 
+01aa 20403f97 call mouse_motion 
+01ab 24740000 nrtn user 
+01ac 6801469f fetch 2 ,mem_mouse_z 
+01ad 245a01af ncall p_mouse_wheel_trigger ,blank 
+01ae 20200699 branch p_mouse_data_push 
 
 p_mouse_wheel_trigger:
-0183 6801469f fetch 2 ,mem_mouse_z 
-0184 207a0000 rtn blank 
-0185 70480601 jam 1 ,mem_mouse_wheel_trigger 
-0186 7048070a jam 10 ,mem_mouse_wheel_trigger_timer 
-0187 20600000 rtn 
+01af 70480601 jam 1 ,mem_mouse_wheel_trigger 
+01b0 70480702 jam 2 ,mem_mouse_wheel_trigger_timer 
+01b1 20600000 rtn 
 
 p_mouse_bt:
-0188 20770000 rtn attempt 
-0189 6800c1e2 fetch 1 ,mem_app_handshake_flag 
-018a 207a0000 rtn blank 
-018b 20405271 call l2cap_malloc_is_fifo_nearly_full 
-018c 247a0000 nrtn blank 
-018d 6800c79c fetch 1 ,mem_mouse_clear_sensor_data_flag 
-018e 205a01ab call p_mouse_clear_sensor_data ,blank 
-018f 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-0190 c282bf8a bbit1 mouse_bt_discovery_button_down_flag ,mouse_send_empty_data 
-0191 c284bf8a bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_send_empty_data 
-0192 20403f97 call mouse_motion 
-0193 24740000 nrtn user 
-0194 20400183 call p_mouse_wheel_trigger 
-0195 6800cb03 fetch 1 ,mem_mouse_bt_boot_mode 
-0196 c000819a beq 1 ,p_mouse_send_data_boot_mode 
-0197 6800cb0a fetch 1 ,mem_mouse_bt_send_first_package_flag 
-0198 207a0000 rtn blank 
-0199 20203f81 branch mouse_send_data 
-
-p_mouse_send_data_boot_mode:
-019a 6800c69a fetch 1 ,mem_mouse_key 
-019b 6000cb04 store 1 ,mem_mouse_bt_boot_data 
-019c 6800c69b fetch 1 ,mem_mouse_x 
-019d e0a08000 istore 1 ,contw 
-019e 6800c69d fetch 1 ,mem_mouse_y 
-019f e0a08000 istore 1 ,contw 
-01a0 6801469f fetch 2 ,mem_mouse_z 
-01a1 e0a10000 istore 2 ,contw 
-01a2 da200007 arg 7 ,rega 
-01a3 20404d63 call hid_malloc_tx_buff 
-01a4 6801424e fetch 2 ,mem_hid_int_remote_cid 
-01a5 e0a10000 istore 2 ,contw 
-01a6 580002a1 setarg 0x02a1 
-01a7 e0a10000 istore 2 ,contw 
-01a8 6802cb04 fetch 5 ,mem_mouse_bt_boot_data 
-01a9 e0a28000 istore 5 ,contw 
-01aa 20600000 rtn 
+01b2 20770000 rtn attempt 
+01b3 6800c1e2 fetch 1 ,mem_app_handshake_flag 
+01b4 207a0000 rtn blank 
+01b5 20405271 call l2cap_malloc_is_fifo_nearly_full 
+01b6 247a0000 nrtn blank 
+01b7 6800c79c fetch 1 ,mem_mouse_clear_sensor_data_flag 
+01b8 205a01c1 call p_mouse_clear_sensor_data ,blank 
+01b9 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+01ba c282bf8a bbit1 mouse_bt_discovery_button_down_flag ,mouse_send_empty_data 
+01bb c284bf8a bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_send_empty_data 
+01bc 20403f97 call mouse_motion 
+01bd 24740000 nrtn user 
+01be 6801469f fetch 2 ,mem_mouse_z 
+01bf 245a01af ncall p_mouse_wheel_trigger ,blank 
+01c0 20203f81 branch mouse_send_data 
 
 p_mouse_clear_sensor_data:
-01ab 20405814 call le_set_config_more_data 
-01ac 70479c01 jam 1 ,mem_mouse_clear_sensor_data_flag 
-01ad 202000c1 branch p_mouse_init_sensor_reset 
+01c1 20405814 call le_set_config_more_data 
+01c2 70479c01 jam 1 ,mem_mouse_clear_sensor_data_flag 
+01c3 20200111 branch p_mouse_sensor_poweron 
 
 p_mouse_idle:
-01ae 20407e34 call ui_check_paring_button 
-01af 20403d6a call mouse_dpi_cheak 
-01b0 20203ee0 branch mouse_wheel_check 
+01c4 20407e34 call ui_check_paring_button 
+01c5 20403d6a call mouse_dpi_cheak 
+01c6 20203ee0 branch mouse_wheel_check 
 
 p_mouse_priority_bb_event:
-01b1 1a627e00 copy regc ,pdata 
-01b2 c00a01c0 beq bt_evt_le_connected ,p_mouse_le_bb_event_connected 
-01b3 c00a81c7 beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
-01b4 c01481d1 beq bt_evt_le_enc_info ,p_mouse_le_enc_info 
-01b5 c01901d3 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
-01b6 c02001da beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
-01b7 c00201e8 beq bt_evt_reconn_failed ,p_mouse_bb_event_reconn_failed 
-01b8 c00981e8 beq bt_evt_reconn_page_timeout ,p_mouse_bb_event_reconn_timeout 
-01b9 c01381ef beq bt_evt_virtual_cable_unplug ,p_mouse_irtual_cable_unplug 
-01ba c00cb3df beq bt_evt_switch_not_accept ,app_bt_role_switch 
-01bb c01081f1 beq bt_evt_sniff_not_accept ,p_mouse_sniff_not_accept 
-01bc c00081f7 beq bt_evt_bb_connected ,p_mouse_bb_event_connected 
-01bd c00101fa beq bt_evt_bb_disconnected ,p_mouse_bb_event_disconnected 
-01be c01581ff beq bt_evt_switch_success_master ,p_mouse_enter_sniff_check 
-01bf 2020417d branch mouse_priority_bb_event + 1 
+01c7 1a627e00 copy regc ,pdata 
+01c8 c00a01d1 beq bt_evt_le_connected ,p_mouse_le_bb_event_connected 
+01c9 c00a81d8 beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
+01ca c01481e2 beq bt_evt_le_enc_info ,p_mouse_le_enc_info 
+01cb c01901e4 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+01cc c02001eb beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
+01cd c01c81f6 beq bt_evt_24g_pairing_complete ,p_mouse_24g_pairing_complete 
+01ce c01d020f beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
+01cf c01e021e beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
+01d0 2020417d branch mouse_priority_bb_event + 1 
 
 p_mouse_le_bb_event_connected:
-01c0 704b1a01 jam 1 ,mem_mouse_le_bb_connected_flag 
-01c1 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
-01c2 243a01c4 nbranch p_mouse_le_bb_event_connected_next ,blank 
-01c3 704b1814 jam 0x14 ,mem_mouse_send_secutiry_request_timer 
+01d1 704b0901 jam 1 ,mem_mouse_le_bb_connected_flag 
+01d2 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
+01d3 243a01d5 nbranch p_mouse_le_bb_event_connected_next ,blank 
+01d4 704b0714 jam 0x14 ,mem_mouse_send_secutiry_request_timer 
 
 p_mouse_le_bb_event_connected_next:
-01c4 204000c1 call p_mouse_init_sensor_reset 
-01c5 20400169 call p_mouse_data_init 
-01c6 202041c3 branch mouse_le_bb_event_connected 
+01d5 20400106 call p_mouse_init_sensor_reset 
+01d6 20400694 call p_mouse_data_init 
+01d7 202041c3 branch mouse_le_bb_event_connected 
 
 p_mouse_le_bb_disconnected:
-01c7 704b1a00 jam 0 ,mem_mouse_le_bb_connected_flag 
-01c8 20400210 call p_mouse_sensor_powerdown_check 
-01c9 58000007 setarg le_interval_8_75ms 
-01ca 60014496 store 2 ,mem_le_interval_min 
-01cb 60014498 store 2 ,mem_le_interval_min + 2 
-01cc 7047c400 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
-01cd 70479c00 jam 0 ,mem_mouse_clear_sensor_data_flag 
-01ce 20400169 call p_mouse_data_init 
-01cf 20405816 call le_clr_config_more_data 
-01d0 202041d9 branch mouse_bb_disconnected 
+01d8 704b0900 jam 0 ,mem_mouse_le_bb_connected_flag 
+01d9 2040022a call p_mouse_sensor_powerdown_check 
+01da 58000007 setarg le_interval_8_75ms 
+01db 60014496 store 2 ,mem_le_interval_min 
+01dc 60014498 store 2 ,mem_le_interval_min + 2 
+01dd 7047c400 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+01de 70479c00 jam 0 ,mem_mouse_clear_sensor_data_flag 
+01df 20400694 call p_mouse_data_init 
+01e0 20405816 call le_clr_config_more_data 
+01e1 202041d9 branch mouse_bb_disconnected 
 
 p_mouse_le_enc_info:
 
 p_app_updata_le_param:
-01d1 700a9912 jam bt_cmd_le_update_conn ,mem_fifo_temp 
-01d2 20207d8f branch ui_ipc_send_cmd 
+01e2 700a9912 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+01e3 20207d8f branch ui_ipc_send_cmd 
 
 p_mouse_le_ll_start_encryt:
-01d3 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
-01d4 c00081d6 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
-01d5 202001d8 branch p_mouse_le_ll_enable_start_enc_flag 
+01e4 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
+01e5 c00081e7 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+01e6 202001e9 branch p_mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_ll_reconn_start_encryt:
-01d6 204001d1 call p_app_updata_le_param 
-01d7 7046c614 jam 20 ,mem_le_start_encrypt_timer 
+01e7 204001e2 call p_app_updata_le_param 
+01e8 7046c614 jam 20 ,mem_le_start_encrypt_timer 
 
 p_mouse_le_ll_enable_start_enc_flag:
-01d8 d8e00001 arg ll_start_enc_flag ,queue 
-01d9 202041b9 branch mouse_le_enable_connect_flag 
+01e9 d8e00001 arg ll_start_enc_flag ,queue 
+01ea 202041b9 branch mouse_le_enable_connect_flag 
 
 p_mouse_le_conn_param_update_rsp_recieved:
-01da 68014509 fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
-01db c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
-01dc 68008441 fetch 1 ,mem_le_tsniff 
-01dd 1feb7e00 rshift2 pdata ,pdata 
-01de 1fe67c0c sub pdata ,le_interval_15ms ,null 
-01df 202101e6 branch p_mouse_le_conn_param_update_rsp_not_accepted ,positive 
-01e0 58000009 setarg le_interval_11_25ms 
-01e1 60014496 store 2 ,mem_le_interval_min 
-01e2 60014498 store 2 ,mem_le_interval_min + 2 
-01e3 204001d1 call p_app_updata_le_param 
+01eb 68014509 fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+01ec c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+01ed 68008441 fetch 1 ,mem_le_tsniff 
+01ee 1feb7e00 rshift2 pdata ,pdata 
+01ef 1fe67c0c sub pdata ,le_interval_15ms ,null 
+01f0 20610000 rtn positive 
+01f1 58000009 setarg le_interval_11_25ms 
+01f2 60014496 store 2 ,mem_le_interval_min 
+01f3 60014498 store 2 ,mem_le_interval_min + 2 
+01f4 204001e2 call p_app_updata_le_param 
+01f5 20200345 branch p_mouse_le_conn_param_lpm_disable 
+
+p_mouse_24g_pairing_complete:
+01f6 20400106 call p_mouse_init_sensor_reset 
+01f7 70478b01 jam 1 ,mem_mouse_24g_enter_lpm_enable 
+01f8 d8e00003 arg mosue_24g_pairing_flag ,queue 
+01f9 204043d2 call mouse_disable_function_flag 
+01fa 58000000 setarg 0 
+01fb 60014707 store 2 ,mem_24g_pairing_timer_count 
+01fc 7046a700 jam 0 ,mem_mouse_move_flag 
+01fd 6800c6e0 fetch 1 ,mem_config_sensor_type 
+01fe 1fe67c05 sub pdata ,p3610 ,null 
+01ff 2042c039 call mouse_read_sensor3610_data ,zero 
+0200 2442c05d ncall mouse_read_sensor_common ,zero 
+0201 6800cc48 fetch 1 ,mem_tx_power_temp 
+0202 6000c1de store 1 ,mem_tx_power 
+0203 68008004 fetch 1 ,mouse_flag_len ,mem_mouse_flag 
+0204 c289820b bbit1 mouse_enable_flash ,p_mouse_store_flash_24g_address 
+0205 20400207 call p_mouse_set_24g_addr_eeprom 
+0206 202065d1 branch iicd_write_protect_eep_data 
+
+p_mouse_set_24g_addr_eeprom:
+0207 da204bb9 arg mem_24g_addr ,rega 
+0208 da40005b arg mouse_g24_addr_eeprom_offect ,regb 
+0209 d8400004 arg 4 ,temp 
+020a 20600000 rtn 
+
+p_mouse_store_flash_24g_address:
+020b da404bb9 arg mem_24g_addr ,regb 
+020c ea420000 ifetch 4 ,regb 
+020d 6002477b store 4 ,mem_mouse_24g_addr 
+020e 20204435 branch mouse_store_flash_device_info 
+
+p_mouse_24g_attempt_fail:
+020f 2040022a call p_mouse_sensor_powerdown_check 
+0210 704cd100 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+0211 6800cc48 fetch 1 ,mem_tx_power_temp 
+0212 6000c1de store 1 ,mem_tx_power 
+0213 20400560 call p_g24_check_51cmd_stop_24g 
+0214 7041bd00 jam 0 ,mem_link_key_exists 
+0215 20404316 call mouse_eeprom_load_recon_info 
+0216 df200003 arg 3 ,loopcnt 
+0217 d8c04722 arg mem_device1_addr ,contr 
+0218 2040017f call p_pdata_0xff_check 
+0219 2034021b branch p_mouse_null_enter_hibernate_enable ,user 
 
-p_mouse_le_conn_param_lpm_disable:
-01e4 7047c401 jam le_lpm_disable ,mem_mouse_le_conn_param_reject 
-01e5 20600000 rtn 
+p_mouse_24g_attempt_fail_next:
+021a 202000d8 branch p_mouse_check_reconn_target 
 
-p_mouse_le_conn_param_update_rsp_not_accepted:
-01e6 704b1c01 jam 1 ,mem_mouse_le_updata_not_accepted_flag 
-01e7 2020039a branch p_mouse_le_conn_param_update_rsp_not_accepted_mult_reset 
-
-p_mouse_bb_event_reconn_timeout:
-
-p_mouse_bb_event_reconn_failed:
-01e8 68014682 fetch 2 ,mem_ui_state_map 
-01e9 c3860000 rtnbit1 ui_state_btn_down 
-01ea c3830000 rtnbit1 ui_state_bt_discovery 
-01eb c3858000 rtnbit1 ui_state_ble_adv 
-01ec 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-01ed c3828000 rtnbit1 mouse_bt_discovery_button_down_flag 
-01ee 202033a7 branch app_bb_hibernate 
-
-p_mouse_irtual_cable_unplug:
-01ef 2040438e call mouse_irtual_cable_unplug 
-01f0 202033a7 branch app_bb_hibernate 
-
-p_mouse_sniff_not_accept:
-01f1 6800c808 fetch 1 ,mem_mouse_enter_sniff_count 
-01f2 c1010000 rtneq 2 
-01f3 1fe0fe01 increase 1 ,pdata 
-01f4 6000c808 store 1 ,mem_mouse_enter_sniff_count 
-01f5 7041e312 jam classic_interval_11_25ms ,mem_sniff_param_interval 
-01f6 2020340e branch app_bt_enter_sniff 
-
-p_mouse_bb_event_connected:
-01f7 70480900 jam 0 ,mem_mouse_send_switch_req_timer 
-01f8 204000c1 call p_mouse_init_sensor_reset 
-01f9 202042ca branch mouse_stop_discovery 
-
-p_mouse_bb_event_disconnected:
-01fa 704aff00 jam 0 ,mem_bt_rcvd_switch_req_accept 
-01fb 704b0100 jam 0 ,mem_bt_send_lmp_setup_complete 
-01fc 704b0a00 jam 0 ,mem_mouse_bt_send_first_package_flag 
-01fd 20400210 call p_mouse_sensor_powerdown_check 
-01fe 202041d9 branch mouse_bb_disconnected 
-
-p_mouse_enter_sniff_check:
-01ff 6800c808 fetch 1 ,mem_mouse_enter_sniff_count 
-0200 c1810000 rtnne 2 
-0201 70480800 jam 0 ,mem_mouse_enter_sniff_count 
-0202 7041e30e jam 0x0e ,mem_sniff_param_interval 
-0203 2020340e branch app_bt_enter_sniff 
+p_mouse_null_enter_hibernate_enable:
+021b 70479d01 jam 1 ,mem_mouse_null_enter_hibernate_flag 
+021c 70479e28 jam 40 ,mem_mouse_null_enter_hibernate_timer 
+021d 20600000 rtn 
+
+p_mouse_24g_attempt_success:
+021e 20400106 call p_mouse_init_sensor_reset 
+021f 20203f8d branch mouse_no_data_timer_init 
 
 p_mouse_before_hibernate:
-0204 78347c00 enable user 
-0205 68120138 hfetch 4 ,0x8138 
-0206 79347e1a setflag user ,26 ,pdata 
-0207 6012004c hstore 4 ,core_lpm_reg 
-0208 20402c21 call lpm_write_ctrl 
-0209 20400210 call p_mouse_sensor_powerdown_check 
-020a 204074bd call disable_authrom 
-020b 20404482 call mouse_devce_led_off 
-020c 20403e9f call mouse_before_hibernate_wheel_gpio_set 
-020d 20400073 call p_mouse_setgpio_lpm_before 
-020e 6808c6f3 fetcht 1 ,mem_sensor_data_gpio 
-020f 202067ed branch gpio_clr_wake 
+0220 78347c00 enable user 
+0221 68120138 hfetch 4 ,0x8138 
+0222 79347e1a setflag user ,26 ,pdata 
+0223 6012004c hstore 4 ,core_lpm_reg 
+0224 20402c21 call lpm_write_ctrl 
+0225 2040022a call p_mouse_sensor_powerdown_check 
+0226 204074bd call disable_authrom 
+0227 20404482 call mouse_devce_led_off 
+0228 20403e9f call mouse_before_hibernate_wheel_gpio_set 
+0229 20203ebf branch mouse_lpm_before_common 
 
 p_mouse_sensor_powerdown_check:
-0210 6800cafe fetch 1 ,mem_mouse_init_sensor_reset_flag 
-0211 207a0000 rtn blank 
-0212 704afe00 jam 0 ,mem_mouse_init_sensor_reset_flag 
-0213 202000d0 branch p_mouse_sensor_powerdown 
+022a 6800cafe fetch 1 ,mem_mouse_init_sensor_reset_flag 
+022b 207a0000 rtn blank 
+022c 704afe00 jam 0 ,mem_mouse_init_sensor_reset_flag 
+022d 20200115 branch p_mouse_sensor_powerdown 
 
 p_mouse_bb_event_timer:
-0214 20400261 call p_mouse_adc_read 
-0215 20400292 call p_mouse_low_voltage_led_timer 
-0216 20400235 call p_mouse_wheel_trigger_timer 
-0217 20400255 call p_mouse_null_enter_hibernate_timer 
-0218 204002a0 call p_mouse_dpi_led_blink_delay_timer 
-0219 2040023a call p_mouse_bt_discovery_check 
-021a 20404234 call mouse_check_discovery_timeout_timer 
-021b 20404237 call mouse_check_direct_timeout_timer 
-021c 2040022a call p_mouse_le_enable_att_list_timer 
-021d 2040022d call p_mouse_le_send_smp_security_request_timer 
-021e 20400222 call p_mouse_send_switch_req_timer 
-021f 20404231 call mouse_check_hid_handshake_timer 
-0220 20400225 call p_mouse_bt_check_sniff_req_timeout_timer 
-0221 2020423a branch mouse_check_no_data_timeout_timer 
+022e 20400273 call p_mouse_adc_read 
+022f 204002a7 call p_mouse_low_voltage_led_timer 
+0230 2040023b call p_le_send_smp_security_request_timer 
+0231 20400243 call p_mouse_send_switch_req_timer 
+0232 20400246 call p_mouse_wheel_trigger_timer 
+0233 2040026a call p_mouse_null_enter_hibernate_timer 
+0234 2040024e call p_mouse_bt_discovery_check 
+0235 204002b5 call p_mouse_dpi_led_blink_delay_timer 
+0236 20404231 call mouse_check_hid_handshake_timer 
+0237 20404234 call mouse_check_discovery_timeout_timer 
+0238 20404237 call mouse_check_direct_timeout_timer 
+0239 2040423a call mouse_check_no_data_timeout_timer 
+023a 2020024b branch p_mouse_le_enable_att_list_timer 
+
+p_le_send_smp_security_request_timer:
+023b 6800cb09 fetch 1 ,mem_mouse_le_bb_connected_flag 
+023c 207a0000 rtn blank 
+023d da604b07 arg mem_mouse_send_secutiry_request_timer ,regc 
+023e da400240 arg p_le_pairing_sm_start_check ,regb 
+023f 2020336d branch timer_single_step 
+
+p_le_pairing_sm_start_check:
+0240 6800cb08 fetch 1 ,mem_le_send_security_request_flag 
+0241 247a0000 nrtn blank 
+0242 20205bf5 branch le_pairing_sm_start 
 
 p_mouse_send_switch_req_timer:
-0222 da604809 arg mem_mouse_send_switch_req_timer ,regc 
-0223 da40637a arg host_create_conn_resend ,regb 
-0224 2020336d branch timer_single_step 
-
-p_mouse_bt_check_sniff_req_timeout_timer:
-0225 da604b09 arg mem_mouse_bt_send_first_package_timer ,regc 
-0226 da400228 arg p_mouse_bt_send_first_package ,regb 
-0227 2020336d branch timer_single_step 
-
-p_mouse_bt_send_first_package:
-0228 704b0a01 jam 1 ,mem_mouse_bt_send_first_package_flag 
-0229 20600000 rtn 
-
-p_mouse_le_enable_att_list_timer:
-022a da6046c6 arg mem_le_start_encrypt_timer ,regc 
-022b da403d60 arg mouse_le_write_enable ,regb 
-022c 2020336d branch timer_single_step 
-
-p_mouse_le_send_smp_security_request_timer:
-022d 6800cb1a fetch 1 ,mem_mouse_le_bb_connected_flag 
-022e 207a0000 rtn blank 
-022f da604b18 arg mem_mouse_send_secutiry_request_timer ,regc 
-0230 da400232 arg p_mouse_le_pairing_sm_start_check ,regb 
-0231 2020336d branch timer_single_step 
-
-p_mouse_le_pairing_sm_start_check:
-0232 6800cb19 fetch 1 ,mem_le_send_security_request_flag 
-0233 247a0000 nrtn blank 
-0234 20205bf5 branch le_pairing_sm_start 
+0243 da604809 arg mem_mouse_send_switch_req_timer ,regc 
+0244 da40637a arg host_create_conn_resend ,regb 
+0245 2020336d branch timer_single_step 
 
 p_mouse_wheel_trigger_timer:
-0235 da604807 arg mem_mouse_wheel_trigger_timer ,regc 
-0236 da400238 arg p_mouse_wheel_trigger_disable ,regb 
-0237 2020336d branch timer_single_step 
+0246 da604807 arg mem_mouse_wheel_trigger_timer ,regc 
+0247 da400249 arg p_mouse_wheel_trigger_disable ,regb 
+0248 2020336d branch timer_single_step 
 
 p_mouse_wheel_trigger_disable:
-0238 70480600 jam 0 ,mem_mouse_wheel_trigger 
-0239 20600000 rtn 
+0249 70480600 jam 0 ,mem_mouse_wheel_trigger 
+024a 20600000 rtn 
+
+p_mouse_le_enable_att_list_timer:
+024b da6046c6 arg mem_le_start_encrypt_timer ,regc 
+024c da403d60 arg mouse_le_write_enable ,regb 
+024d 2020336d branch timer_single_step 
 
 p_mouse_bt_discovery_check:
-023a 6800c6f5 fetch 1 ,mem_config_function_enable 
-023b c2824394 bbit1 enable_bt_button ,mouse_bt_discovery_by_button 
+024e 6800c6f5 fetch 1 ,mem_config_function_enable 
+024f c2824394 bbit1 enable_bt_button ,mouse_bt_discovery_by_button 
 
 p_mouse_bt_discovery_commbination_key:
-023c 20404083 call mouse_check_key_gpio 
-023d c0030246 beq mouse_rm_button ,p_mouse_bt_discovery_commbination_key_down 
+0250 20404083 call mouse_check_key_gpio 
+0251 c003025a beq mouse_rm_button ,p_mouse_bt_discovery_commbination_key_down 
 
 p_mouse_bt_discovery_commbination_key_up:
-023e 6800c685 fetch 1 ,mem_ui_button_timeout 
-023f 6000c6da store 1 ,mem_combination_ui_button_count 
-0240 6800c6db fetch 1 ,mem_bt_discovey_button_statue 
-0241 c1008000 rtneq dpi_button_state_up 
-0242 7046db01 jam dpi_button_state_up ,mem_bt_discovey_button_statue 
-0243 d8e00009 arg mouse_bt_discovery_button_long_down_flag ,queue 
-0244 204043d2 call mouse_disable_function_flag 
-0245 202043ca branch mouse_bt_discovery_button_down_disable 
+0252 6800c685 fetch 1 ,mem_ui_button_timeout 
+0253 6000c6da store 1 ,mem_combination_ui_button_count 
+0254 6800c6db fetch 1 ,mem_bt_discovey_button_statue 
+0255 c1008000 rtneq dpi_button_state_up 
+0256 7046db01 jam dpi_button_state_up ,mem_bt_discovey_button_statue 
+0257 d8e00009 arg mouse_bt_discovery_button_long_down_flag ,queue 
+0258 204043d2 call mouse_disable_function_flag 
+0259 202043ca branch mouse_bt_discovery_button_down_disable 
 
 p_mouse_bt_discovery_commbination_key_down:
-0246 70479e28 jam 40 ,mem_mouse_null_enter_hibernate_timer 
-0247 20400249 call p_mouse_bt_discovery_timer 
-0248 202043b0 branch mouse_bt_discovery_commbination_key_down + 1 
+025a 70479e28 jam 40 ,mem_mouse_null_enter_hibernate_timer 
+025b 2040025d call p_mouse_bt_discovery_timer 
+025c 202043b0 branch mouse_bt_discovery_commbination_key_down + 1 
 
 p_mouse_bt_discovery_timer:
-0249 da6046da arg mem_combination_ui_button_count ,regc 
-024a da40024c arg p_mouse_long_button_bt_discovery ,regb 
-024b 2020336d branch timer_single_step 
+025d da6046da arg mem_combination_ui_button_count ,regc 
+025e da400260 arg p_mouse_long_button_bt_discovery ,regb 
+025f 2020336d branch timer_single_step 
 
 p_mouse_long_button_bt_discovery:
-024c 68014682 fetch 2 ,mem_ui_state_map 
-024d 2feffe0b isolate1 ui_state_ble_adv ,pdata 
-024e 2040c2d4 call mouse_stop_le_adv ,true 
-024f 68014682 fetch 2 ,mem_ui_state_map 
-0250 2feffe07 isolate1 ui_state_bt_reconnect ,pdata 
-0251 2040c392 call mouse_cancel_reconnect ,true 
-0252 d8e00009 arg mouse_bt_discovery_button_long_down_flag ,queue 
-0253 204043ce call mouse_enable_function_flag 
-0254 202043b8 branch mouse_long_button_bt_discovry 
+0260 2040022a call p_mouse_sensor_powerdown_check 
+0261 68014682 fetch 2 ,mem_ui_state_map 
+0262 2feffe0b isolate1 ui_state_ble_adv ,pdata 
+0263 2040c2d4 call mouse_stop_le_adv ,true 
+0264 68014682 fetch 2 ,mem_ui_state_map 
+0265 2feffe07 isolate1 ui_state_bt_reconnect ,pdata 
+0266 2040c392 call mouse_cancel_reconnect ,true 
+0267 d8e00009 arg mouse_bt_discovery_button_long_down_flag ,queue 
+0268 204043ce call mouse_enable_function_flag 
+0269 202043b8 branch mouse_long_button_bt_discovry 
 
 p_mouse_null_enter_hibernate_timer:
-0255 6800c79d fetch 1 ,mem_mouse_null_enter_hibernate_flag 
-0256 207a0000 rtn blank 
-0257 6800c79e fetch 1 ,mem_mouse_null_enter_hibernate_timer 
-0258 203a025c branch p_mouse_null_enter_hibernate ,blank 
-0259 1fe0ffff increase -1 ,pdata 
-025a 6000c79e store 1 ,mem_mouse_null_enter_hibernate_timer 
-025b 20600000 rtn 
+026a 6800c79d fetch 1 ,mem_mouse_null_enter_hibernate_flag 
+026b 207a0000 rtn blank 
+026c 6800c79e fetch 1 ,mem_mouse_null_enter_hibernate_timer 
+026d 203a0271 branch p_mouse_null_enter_hibernate ,blank 
+026e 1fe0ffff increase -1 ,pdata 
+026f 6000c79e store 1 ,mem_mouse_null_enter_hibernate_timer 
+0270 20600000 rtn 
 
 p_mouse_null_enter_hibernate:
-025c 70479d00 jam 0 ,mem_mouse_null_enter_hibernate_flag 
-025d 2020340a branch app_enter_hibernate 
-
-p_mouse_null_enter_hibernate_enable:
-025e 70479d01 jam 1 ,mem_mouse_null_enter_hibernate_flag 
-025f 70479e28 jam 40 ,mem_mouse_null_enter_hibernate_timer 
-0260 20600000 rtn 
+0271 70479d00 jam 0 ,mem_mouse_null_enter_hibernate_flag 
+0272 2020340a branch app_enter_hibernate 
 
 p_mouse_adc_read:
-0261 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-0262 c40d0000 rtnbit0 mouse_enable_adc 
-0263 6800c6ce fetch 1 ,mem_adc_read_timer 
-0264 1fe0fe01 increase 1 ,pdata 
-0265 6000c6ce store 1 ,mem_adc_read_timer 
-0266 1fe67c0a sub pdata ,10 ,null 
-0267 20610000 rtn positive 
-0268 7046ce00 jam 0 ,mem_adc_read_timer 
-0269 20400278 call p_adc_set_mode 
-026a 20406908 call vdd_calculate_by_mode 
-026b 6001470f store 2 ,mem_mouse_vdd_now_vol 
-026c da204709 arg mem_mouse_vdd_calculate_set ,rega 
-026d 20400283 call p_adc_bat_percent_lowpower_out 
-026e 6800c231 fetch 1 ,mem_adc_power_flag 
-026f c280b40a bbit1 1 ,app_enter_hibernate 
-0270 c3000273 bbit0 0 ,p_mouse_adc_no_low_voltage 
-0271 704afd01 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
-0272 202043e7 branch mouse_adc_low_voltage 
+0273 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+0274 c40d0000 rtnbit0 mouse_enable_adc 
+0275 6800c6ce fetch 1 ,mem_adc_read_timer 
+0276 1fe0fe01 increase 1 ,pdata 
+0277 6000c6ce store 1 ,mem_adc_read_timer 
+0278 1fe67c0a sub pdata ,10 ,null 
+0279 20610000 rtn positive 
+027a 7046ce00 jam 0 ,mem_adc_read_timer 
+027b 2040028a call p_adc_set_mode 
+027c 20406908 call vdd_calculate_by_mode 
+027d 6001470f store 2 ,mem_mouse_vdd_now_vol 
+027e da204709 arg mem_mouse_vdd_calculate_set ,rega 
+027f 20400298 call p_adc_bat_percent_lowpower_out 
+0280 6800c231 fetch 1 ,mem_adc_power_flag 
+0281 c280b40a bbit1 1 ,app_enter_hibernate 
+0282 c3000285 bbit0 0 ,p_mouse_adc_no_low_voltage 
+0283 704afd01 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
+0284 202043e7 branch mouse_adc_low_voltage 
 
 p_mouse_adc_no_low_voltage:
-0273 204043e9 call mouse_adc_no_low_voltage 
-0274 6800cafd fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
-0275 207a0000 rtn blank 
-0276 704afd00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
-0277 2020447a branch mouse_devce1_led_off 
+0285 204043e9 call mouse_adc_no_low_voltage 
+0286 6800cafd fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
+0287 207a0000 rtn blank 
+0288 704afd00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
+0289 2020447a branch mouse_devce1_led_off 
 
 p_adc_set_mode:
-0278 6800c22d fetch 1 ,mem_adc_config_flag 
-0279 c001027b beq adc_config_gpio ,p_adc_check_gpio 
-027a 202068ec branch adc_set_mode + 1 
+028a 6800c22d fetch 1 ,mem_adc_config_flag 
+028b c001028d beq adc_config_gpio ,p_adc_check_gpio 
+028c 202068ec branch adc_set_mode + 1 
 
 p_adc_check_gpio:
-027b 68108078 hfetch 1 ,core_gpio_pu0 
-027c 793ffe05 set0 5 ,pdata 
-027d 60108078 hstore 1 ,core_gpio_pu0 
-027e 204068f4 call adc_check_gpio 
-027f 68108078 hfetch 1 ,core_gpio_pu0 
-0280 79207e05 set1 5 ,pdata 
-0281 60108078 hstore 1 ,core_gpio_pu0 
-0282 20600000 rtn 
+028d 68108078 hfetch 1 ,core_gpio_pu0 
+028e 793ffe05 set0 5 ,pdata 
+028f 60108078 hstore 1 ,core_gpio_pu0 
+0290 7089718f jam 0x8f ,rf_adc_mode 
+0291 6800c22e fetch 1 ,mem_adc_channel 
+0292 60108973 hstore 1 ,rf_adc_ch 
+0293 204068f8 call read_adc 
+0294 68108078 hfetch 1 ,core_gpio_pu0 
+0295 79207e05 set1 5 ,pdata 
+0296 60108078 hstore 1 ,core_gpio_pu0 
+0297 20600000 rtn 
 
 p_adc_bat_percent_lowpower_out:
-0283 ea240000 ifetch 8 ,rega 
-0284 60040a9a store 8 ,mem_pdatatemp 
-0285 68090a9c fetcht 2 ,mem_pdatatemp + 2 
-0286 68010aa0 fetch 2 ,mem_pdatatemp + 6 
-0287 1fe3fe00 lshift pdata ,pdata 
-0288 1fe0fe08 pincrease 8 
-0289 98467c00 isub temp ,null 
-028a 24216944 nbranch adc_set_no_power_flag ,positive 
-028b 68090a9e fetcht 2 ,mem_pdatatemp + 4 
-028c 98467c00 isub temp ,null 
-028d 24216940 nbranch adc_set_low_power_flag ,positive 
+0298 ea240000 ifetch 8 ,rega 
+0299 60040a9a store 8 ,mem_pdatatemp 
+029a 68090a9c fetcht 2 ,mem_pdatatemp + 2 
+029b 68010aa0 fetch 2 ,mem_pdatatemp + 6 
+029c 1fe3fe00 lshift pdata ,pdata 
+029d 1fe0fe06 pincrease 6 
+029e 98467c00 isub temp ,null 
+029f 24216944 nbranch adc_set_no_power_flag ,positive 
+02a0 68090a9e fetcht 2 ,mem_pdatatemp + 4 
+02a1 98467c00 isub temp ,null 
+02a2 24216940 nbranch adc_set_low_power_flag ,positive 
 
 p_adc_clear_low_power_flag:
-028e 6800c231 fetch 1 ,mem_adc_power_flag 
-028f 793ffe00 set0 0 ,pdata 
-0290 6000c231 store 1 ,mem_adc_power_flag 
-0291 20600000 rtn 
+02a3 6800c231 fetch 1 ,mem_adc_power_flag 
+02a4 793ffe00 set0 0 ,pdata 
+02a5 6000c231 store 1 ,mem_adc_power_flag 
+02a6 20600000 rtn 
 
 p_mouse_low_voltage_led_timer:
-0292 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-0293 c4020000 rtnbit0 mouse_low_voltage_flag 
-0294 68014682 fetch 2 ,mem_ui_state_map 
-0295 c3858000 rtnbit1 ui_state_ble_adv 
-0296 c3830000 rtnbit1 ui_state_bt_discovery 
-0297 6800c6cf fetch 1 ,mem_adc_low_volatage_led_timer_count 
-0298 1fe0fe01 pincrease 1 
-0299 6000c6cf store 1 ,mem_adc_low_volatage_led_timer_count 
-029a c001c47a beq 3 ,mouse_devce1_led_off 
-029b 1fe67c14 sub pdata ,20 ,null 
-029c 2421029e nbranch p_mouse_device1_led_on ,positive 
-029d 20600000 rtn 
+02a7 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+02a8 c4020000 rtnbit0 mouse_low_voltage_flag 
+02a9 68014682 fetch 2 ,mem_ui_state_map 
+02aa c3858000 rtnbit1 ui_state_ble_adv 
+02ab c3830000 rtnbit1 ui_state_bt_discovery 
+02ac 6800c6cf fetch 1 ,mem_adc_low_volatage_led_timer_count 
+02ad 1fe0fe01 pincrease 1 
+02ae 6000c6cf store 1 ,mem_adc_low_volatage_led_timer_count 
+02af c001c47a beq 3 ,mouse_devce1_led_off 
+02b0 1fe67c14 sub pdata ,20 ,null 
+02b1 242102b3 nbranch p_mouse_device1_led_on ,positive 
+02b2 20600000 rtn 
 
 p_mouse_device1_led_on:
-029e 7046cf01 jam 1 ,mem_adc_low_volatage_led_timer_count 
-029f 20204489 branch mouse_device1_led_on 
+02b3 7046cf01 jam 1 ,mem_adc_low_volatage_led_timer_count 
+02b4 20204489 branch mouse_device1_led_on 
 
 p_mouse_dpi_led_blink_delay_timer:
-02a0 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-02a1 c40b8000 rtnbit0 mouse_enable_dpi_led_blink 
-02a2 da6046df arg mem_mouse_dpi_led_delay_count ,regc 
-02a3 da4002a5 arg p_mouse_dpi_led_setting ,regb 
-02a4 2020336d branch timer_single_step 
+02b5 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+02b6 c40b8000 rtnbit0 mouse_enable_dpi_led_blink 
+02b7 da6046df arg mem_mouse_dpi_led_delay_count ,regc 
+02b8 da4002ba arg p_mouse_dpi_led_setting ,regb 
+02b9 2020336d branch timer_single_step 
 
 p_mouse_dpi_led_setting:
-02a5 6800c6f4 fetch 1 ,mem_dpi_led_gpio 
-02a6 6000c715 store 1 ,mem_mouse_struct_led_gpio 
-02a7 580003e8 setarg led_dpi_blink_fixed 
-02a8 60014716 store 2 ,mem_mouse_on_time 
-02a9 60014718 store 2 ,mem_mouse_off_time 
-02aa da200000 arg 0 ,rega 
-02ab 6808c77a fetcht 1 ,mem_mouse_dpi 
-02ac 6008c714 storet 1 ,mem_mouse_blink_count 
-02ad 70471301 jam ui_led_state_blink_start ,mem_mouse_led_type 
-02ae 20600000 rtn 
+02ba 6800c6f4 fetch 1 ,mem_dpi_led_gpio 
+02bb 6000c715 store 1 ,mem_mouse_struct_led_gpio 
+02bc 580003e8 setarg led_dpi_blink_fixed 
+02bd 60014716 store 2 ,mem_mouse_on_time 
+02be 60014718 store 2 ,mem_mouse_off_time 
+02bf da200000 arg 0 ,rega 
+02c0 6808c77a fetcht 1 ,mem_mouse_dpi 
+02c1 6008c714 storet 1 ,mem_mouse_blink_count 
+02c2 70471301 jam ui_led_state_blink_start ,mem_mouse_led_type 
+02c3 20600000 rtn 
 
 p_mouse_seting_dpi:
-02af 204002dd call p_mosue_dpi_led_blink_init 
-
-p_mouse_seting_sensor_type:
-02b0 6800c6e0 fetch 1 ,mem_config_sensor_type 
-02b1 c00202ce beq p3212 ,p_mouse_seting_3212_dpi 
-02b2 c00302be beq p3065_xy ,p_mouse_seting_3065xy_dpi 
-02b3 c00382be beq mx8650 ,p_mouse_seting_3065xy_dpi 
-02b4 c00102d5 beq ka8 ,p_mouse_seting_ka8_dpi 
-
-p_mouse_seting_3205_dpi:
-02b5 6800c77a fetch 1 ,mem_mouse_dpi 
-02b6 1fe67c01 sub pdata ,mouse_dpi_level2 ,null 
-02b7 204282bc call p_mouse_3205_dpi_recount ,zero 
-02b8 6800c77a fetch 1 ,mem_mouse_dpi 
-02b9 c0003d8a beq mouse_dpi_level1 ,mouse_set_cpi1 
-02ba c001bd8e beq mouse_dpi_level4 ,mouse_set_cpi4 
-02bb 20203d8c branch mouse_set_cpi3 
-
-p_mouse_3205_dpi_recount:
-02bc 70477a02 jam mouse_dpi_level3 ,mem_mouse_dpi 
-02bd 20600000 rtn 
+02c4 204002d3 call p_mosue_dpi_led_blink_init 
+02c5 6800c6e0 fetch 1 ,mem_config_sensor_type 
+02c6 c002bdaa beq p3610 ,mouse_seting_3610_dpi 
+02c7 c0023d96 beq p3212 ,mouse_seting_3212_dpi 
+02c8 c00302ca beq p3065_xy ,p_mouse_seting_3065xy_dpi 
+02c9 20203d83 branch mouse_seting_dpi + 5 
 
 p_mouse_seting_3065xy_dpi:
-02be 6800c77a fetch 1 ,mem_mouse_dpi 
-02bf 1fe67c01 sub pdata ,mouse_dpi_level2 ,null 
-02c0 204282bc call p_mouse_3205_dpi_recount ,zero 
-02c1 6800c77a fetch 1 ,mem_mouse_dpi 
-02c2 c00002c8 beq mouse_dpi_level1 ,p_mouse_3065xy_set_cpi1 
-02c3 c00182cb beq mouse_dpi_level4 ,p_mouse_3065xy_set_cpi4 
-
-p_mouse_3065xy_set_cpi3:
-02c4 6800c781 fetch 1 ,mem_320x_dpi_3 
-02c5 1fe0ffff increase -1 ,pdata 
-
-p_mouse_dpi_store:
-02c6 6000c6b5 store 1 ,mem_mouse_cpi_count 
-02c7 20203dc1 branch mouse_p3205_dpi + 3 
-
-p_mouse_3065xy_set_cpi1:
-02c8 6800c77f fetch 1 ,mem_320x_dpi_1 
-02c9 1fe0ffff increase -1 ,pdata 
-02ca 202002c6 branch p_mouse_dpi_store 
-
-p_mouse_3065xy_set_cpi4:
-02cb 6800c782 fetch 1 ,mem_320x_dpi_4 
-02cc 1fe0ffff increase -1 ,pdata 
-02cd 202002c6 branch p_mouse_dpi_store 
-
-p_mouse_seting_3212_dpi:
-02ce 6800c77a fetch 1 ,mem_mouse_dpi 
-02cf 1fe67c01 sub pdata ,mouse_dpi_level2 ,null 
-02d0 204282bc call p_mouse_3205_dpi_recount ,zero 
-02d1 6800c77a fetch 1 ,mem_mouse_dpi 
-02d2 c0003d9d beq mouse_dpi_level1 ,mouse_set_p3212_cpi1 
-02d3 c001bda1 beq mouse_dpi_level4 ,mouse_set_p3212_cpi4 
-02d4 20203d9f branch mouse_set_p3212_cpi3 
-
-p_mouse_seting_ka8_dpi:
-02d5 6800c77a fetch 1 ,mem_mouse_dpi 
-02d6 205a02bc call p_mouse_3205_dpi_recount ,blank 
-02d7 6800c77a fetch 1 ,mem_mouse_dpi 
-02d8 c000bd88 beq mouse_dpi_level2 ,mouse_set_cpi2 
-02d9 c00182db beq mouse_dpi_level4 ,p_mouse_ka8_set_cpi3 
-02da 20203d8e branch mouse_set_cpi4 
-
-p_mouse_ka8_set_cpi3:
-02db 58000005 setarg 5 
-02dc 20203dbe branch mouse_p3205_dpi 
+02ca 6800c77a fetch 1 ,mem_mouse_dpi 
+02cb 205a02d1 call p_mouse_3065xy_dpi_recount ,blank 
+02cc 6800c77a fetch 1 ,mem_mouse_dpi 
+02cd c000bd8a beq mouse_dpi_level2 ,mouse_set_cpi1 
+02ce c0013d8c beq mouse_dpi_level3 ,mouse_set_cpi3 
+02cf c001bd8e beq mouse_dpi_level4 ,mouse_set_cpi4 
+02d0 20203d8c branch mouse_set_cpi3 
+
+p_mouse_3065xy_dpi_recount:
+02d1 70477a01 jam 1 ,mem_mouse_dpi 
+02d2 20600000 rtn 
 
 p_mosue_dpi_led_blink_init:
-02dd 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-02de c40b8000 rtnbit0 mouse_enable_dpi_led_blink 
-02df 7046df01 jam 1 ,mem_mouse_dpi_led_delay_count 
-02e0 6800c6f4 fetch 1 ,mem_dpi_led_gpio 
-02e1 6000c715 store 1 ,mem_mouse_struct_led_gpio 
-02e2 20600000 rtn 
-
-p_mouse_motion:
-02e3 78547c00 disable user 
-02e4 58000000 setarg 0 
-02e5 6003469b store 6 ,mem_mouse_x 
-02e6 20403fb5 call mouse_cheak_sensor_data 
-02e7 20404079 call mouse_zwheel 
-02e8 2040407e call mouse_t_zwheel 
-02e9 20404099 call mouse_key 
-02ea 2434056d nbranch p_drawing_optima_init ,user 
-02eb 20400570 call p_drawing_optima 
-02ec 20203fa0 branch mouse_motion + 9 
+02d3 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+02d4 c40b8000 rtnbit0 mouse_enable_dpi_led_blink 
+02d5 7046df01 jam 1 ,mem_mouse_dpi_led_delay_count 
+02d6 6800c6f4 fetch 1 ,mem_dpi_led_gpio 
+02d7 6000c715 store 1 ,mem_mouse_struct_led_gpio 
+02d8 20600000 rtn 
+
+p_mouse_bb_disconnected:
+02d9 70480800 jam 0 ,mem_mouse_enter_sniff_count 
+02da 7041e30e jam 0x0e ,mem_sniff_param_interval 
+02db 204041e7 call mouse_bb_discon_clear_stack 
+02dc 68014208 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+02dd c283c1f5 bbit1 app_disc_ble ,mouse4_0_event_bb_disconn 
+02de c28033a9 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+02df c28082e3 bbit1 app_disc_after_pairing ,p_mouse_event_light_state_pairing 
+02e0 c28102e6 bbit1 app_disc_after_reconn ,p_mouse_event_light_state_hibernate 
+02e1 c28182e6 bbit1 app_disc_after_sniff ,p_mouse_event_light_state_hibernate 
+02e2 202042b0 branch mouse_start_discovery 
+
+p_mouse_event_light_state_pairing:
+02e3 c28282e6 bbit1 app_disc_after_handshake ,p_mouse_event_light_state_hibernate 
+02e4 c28182e6 bbit1 app_disc_after_sniff ,p_mouse_event_light_state_hibernate 
+02e5 202042b0 branch mouse_start_discovery 
+
+p_mouse_event_light_state_hibernate:
+02e6 68014682 fetch 2 ,mem_ui_state_map 
+02e7 c28642b0 bbit1 ui_state_btn_down ,mouse_start_discovery 
+02e8 204033a9 call app_disconn_reason_clear 
+02e9 20404083 call mouse_check_key_gpio 
+02ea c003821b beq mouse_lmr_button ,p_mouse_null_enter_hibernate_enable 
+02eb 202033a7 branch app_bb_hibernate 
 
 p_mouse_bb_event_discovery_btn:
-02ed 70479d00 jam 0 ,mem_mouse_null_enter_hibernate_flag 
-02ee 70479e00 jam 0 ,mem_mouse_null_enter_hibernate_timer 
+02ec 70479d00 jam 0 ,mem_mouse_null_enter_hibernate_flag 
+02ed 70479e00 jam 0 ,mem_mouse_null_enter_hibernate_timer 
+02ee c51302f0 bmark1 mark_24g ,p_mouse_switch_to_bt 
 02ef 2020426d branch mouse_bb_event_discovery_btn + 1 
 
+p_mouse_switch_to_bt:
+02f0 20400560 call p_g24_check_51cmd_stop_24g 
+02f1 2020426d branch mouse_bb_event_discovery_btn + 1 
+
 p_le_addr_random_config:
-02f0 204068a2 call load_adc_init 
-02f1 6801421d fetch 2 ,mem_0_5_adc_io_data 
-02f2 203a02f5 branch p_le_otp_adc_empty ,blank 
-02f3 600147c2 store 2 ,mem_random_addr_increase_count 
+02f2 204068a2 call load_adc_init 
+02f3 6801421d fetch 2 ,mem_0_5_adc_io_data 
+02f4 203a02f7 branch p_le_otp_adc_empty ,blank 
+02f5 600147c2 store 2 ,mem_random_addr_increase_count 
 
 p_le_addr_random_store:
-02f4 202002f8 branch p_mouse_store_eerpom_random_addr_increase_count 
+02f6 2020031d branch p_mouse_store_eerpom_random_addr_increase_count 
 
 p_le_otp_adc_empty:
-02f5 58001122 setarg 0x1122 
-02f6 600147c2 store 2 ,mem_random_addr_increase_count 
-02f7 202002f4 branch p_le_addr_random_store 
-
-p_mouse_store_eerpom_random_addr_increase_count:
-02f8 d8400002 arg 2 ,temp 
-02f9 da2047c2 arg mem_random_addr_increase_count ,rega 
-02fa da40005f arg mouse_random_addr_count_eeprom_offset ,regb 
-02fb 202065d1 branch iicd_write_protect_eep_data 
-
-p_mouse_load_eeprom_random_addr_increase_count:
-02fc d8400002 arg 2 ,temp 
-02fd da2047c2 arg mem_random_addr_increase_count ,rega 
-02fe da40005f arg mouse_random_addr_count_eeprom_offset ,regb 
-02ff 202065df branch iicd_read_eep_data 
+02f7 58001122 setarg 0x1122 
+02f8 600147c2 store 2 ,mem_random_addr_increase_count 
+02f9 202002f6 branch p_le_addr_random_store 
 
 p_mouse_start_discovery:
-0300 704b1900 jam 0 ,mem_le_send_security_request_flag 
-0301 70479c00 jam 0 ,mem_mouse_clear_sensor_data_flag 
-0302 20400088 call p_mouse_tx_power_init 
-0303 68014682 fetch 2 ,mem_ui_state_map 
-0304 c285830f bbit1 ui_state_ble_adv ,p_mouse_start_discovery_norandom 
-0305 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
-0306 c30c030f bbit0 mouse_enable_ble_random_addre ,p_mouse_start_discovery_norandom 
-0307 204002fc call p_mouse_load_eeprom_random_addr_increase_count 
-0308 680947c2 fetcht 2 ,mem_random_addr_increase_count 
-0309 18408401 increase 1 ,temp 
-030a 600947c2 storet 2 ,mem_random_addr_increase_count 
-030b 600944a1 storet 2 ,mem_le_lap + 1 
-030c 204002f8 call p_mouse_store_eerpom_random_addr_increase_count 
-030d 180a7e00 random pdata 
-030e 6000c4a0 store 1 ,mem_le_lap 
+02fa 704b0800 jam 0 ,mem_le_send_security_request_flag 
+02fb 6800cc48 fetch 1 ,mem_tx_power_temp 
+02fc 6000c1de store 1 ,mem_tx_power 
+02fd 70479c00 jam 0 ,mem_mouse_clear_sensor_data_flag 
+02fe 68014682 fetch 2 ,mem_ui_state_map 
+02ff c285830a bbit1 ui_state_ble_adv ,p_mouse_start_discovery_norandom 
+0300 680246d3 fetch mouse_flag_len ,mem_mouse_flag 
+0301 c30c030a bbit0 mouse_enable_ble_random_addre ,p_mouse_start_discovery_norandom 
+0302 20400321 call p_mouse_load_eeprom_random_addr_increase_count 
+0303 680947c2 fetcht 2 ,mem_random_addr_increase_count 
+0304 18408401 increase 1 ,temp 
+0305 600947c2 storet 2 ,mem_random_addr_increase_count 
+0306 600944a1 storet 2 ,mem_le_lap + 1 
+0307 2040031d call p_mouse_store_eerpom_random_addr_increase_count 
+0308 180a7e00 random pdata 
+0309 6000c4a0 store 1 ,mem_le_lap 
 
 p_mouse_start_discovery_norandom:
-030f 20403402 call app_ble_disconnect 
-0310 58ed8e0e setarg 0xed8e0e 
-0311 6001c4a3 store 3 ,mem_le_lap + 3 
-0312 704b1b5a jam 0x5a ,mem_mouse_fast_conn_flag 
-0313 204000f0 call p_mouse_store_fast_conn_flag 
-0314 20403418 call app_lpm_mult_disable 
-0315 68014687 fetch 2 ,mem_discovery_timeout 
-0316 600146ac store 2 ,mem_mouse_discovery_timer 
-0317 70016d06 jam 6 ,mem_connection_options 
-0318 58000000 setarg 0 
-0319 600146b0 store 2 ,mem_mouse_no_data_timer 
-031a 600146ae store 2 ,mem_mouse_direct_timer 
-031b d8e00007 arg mouse_store_eeprom_flag ,queue 
-031c 204043ce call mouse_enable_function_flag 
-031d 204043ca call mouse_bt_discovery_button_down_disable 
-031e 6800c092 fetch 1 ,mem_device_option 
-031f 2feffe01 isolate1 mode_4_mouse ,pdata 
-0320 20408322 call p_check_51cmd_adv ,true 
-0321 202042c4 branch mouse_start_discovery_norandom + 13 
+030a 20403402 call app_ble_disconnect 
+030b 58ed8e0e setarg 0xed8e0e 
+030c 6001c4a3 store 3 ,mem_le_lap + 3 
+030d 704b0a5a jam 0x5a ,mem_mouse_fast_conn_flag 
+030e 2040013c call p_mouse_store_fast_conn_flag 
+030f 20403418 call app_lpm_mult_disable 
+0310 68014687 fetch 2 ,mem_discovery_timeout 
+0311 600146ac store 2 ,mem_mouse_discovery_timer 
+0312 70016d06 jam 6 ,mem_connection_options 
+0313 58000000 setarg 0 
+0314 600146b0 store 2 ,mem_mouse_no_data_timer 
+0315 600146ae store 2 ,mem_mouse_direct_timer 
+0316 d8e00007 arg mouse_store_eeprom_flag ,queue 
+0317 204043ce call mouse_enable_function_flag 
+0318 204043ca call mouse_bt_discovery_button_down_disable 
+0319 6800c092 fetch 1 ,mem_device_option 
+031a 2feffe01 isolate1 mode_4_mouse ,pdata 
+031b 20408325 call p_check_51cmd_adv ,true 
+031c 202042c4 branch mouse_start_discovery_norandom + 13 
+
+p_mouse_store_eerpom_random_addr_increase_count:
+031d d8400002 arg 2 ,temp 
+031e da2047c2 arg mem_random_addr_increase_count ,rega 
+031f da40005f arg mouse_random_addr_count_eeprom_offset ,regb 
+0320 202065d1 branch iicd_write_protect_eep_data 
+
+p_mouse_load_eeprom_random_addr_increase_count:
+0321 d8400002 arg 2 ,temp 
+0322 da2047c2 arg mem_random_addr_increase_count ,rega 
+0323 da40005f arg mouse_random_addr_count_eeprom_offset ,regb 
+0324 202065df branch iicd_read_eep_data 
 
 p_check_51cmd_adv:
-0322 70479f00 jam 0 ,mem_mouse_le_reconnect_flag 
-0323 204000a8 call p_le_check_adv_flag 
-0324 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
-0325 e0c08000 istore 1 ,contr 
-0326 20207df4 branch check_51cmd_adv 
+0325 70479f00 jam 0 ,mem_mouse_le_reconnect_flag 
+0326 204000ee call p_le_check_adv_flag 
+0327 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
+0328 e0c08000 istore 1 ,contr 
+0329 20207df4 branch check_51cmd_adv 
 
 p_mouse_stop_discovery:
-0327 58000000 setarg 0 
-0328 600146ac store 2 ,mem_mouse_discovery_timer 
-0329 704afe01 jam 1 ,mem_mouse_init_sensor_reset_flag 
-032a 204000cc call p_mouse_sensor_poweron 
-032b 202042cb branch mouse_stop_discovery + 1 
+032a 58000000 setarg 0 
+032b 600146ac store 2 ,mem_mouse_discovery_timer 
+032c 20400111 call p_mouse_sensor_poweron 
+032d 202042cb branch mouse_stop_discovery + 1 
 
 p_le_slave_match:
-032c 6800c50f fetch 1 ,mem_le_md_count 
-032d 1fe0fe01 pincrease 1 
-032e 6000c50f store 1 ,mem_le_md_count 
-032f c0065395 beq le_md_max_count ,le_slave_cont 
-0330 204055aa call le_acknowledge 
-0331 2040561e call le_prepare_tx 
-0332 20400510 call power_ctrl_start 
-0333 2020538f branch le_slave_match + 7 
+032e 6800c50f fetch 1 ,mem_le_md_count 
+032f 1fe0fe01 pincrease 1 
+0330 6000c50f store 1 ,mem_le_md_count 
+0331 c0065395 beq le_md_max_count ,le_slave_cont 
+0332 204055aa call le_acknowledge 
+0333 2040561e call le_prepare_tx 
+0334 204004f8 call power_ctrl_start 
+0335 2020538f branch le_slave_match + 7 
 
 p_le_next_adv_channel:
-0334 68008016 fetch 1 ,mem_le_ch_mapped 
-0335 1fe0fe01 increase 1 ,pdata 
-0336 60008016 store 1 ,mem_le_ch_mapped 
-0337 c1940000 rtnne 40 
-0338 70001625 jam 37 ,mem_le_ch_mapped 
-0339 20600000 rtn 
+0336 68008016 fetch 1 ,mem_le_ch_mapped 
+0337 1fe0fe01 increase 1 ,pdata 
+0338 60008016 store 1 ,mem_le_ch_mapped 
+0339 c1940000 rtnne 40 
+033a 70001625 jam 37 ,mem_le_ch_mapped 
+033b 20600000 rtn 
 
 p_le_receive_skip:
-033a 204029bb call save_rssi 
-033b 2040002b call p_rssi_signal 
-033c 202054a3 branch le_receive_skip + 2 
+033c 204029bb call save_rssi 
+033d 2040001f call p_rssi_signal 
+033e 202054a3 branch le_receive_skip + 2 
 
 p_le_update_param:
-033d 20400343 call p_mouse_le_conn_param_check 
-033e 2020557d branch le_update_param + 8 
+033f 20400347 call p_mouse_le_conn_param_check 
+0340 2020557d branch le_update_param + 8 
 
 p_mouse_le_lpm_mult_reinit:
-033f 6800c7c5 fetch 1 ,mem_lpm_mult_init 
-0340 6000c172 store 1 ,mem_lpm_mult 
+0341 6800c7c5 fetch 1 ,mem_lpm_mult_init 
+0342 6000c172 store 1 ,mem_lpm_mult 
 
 p_mouse_le_conn_param_lpm_enable:
-0341 7047c400 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
-0342 20600000 rtn 
+0343 7047c400 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+0344 20600000 rtn 
+
+p_mouse_le_conn_param_lpm_disable:
+0345 7047c401 jam le_lpm_disable ,mem_mouse_le_conn_param_reject 
+0346 20600000 rtn 
 
 p_mouse_le_conn_param_check:
-0343 6800c3d6 fetch 1 ,mem_le_new_conninterval 
-0344 1fe67c0c sub pdata ,le_interval_15ms ,null 
-0345 242101e4 nbranch p_mouse_le_conn_param_lpm_disable ,positive 
-0346 6800c3d8 fetch 1 ,mem_le_new_connslavelatency 
-0347 6808c7c5 fetcht 1 ,mem_lpm_mult_init 
-0348 98467c00 isub temp ,null 
-0349 2021033f branch p_mouse_le_lpm_mult_reinit ,positive 
+0347 6800c3d6 fetch 1 ,mem_le_new_conninterval 
+0348 1fe67c0c sub pdata ,le_interval_15ms ,null 
+0349 24210345 nbranch p_mouse_le_conn_param_lpm_disable ,positive 
 034a 6800c3d8 fetch 1 ,mem_le_new_connslavelatency 
-034b 6000c172 store 1 ,mem_lpm_mult 
-034c 20200341 branch p_mouse_le_conn_param_lpm_enable 
+034b 6808c7c5 fetcht 1 ,mem_lpm_mult_init 
+034c 98467c00 isub temp ,null 
+034d 20210341 branch p_mouse_le_lpm_mult_reinit ,positive 
+034e 6800c3d8 fetch 1 ,mem_le_new_connslavelatency 
+034f 6000c172 store 1 ,mem_lpm_mult 
+0350 20200343 branch p_mouse_le_conn_param_lpm_enable 
 
 p_le_update_channel_map:
-034d 6800843f fetch 1 ,mem_le_state 
-034e c4030000 rtnbit0 lestate_update_map 
-034f 20400352 call p_le_channel_map_overflow_check 
-0350 24740000 nrtn user 
-0351 202055a0 branch le_update_channel_map + 3 
+0351 6800843f fetch 1 ,mem_le_state 
+0352 c4030000 rtnbit0 lestate_update_map 
+0353 20400356 call p_le_channel_map_overflow_check 
+0354 24740000 nrtn user 
+0355 202055a0 branch le_update_channel_map + 3 
 
 p_le_channel_map_overflow_check:
-0352 78347c00 enable user 
-0353 6800845a fetch 1 ,mem_le_event_count + 1 
-0354 1ff1fe00 rshift4 pdata ,pdata 
-0355 c1878000 rtnne 0x0f 
-0356 68008460 fetch 1 ,mem_le_instant + 1 
-0357 1ff1fe00 rshift4 pdata ,pdata 
-0358 c1800000 rtnne 0x00 
-0359 20207fe9 branch disable_user 
+0356 78347c00 enable user 
+0357 6800845a fetch 1 ,mem_le_event_count + 1 
+0358 1ff1fe00 rshift4 pdata ,pdata 
+0359 c1878000 rtnne 0x0f 
+035a 68008460 fetch 1 ,mem_le_instant + 1 
+035b 1ff1fe00 rshift4 pdata ,pdata 
+035c c1800000 rtnne 0x00 
+035d 20207fe9 branch disable_user 
 
 p_le_prepare_tx:
-035a 68008456 fetch 1 ,mem_le_arq 
-035b c282836e bbit1 wak ,p_le_prepare_tx_wak 
-035c 20400502 call power_ctrl_pac_succ_incrs 
-035d 6800c78e fetch 1 ,mem_empty_count 
-035e 243a0364 nbranch p_le_send_empyt ,blank 
-035f 6800843f fetch 1 ,mem_le_state 
-0360 c3020368 bbit0 lestate_encryption ,p_le_tx_4 
-0361 680082da fetch 1 ,mem_le_rxbuf + 1 
-0362 203a0368 branch p_le_tx_4 ,blank 
-0363 20205664 branch le_send_empty 
+035e 68008456 fetch 1 ,mem_le_arq 
+035f c2828372 bbit1 wak ,p_le_prepare_tx_wak 
+0360 204004ea call power_ctrl_pac_succ_incrs 
+0361 6800c78e fetch 1 ,mem_empty_count 
+0362 243a0368 nbranch p_le_send_empyt ,blank 
+0363 6800843f fetch 1 ,mem_le_state 
+0364 c302036c bbit0 lestate_encryption ,p_le_tx_4 
+0365 680082da fetch 1 ,mem_le_rxbuf + 1 
+0366 203a036c branch p_le_tx_4 ,blank 
+0367 20205664 branch le_send_empty 
 
 p_le_send_empyt:
-0364 6800c78e fetch 1 ,mem_empty_count 
-0365 1fe0ffff increase -1 ,pdata 
-0366 6000c78e store 1 ,mem_empty_count 
-0367 20205664 branch le_send_empty 
+0368 6800c78e fetch 1 ,mem_empty_count 
+0369 1fe0ffff increase -1 ,pdata 
+036a 6000c78e store 1 ,mem_empty_count 
+036b 20205664 branch le_send_empty 
 
 p_le_tx_4:
-0368 6800c4c4 fetch 1 ,mem_le_pairing_state 
-0369 c082836b bne flag_le_pairing_after_auth ,p_in_le_tx_4 
-036a 70478e03 jam 3 ,mem_empty_count 
+036c 6800c4c4 fetch 1 ,mem_le_pairing_state 
+036d c082836f bne flag_le_pairing_after_auth ,p_in_le_tx_4 
+036e 70478e03 jam 3 ,mem_empty_count 
 
 p_in_le_tx_4:
-036b 20405892 call le_fifo_check_nearly_full 
-036c 205a0176 call p_mouse_data_pull ,blank 
-036d 20205622 branch le_prepare_tx + 4 
+036f 20405892 call le_fifo_check_nearly_full 
+0370 205a06a1 call p_mouse_data_pull ,blank 
+0371 20205622 branch le_prepare_tx + 4 
 
 p_le_prepare_tx_wak:
-036e 20400370 call p_le_check_tx_retransmit_setmd 
-036f 2020037c branch p_le_power_ctrl_pac_succ_decrs 
+0372 20400374 call p_le_check_tx_retransmit_setmd 
+0373 20200380 branch p_le_power_ctrl_pac_succ_decrs 
 
 p_le_check_tx_retransmit_setmd:
-0370 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
-0371 1fe17e03 and pdata ,0x03 ,pdata 
-0372 c1818000 rtnne 0x03 
-0373 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
-0374 207a0000 rtn blank 
-0375 6800c3dd fetch 1 ,mem_le_txlen 
-0376 207a0000 rtn blank 
-0377 6800c3dc fetch 1 ,mem_le_txheader 
-0378 79207e04 set1 md ,pdata 
-0379 6000c3dc store 1 ,mem_le_txheader 
-037a 20405650 call le_set_md 
-037b 20600000 rtn 
+0374 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
+0375 1fe17e03 and pdata ,0x03 ,pdata 
+0376 c1818000 rtnne 0x03 
+0377 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
+0378 207a0000 rtn blank 
+0379 6800c3dd fetch 1 ,mem_le_txlen 
+037a 207a0000 rtn blank 
+037b 6800c3dc fetch 1 ,mem_le_txheader 
+037c 79207e04 set1 md ,pdata 
+037d 6000c3dc store 1 ,mem_le_txheader 
+037e 20405650 call le_set_md 
+037f 20600000 rtn 
 
 p_le_power_ctrl_pac_succ_decrs:
-037c 20200506 branch power_ctrl_pac_succ_decrs 
+0380 202004ee branch power_ctrl_pac_succ_decrs 
 
 p_mouse_le_reconn_write_enable_timer_reinit:
-037d 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
-037e 207a0000 rtn blank 
-037f 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
-0380 1fe17e03 and pdata ,0x03 ,pdata 
-0381 c1018000 rtneq 0x03 
-0382 7046c60a jam 10 ,mem_le_start_encrypt_timer 
-0383 20600000 rtn 
+0381 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
+0382 207a0000 rtn blank 
+0383 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
+0384 1fe17e03 and pdata ,0x03 ,pdata 
+0385 c1018000 rtneq 0x03 
+0386 7046c60a jam 10 ,mem_le_start_encrypt_timer 
+0387 20600000 rtn 
 
 p_le_parse:
-0384 c6078000 rtnmark1 mark_old_packet 
-0385 20405890 call le_fifo_check_full 
-0386 247a0000 nrtn blank 
-0387 680082d9 fetch 1 ,mem_le_rxbuf 
-0388 1fe17e03 and pdata ,0x3 ,pdata 
-0389 6000c50c store 1 ,mem_le_packet_llid 
-038a e8c08000 ifetch 1 ,contr 
-038b 1fe17e1f and pdata ,0x1f ,pdata 
-038c 6000c50b store 1 ,mem_le_packet_size 
-038d 207a0000 rtn blank 
-038e 18c27e00 copy contr ,pdata 
-038f 6001450d store 2 ,mem_le_payload_ptr 
-0390 6800c50c fetch 1 ,mem_le_packet_llid 
-0391 c0018393 beq llid_le_ll ,p_le_parse_ll 
-0392 2020568d branch le_parse_l2cap 
+0388 c6078000 rtnmark1 mark_old_packet 
+0389 20405890 call le_fifo_check_full 
+038a 247a0000 nrtn blank 
+038b 680082d9 fetch 1 ,mem_le_rxbuf 
+038c 1fe17e03 and pdata ,0x3 ,pdata 
+038d 6000c50c store 1 ,mem_le_packet_llid 
+038e e8c08000 ifetch 1 ,contr 
+038f 1fe17e1f and pdata ,0x1f ,pdata 
+0390 6000c50b store 1 ,mem_le_packet_size 
+0391 207a0000 rtn blank 
+0392 18c27e00 copy contr ,pdata 
+0393 6001450d store 2 ,mem_le_payload_ptr 
+0394 6800c50c fetch 1 ,mem_le_packet_llid 
+0395 c0018397 beq llid_le_ll ,p_le_parse_ll 
+0396 2020568d branch le_parse_l2cap 
 
 p_le_parse_ll:
-0393 680082db fetch 1 ,mem_le_rxbuf + 2 
-0394 c0000397 beq ll_connection_update_req ,p_le_parse_connection_update_req 
-0395 c000839e beq ll_channel_map_req ,p_le_parse_channel_map_req 
-0396 20205c65 branch le_parse_ll + 1 
-
-p_le_parse_connection_update_req:
-0397 20405c7b call le_parse_connection_update_req 
-0398 6800cb1c fetch 1 ,mem_mouse_le_updata_not_accepted_flag 
-0399 207a0000 rtn blank 
-
-p_mouse_le_conn_param_update_rsp_not_accepted_mult_reset:
-039a 6800c3d8 fetch 1 ,mem_le_new_connslavelatency 
-039b 6000c172 store 1 ,mem_lpm_mult 
-039c 6000c7c5 store 1 ,mem_lpm_mult_init 
-039d 20600000 rtn 
+0397 680082db fetch 1 ,mem_le_rxbuf + 2 
+0398 c000839a beq ll_channel_map_req ,p_le_parse_channel_map_req 
+0399 20205c65 branch le_parse_ll + 1 
 
 p_le_parse_channel_map_req:
-039e e8c28000 ifetch 5 ,contr 
-039f 6002c3ce store 5 ,mem_le_new_map 
-03a0 e8c10000 ifetch 2 ,contr 
-03a1 6001045f store 2 ,mem_le_instant 
-03a2 20205c8a branch le_parse_channel_map_req + 7 
+039a e8c28000 ifetch 5 ,contr 
+039b 6002c3ce store 5 ,mem_le_new_map 
+039c e8c10000 ifetch 2 ,contr 
+039d 6001045f store 2 ,mem_le_instant 
+039e 20205c8a branch le_parse_channel_map_req + 7 
 
 p_le_parse_l2cap:
-03a3 e8c10000 ifetch 2 ,contr 
-03a4 c00203a7 beq le_l2cap_cid_att ,p_le_parse_att 
-03a5 c00303e5 beq le_l2cap_cid_smp ,p_le_parse_smp 
-03a6 20205698 branch le_parse_l2cap + 11 
+039f e8c10000 ifetch 2 ,contr 
+03a0 c00203a3 beq le_l2cap_cid_att ,p_le_parse_att 
+03a1 c00303e1 beq le_l2cap_cid_smp ,p_le_parse_smp 
+03a2 20205698 branch le_parse_l2cap + 11 
 
 p_le_parse_att:
-03a7 20407ea5 call store_contr 
-03a8 2040037d call p_mouse_le_reconn_write_enable_timer_reinit 
-03a9 20407e9f call get_contr 
-03aa e8c18000 ifetch 3 ,contr 
-03ab 60018477 store 3 ,mem_le_att_opcode 
-03ac c00803b6 beq attop_read_by_group_type_request ,p_le_parse_att_read_by_group_type_request 
-03ad 1fec8400 rshift8 pdata ,temp 
-03ae 18467c24 sub temp ,0x24 ,null 
-03af 202103c4 branch p_le_parse_att1 ,positive 
-03b0 d84047c6 arg mem_mouse_le_uuid_sup ,temp 
-03b1 600944bc storet 2 ,mem_ui_le_uuid_table 
-03b2 204058ad call le_parse_att + 2 
-03b3 58008e7a setarg 0x8e7a 
-03b4 600144bc store 2 ,mem_ui_le_uuid_table 
-03b5 20600000 rtn 
+03a3 20407ea5 call store_contr 
+03a4 20400381 call p_mouse_le_reconn_write_enable_timer_reinit 
+03a5 20407e9f call get_contr 
+03a6 e8c18000 ifetch 3 ,contr 
+03a7 60018477 store 3 ,mem_le_att_opcode 
+03a8 c00803b2 beq attop_read_by_group_type_request ,p_le_parse_att_read_by_group_type_request 
+03a9 1fec8400 rshift8 pdata ,temp 
+03aa 18467c24 sub temp ,0x24 ,null 
+03ab 202103c0 branch p_le_parse_att1 ,positive 
+03ac d84047c6 arg mem_mouse_le_uuid_sup ,temp 
+03ad 600944bc storet 2 ,mem_ui_le_uuid_table 
+03ae 204058ad call le_parse_att + 2 
+03af 58008e7a setarg 0x8e7a 
+03b0 600144bc store 2 ,mem_ui_le_uuid_table 
+03b1 20600000 rtn 
 
 p_le_parse_att_read_by_group_type_request:
-03b6 204059fa call le_parse_att_read_by_group_type_request 
-03b7 20405879 call le_fifo_get_last_tx_ptr 
-03b8 18c08c07 increase 7 ,contr 
-03b9 e8c08000 ifetch 1 ,contr 
-03ba c1888000 rtnne attop_read_by_group_type_response 
-03bb 18c08c05 increase 5 ,contr 
-03bc e8c10000 ifetch 2 ,contr 
-03bd d8401812 arg uuid_service_hids ,temp 
-03be 98467c00 isub temp ,null 
-03bf 24628000 nrtn zero 
-03c0 18c08dfc increase -4 ,contr 
-03c1 5800002b setarg 0x2b 
-03c2 e0c10000 istore 2 ,contr 
-03c3 20600000 rtn 
+03b2 204059fa call le_parse_att_read_by_group_type_request 
+03b3 20405879 call le_fifo_get_last_tx_ptr 
+03b4 18c08c07 increase 7 ,contr 
+03b5 e8c08000 ifetch 1 ,contr 
+03b6 c1888000 rtnne attop_read_by_group_type_response 
+03b7 18c08c05 increase 5 ,contr 
+03b8 e8c10000 ifetch 2 ,contr 
+03b9 d8401812 arg uuid_service_hids ,temp 
+03ba 98467c00 isub temp ,null 
+03bb 24628000 nrtn zero 
+03bc 18c08dfc increase -4 ,contr 
+03bd 5800002b setarg 0x2b 
+03be e0c10000 istore 2 ,contr 
+03bf 20600000 rtn 
 
 p_le_parse_att1:
-03c4 c00503c6 beq attop_read_request ,p_le_parse_att_read_request 
-03c5 202058ad branch le_parse_att + 2 
+03c0 c00503c2 beq attop_read_request ,p_le_parse_att_read_request 
+03c1 202058ad branch le_parse_att + 2 
 
 p_le_parse_att_read_request:
-03c6 68090478 fetcht 2 ,mem_le_att_handle 
-03c7 6800c4e9 fetch 1 ,mem_le_configuration 
-03c8 c28183de bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
+03c2 68090478 fetcht 2 ,mem_le_att_handle 
+03c3 6800c4e9 fetch 1 ,mem_le_configuration 
+03c4 c28183da bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
 
 p_le_send_att_read_response:
-03c9 2040576a call le_att_get_handle_ptr 
-03ca 203a5a76 branch le_send_att_error_response_notfound ,blank 
-03cb 18c08dfe increase -2 ,contr 
-03cc e8c10000 ifetch 2 ,contr 
-03cd d8402a50 arg uuid_chrctr_pnp_id ,temp 
-03ce 98467c00 isub temp ,null 
-03cf 202283d4 branch p_le_send_att_pnp_id ,zero 
-03d0 68010478 fetch 2 ,mem_le_att_handle 
-03d1 c009da76 beq 0x13 ,le_send_att_error_response_notfound 
-03d2 68090478 fetcht 2 ,mem_le_att_handle 
-03d3 202059bf branch le_send_att_read_response 
+03c5 2040576a call le_att_get_handle_ptr 
+03c6 203a5a76 branch le_send_att_error_response_notfound ,blank 
+03c7 18c08dfe increase -2 ,contr 
+03c8 e8c10000 ifetch 2 ,contr 
+03c9 d8402a50 arg uuid_chrctr_pnp_id ,temp 
+03ca 98467c00 isub temp ,null 
+03cb 202283d0 branch p_le_send_att_pnp_id ,zero 
+03cc 68010478 fetch 2 ,mem_le_att_handle 
+03cd c009da76 beq 0x13 ,le_send_att_error_response_notfound 
+03ce 68090478 fetcht 2 ,mem_le_att_handle 
+03cf 202059bf branch le_send_att_read_response 
 
 p_le_send_att_pnp_id:
-03d4 20407ea5 call store_contr 
-03d5 6800cb10 fetch 1 ,mem_le_att_pnp_id_len 
-03d6 1fe0a201 add pdata ,1 ,rega 
-03d7 20405a82 call le_fifo_malloc_tx_l2cap_gatt 
-03d8 5800000b setarg attop_read_response 
-03d9 e0a08000 istore 1 ,contw 
-03da 6800cb10 fetch 1 ,mem_le_att_pnp_id_len 
-03db 1fe27200 copy pdata ,loopcnt 
-03dc d8c04b11 arg mem_le_att_pnp_id ,contr 
-03dd 20207f01 branch memcpy 
+03d0 20407ea5 call store_contr 
+03d1 6800caff fetch 1 ,mem_le_att_pnp_id_len 
+03d2 1fe0a201 add pdata ,1 ,rega 
+03d3 20405a82 call le_fifo_malloc_tx_l2cap_gatt 
+03d4 5800000b setarg attop_read_response 
+03d5 e0a08000 istore 1 ,contw 
+03d6 6800caff fetch 1 ,mem_le_att_pnp_id_len 
+03d7 1fe27200 copy pdata ,loopcnt 
+03d8 d8c04b00 arg mem_le_att_pnp_id ,contr 
+03d9 20207f01 branch memcpy 
 
 p_le_send_att_read_response_check_auth:
-03de 680144fa fetch 2 ,mem_le_pairing_handle 
-03df 98467c00 isub temp ,null 
-03e0 242283c9 nbranch p_le_send_att_read_response ,zero 
-03e1 20405a42 call le_check_encrypt_state 
-03e2 243403c9 nbranch p_le_send_att_read_response ,user 
-03e3 70047a05 jam att_err_insufficient_authentication ,mem_le_err_code 
-03e4 20205a77 branch le_send_att_error_response 
+03da 680144fa fetch 2 ,mem_le_pairing_handle 
+03db 98467c00 isub temp ,null 
+03dc 242283c5 nbranch p_le_send_att_read_response ,zero 
+03dd 20405a42 call le_check_encrypt_state 
+03de 243403c5 nbranch p_le_send_att_read_response ,user 
+03df 70047a05 jam att_err_insufficient_authentication ,mem_le_err_code 
+03e0 20205a77 branch le_send_att_error_response 
 
 p_le_parse_smp:
-03e5 e8c08000 ifetch 1 ,contr 
-03e6 c00083e9 beq smp_pairing_request ,p_le_parse_smp_pairing_request 
-03e7 c00283eb beq smp_pairing_failed ,p_le_parse_smp_pairing_failed 
-03e8 20205af6 branch le_parse_smp + 2 
+03e1 e8c08000 ifetch 1 ,contr 
+03e2 c00083e5 beq smp_pairing_request ,p_le_parse_smp_pairing_request 
+03e3 c00283e7 beq smp_pairing_failed ,p_le_parse_smp_pairing_failed 
+03e4 20205af5 branch le_parse_smp + 1 
 
 p_le_parse_smp_pairing_request:
-03e9 704b1901 jam 1 ,mem_le_send_security_request_flag 
-03ea 20205b09 branch le_parse_smp_pairing_request 
+03e5 704b0801 jam 1 ,mem_le_send_security_request_flag 
+03e6 20205b09 branch le_parse_smp_pairing_request 
 
 p_le_parse_smp_pairing_failed:
-03eb 20405b5a call le_parse_smp_pairing_failed 
-03ec 6800843f fetch 1 ,mem_le_state 
-03ed 793ffe05 set0 lestate_update_param ,pdata 
-03ee 6000843f store 1 ,mem_le_state 
-03ef 20205c8e branch le_parse_terminate_ind 
+03e7 20405b5a call le_parse_smp_pairing_failed 
+03e8 6800843f fetch 1 ,mem_le_state 
+03e9 793ffe05 set0 lestate_update_param ,pdata 
+03ea 6000843f store 1 ,mem_le_state 
+03eb 20205c8e branch le_parse_terminate_ind 
 
 p_le_adv_not_match:
-03f0 68008016 fetch 1 ,mem_le_ch_mapped 
-03f1 c093d6f2 bne 39 ,le_adv_loop 
-03f2 204003f6 call p_le_adv_random_delay 
-03f3 d8e00000 arg le_adv_interval_timer ,queue 
-03f4 68014482 fetch 2 ,mem_le_adv_interval 
-03f5 20207f08 branch timer_init 
+03ec 68008016 fetch 1 ,mem_le_ch_mapped 
+03ed c093d6f2 bne 39 ,le_adv_loop 
+03ee 204003f2 call p_le_adv_random_delay 
+03ef d8e00000 arg le_adv_interval_timer ,queue 
+03f0 68014482 fetch 2 ,mem_le_adv_interval 
+03f1 20207f08 branch timer_init 
 
 p_le_adv_random_delay:
-03f6 180a7e00 random pdata 
-03f7 d84001ff arg 0x1ff ,temp 
-03f8 98417e00 iand temp ,pdata 
-03f9 1fe0fefa add pdata ,250 ,pdata 
-03fa 20203cbe branch delay 
+03f2 180a7e00 random pdata 
+03f3 d84001ff arg 0x1ff ,temp 
+03f4 98417e00 iand temp ,pdata 
+03f5 1fe0fefa add pdata ,250 ,pdata 
+03f6 20203cbe branch delay 
 
 p_le_lpm_setmult:
-03fb 7855fc00 disable wake 
-03fc 203703fe branch p_le_lpm_set_mult_attempt ,attempt 
-03fd 2436d806 nbranch le_lpm_lost ,match 
+03f7 7855fc00 disable wake 
+03f8 203703fa branch p_le_lpm_set_mult_attempt ,attempt 
+03f9 2436d806 nbranch le_lpm_lost ,match 
 
 p_le_lpm_set_mult_attempt:
-03fe 20402bcb call lpm_match 
-03ff 680140c1 fetch 2 ,mem_rx_window_sniff 
-0400 6001044d store 2 ,mem_le_receive_window 
-0401 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
-0402 2fe00603 compare 3 ,pdata ,3 
-0403 2420abde nbranch lpm_mult_short ,true 
-0404 202057fb branch le_lpm_set_mult_attempt + 3 
+03fa 20402bcb call lpm_match 
+03fb 680140c1 fetch 2 ,mem_rx_window_sniff 
+03fc 6001044d store 2 ,mem_le_receive_window 
+03fd 6800c6c5 fetch 1 ,mem_le_connect_status_flag 
+03fe 2fe00603 compare 3 ,pdata ,3 
+03ff 2420abde nbranch lpm_mult_short ,true 
+0400 202057fb branch le_lpm_set_mult_attempt + 3 
 
 p_le_mouse_bb_event_connect_complete:
-0405 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
-0406 247a0000 nrtn blank 
-0407 68008478 fetch 1 ,mem_le_att_handle 
-0408 1fe67e1a sub pdata ,26 ,pdata 
-0409 24628000 nrtn zero 
-040a 20203d60 branch mouse_le_write_enable 
+0401 6800c79f fetch 1 ,mem_mouse_le_reconnect_flag 
+0402 247a0000 nrtn blank 
+0403 68008478 fetch 1 ,mem_le_att_handle 
+0404 1fe67e1a sub pdata ,26 ,pdata 
+0405 24628000 nrtn zero 
+0406 20203d60 branch mouse_le_write_enable 
 
 p_twspi_reset:
-040b 68108077 hfetch 1 ,core_gpio_out3 
-040c 1fe17efd and_into 0xfd ,pdata 
-040d 60108077 hstore 1 ,core_gpio_out3 
-040e 68188073 hfetcht 1 ,core_gpio_oe3 
-040f 18418402 or_into 0x2 ,temp 
-0410 60188073 hstoret 1 ,core_gpio_oe3 
-0411 204063ee call twspi_disable 
-0412 184104fd and_into 0xfd ,temp 
-0413 2000000d nop 13 
-0414 204063f2 call twspi_enable 
-0415 60188073 hstoret 1 ,core_gpio_oe3 
-0416 20600000 rtn 
+0407 68108077 hfetch 1 ,core_gpio_out3 
+0408 1fe17efd and_into 0xfd ,pdata 
+0409 60108077 hstore 1 ,core_gpio_out3 
+040a 68188073 hfetcht 1 ,core_gpio_oe3 
+040b 18418402 or_into 0x2 ,temp 
+040c 60188073 hstoret 1 ,core_gpio_oe3 
+040d 204063ee call twspi_disable 
+040e 184104fd and_into 0xfd ,temp 
+040f 2000000d nop 13 
+0410 204063f2 call twspi_enable 
+0411 60188073 hstoret 1 ,core_gpio_oe3 
+0412 20600000 rtn 
 
 p_check_51cmd_once_continue:
-0417 204062bc call lmo_fifo_check 
-0418 243a7ddb nbranch check_51cmd_restore ,blank 
-0419 68008a99 fetch 1 ,mem_fifo_temp 
-041a c584fdd6 bmark0 mark_context ,check_51cmd_check_idle 
-041b c009041d beq bt_cmd_le_update_conn ,p_check_51cmd_ble_update_connect_param 
-041c 20207dca branch check_51cmd_once_continue + 2 
+0413 204062bc call lmo_fifo_check 
+0414 243a7ddb nbranch check_51cmd_restore ,blank 
+0415 68008a99 fetch 1 ,mem_fifo_temp 
+0416 c584fdd6 bmark0 mark_context ,check_51cmd_check_idle 
+0417 c0090419 beq bt_cmd_le_update_conn ,p_check_51cmd_ble_update_connect_param 
+0418 20207dca branch check_51cmd_once_continue + 2 
 
 p_check_51cmd_ble_update_connect_param:
-041d 20405890 call le_fifo_check_full 
-041e 247a0000 nrtn blank 
-041f 20205abf branch le_l2cap_tx_update_req 
-
-p_page_wait_fhs_reply_ok:
-0420 6800800e fetch 1 ,mem_page_rcv_fhs 
-0421 1fe0fe01 increase 1 ,pdata 
-0422 6000800e store 1 ,mem_page_rcv_fhs 
-0423 20402435 call prepare_newconn 
-
-p_master_newconn_loop:
-0424 7920002c set1 mark_first_packet ,mark 
-0425 204022f2 call master_newconn_once 
-0426 202c042b branch p_newconn_poll_responded ,sync 
-0427 793f802c set0 mark_first_packet ,mark 
-0428 20402455 call new_conn_timeout 
-0429 243a0424 nbranch p_master_newconn_loop ,blank 
-042a 202020fc branch page_restart 
-
-p_newconn_poll_responded:
-042b 793f802c set0 mark_first_packet ,mark 
-042c 2020215f branch newconn_poll_responded 
-
-p_role_switch_master:
-042d 204021c9 call role_switch_check 
-042e 24740000 nrtn user 
-
-p_wait_role_switch_anchor:
-042f 78547c00 disable user 
-0430 70001120 jam param_newconnto ,mem_newconnto_counter 
-0431 793f800b set0 mark_fhs_already_good ,mark 
-0432 793f802d set0 mark_role_switch_receive_fhs ,mark 
-
-p_roles_waitfhs_loop:
-0433 20402a4f call rf_setup_time_master_slot 
-0434 204022e6 call master_recv_packet 
-0435 c505843a bmark1 mark_fhs_already_good ,p_roles_replyto_fhs 
-0436 20402455 call new_conn_timeout 
-0437 243a0433 nbranch p_roles_waitfhs_loop ,blank 
-0438 c5168442 bmark1 mark_role_switch_receive_fhs ,p_roles_replyto_fhs1 
-0439 202021ec branch role_switch_fail_master 
-
-p_roles_replyto_fhs:
-043a 20402a4d call rf_setup_time_slave_slot 
-043b d8200010 arg type_id ,type 
-043c 204022dc call master_send_packet 
-043d 7920002d set1 mark_role_switch_receive_fhs ,mark 
-043e 793f800b set0 mark_fhs_already_good ,mark 
-043f 18000801 force 1 ,am_addr 
-0440 70001102 jam 2 ,mem_newconnto_counter 
-0441 20200433 branch p_roles_waitfhs_loop 
-
-p_roles_replyto_fhs1:
-0442 68020165 fetch 4 ,mem_clke_bt 
-0443 1fe0fe08 pincrease 8 
-0444 60020165 store 4 ,mem_clke_bt 
-0445 202021f8 branch roles_replyto_fhs + 4 
-
-p_process_dmh:
-0446 c516264d bmark1 mark_first_packet ,end_of_packet 
-0447 2020258f branch process_dmh + 1 
-
-p_quit_connection_cont:
-0448 204033af call app_disconn_reason_collect_bt 
-0449 204026e9 call sniff_exit 
-044a 700a9902 jam bt_evt_bb_disconnected ,mem_fifo_temp 
-044b 20407d86 call ui_ipc_send_event 
-044c 20405cf7 call init_lmp_work 
-044d 20404d6b call l2cap_init_work 
-044e 2020246e branch quit_connection_cont + 8 
-
-p_prepare_tx:
-044f 68008030 fetch 1 ,mem_state 
-0450 2feffe00 isolate1 state_inconn ,pdata 
-0451 20408453 call p_bt_power_ctrl ,true 
-0452 2020248a branch prepare_tx + 1 
-
-p_bt_power_ctrl:
-0453 68008047 fetch 1 ,mem_arq 
-0454 2feffe03 isolate1 wack ,pdata 
-0455 20408506 call power_ctrl_pac_succ_decrs ,true 
-0456 24408502 ncall power_ctrl_pac_succ_incrs ,true 
-0457 20200510 branch power_ctrl_start 
-
-p_slave_conn_recv_packet:
-0458 204024f0 call slave_receive_master_slot 
-0459 242c28f9 nbranch shutdown_radio ,sync 
-045a 204029bb call save_rssi 
-045b 2040002b call p_rssi_signal 
-045c 20202518 branch slave_conn_recv_packet + 4 
-
-p_lpm_dispatch:
-045d c6130000 rtnmark1 mark_24g 
-045e 20402afa call lpo_calibration 
-045f 6801c16f fetch 3 ,mem_clks_per_lpo 
-0460 207a0000 rtn blank 
-0461 6800c091 fetch 1 ,mem_lpm_mode 
-0462 207a0000 rtn blank 
-0463 6800c65a fetch 1 ,mem_ssp_enable 
-0464 203a0467 branch p_lpm_dispatch_next ,blank 
-0465 6800c5b1 fetch 1 ,mem_sp_local_key_invalid 
-0466 207a0000 rtn blank 
-
-p_lpm_dispatch_next:
-0467 6800c4c0 fetch 1 ,mem_le_sc_calc 
-0468 247a0000 nrtn blank 
-0469 20402c3a call lpm_check_wake_lock 
-046a 247a0000 nrtn blank 
-046b 6800c040 fetch 1 ,mem_context 
-046c 2fe00e03 compare 3 ,pdata ,0x7 
-046d 2420ab9d nbranch lpm_dispatch_unconn ,true 
-046e 68014042 fetch 2 ,mem_context + coffset_tsniff 
-046f d840ffff arg 0xffff ,temp 
-0470 98467c00 isub temp ,null 
-0471 20628000 rtn zero 
-0472 20202b7d branch lpm_dispatch_next + 9 
-
-p_lpm_set_mult:
-0473 7855fc00 disable wake 
-0474 68008030 fetch 1 ,mem_state 
-0475 c4008000 rtnbit0 state_insniff 
-0476 2436abd0 nbranch lpm_not_match ,match 
-0477 20402bcb call lpm_match 
-0478 680140c1 fetch 2 ,mem_rx_window_sniff 
-0479 6001003e store 2 ,mem_rx_window 
-047a 68008047 fetch 1 ,mem_arq 
-047b c281abde bbit1 wack ,lpm_mult_short 
-047c c586abde bmark0 mark_lpm_mult_enable ,lpm_mult_short 
-047d 20405274 call l2cap_malloc_is_fifo_empty 
-047e 243a2bde nbranch lpm_mult_short ,blank 
-047f 205a0481 call p_lpm_set_attemp_timeout ,blank 
-0480 20202bbe branch lpm_set_mult + 13 
-
-p_lpm_set_attemp_timeout:
-0481 70008a01 jam 1 ,mem_current_sniff_attempt 
-0482 70008b00 jam 0 ,mem_current_sniff_timeout 
-0483 20600000 rtn 
-
-p_mouse_bb_disconnected:
-0484 70480800 jam 0 ,mem_mouse_enter_sniff_count 
-0485 7041e30e jam 0x0e ,mem_sniff_param_interval 
-0486 204041e7 call mouse_bb_discon_clear_stack 
-0487 68014208 fetch app_disc_rsn_size ,mem_app_disconn_reason 
-0488 c283c1f5 bbit1 app_disc_ble ,mouse4_0_event_bb_disconn 
-0489 c28033a9 bbit1 app_disc_by_button ,app_disconn_reason_clear 
-048a c280848e bbit1 app_disc_after_pairing ,p_mouse_event_light_state_pairing 
-048b c2810491 bbit1 app_disc_after_reconn ,p_mouse_event_light_state_hibernate 
-048c c2818491 bbit1 app_disc_after_sniff ,p_mouse_event_light_state_hibernate 
-048d 202042b0 branch mouse_start_discovery 
-
-p_mouse_event_light_state_pairing:
-048e c2828491 bbit1 app_disc_after_handshake ,p_mouse_event_light_state_hibernate 
-048f c2818491 bbit1 app_disc_after_sniff ,p_mouse_event_light_state_hibernate 
-0490 202042b0 branch mouse_start_discovery 
-
-p_mouse_event_light_state_hibernate:
-0491 68014682 fetch 2 ,mem_ui_state_map 
-0492 c28642b0 bbit1 ui_state_btn_down ,mouse_start_discovery 
-0493 204033a9 call app_disconn_reason_clear 
-0494 20404083 call mouse_check_key_gpio 
-0495 c003025e beq mouse_rm_button ,p_mouse_null_enter_hibernate_enable 
-0496 202033a7 branch app_bb_hibernate 
-
-p_hid_rx_process:
-0497 68010264 fetch 2 ,mem_l2cap_payload_ptr 
-0498 1fe20c00 copy pdata ,contr 
-0499 e8c08000 ifetch 1 ,contr 
-049a 6000cb02 store 1 ,mem_l2cap_rcv 
-049b 1fe1040f and pdata ,0x0f ,temp 
-049c 1ff1fe00 rshift4 pdata ,pdata 
-049d c003849f beq hid_type_set_protocol ,p_hid_rx_set_protocol 
-049e 20204d39 branch hid_rx_process + 6 
-
-p_hid_rx_set_protocol:
-049f 20404d53 call hid_rx_process_handshake 
-04a0 704b0300 jam 0 ,mem_mouse_bt_boot_mode 
-04a1 6800cb02 fetch 1 ,mem_l2cap_rcv 
-04a2 2feffe00 isolate1 0 ,pdata 
-04a3 20608000 rtn true 
-04a4 704b0301 jam 1 ,mem_mouse_bt_boot_mode 
-04a5 20600000 rtn 
-
-p_parse_lmp_accepted:
-04a6 68008552 fetch 1 ,mem_rxbuf + 1 
-04a7 600084c9 store 1 ,mem_lmi_accepted_opcode 
-04a8 c00984aa beq lmp_switch_req ,p_parse_lmp_accepted_switch 
-04a9 20205db4 branch parse_lmp_accepted + 3 
-
-p_parse_lmp_accepted_switch:
-04aa 20405dcf call parse_lmp_accepted_switch 
-04ab 704aff01 jam 1 ,mem_bt_rcvd_switch_req_accept 
-04ac 6800cb01 fetch 1 ,mem_bt_send_lmp_setup_complete 
-04ad 207a0000 rtn blank 
-04ae 704b0102 jam 2 ,mem_bt_send_lmp_setup_complete 
+0419 20405890 call le_fifo_check_full 
+041a 247a0000 nrtn blank 
+041b 20205abf branch le_l2cap_tx_update_req 
+
+p_g24_set_device_addr:
+041c 204068a8 call adc_init_data 
+041d 680240a0 fetch 4 ,mem_lap 
+041e 60024bc8 store 4 ,mem_24g_device_addr 
+041f 20600000 rtn 
+
+p_g24_transmit_rf_sta_init:
+0420 704cc701 jam 1 ,mem_24g_rf_last_sta 
+0421 704cc900 jam 0 ,mem_24g_sync_cnt 
+
+p_g24_transmit_rf_ctrl_clear:
+0422 6800cb92 fetch 1 ,mem_24g_data_type 
+0423 1fe17e07 and_into bits_data ,pdata 
+0424 6000cb92 store 1 ,mem_24g_data_type 
+0425 20600000 rtn 
+
+p_g24_hop_ch_enable:
+0426 6800cb92 fetch 1 ,mem_24g_data_type 
+0427 79207e04 set1 bit_hop ,pdata 
+0428 6000cb92 store 1 ,mem_24g_data_type 
+0429 6000cb4d store 1 ,mem_24g_txpayload 
+042a 20600000 rtn 
+
+p_g24_hop_ch_disable:
+042b 6800cb92 fetch 1 ,mem_24g_data_type 
+042c 793ffe04 set0 bit_hop ,pdata 
+042d 6000cb92 store 1 ,mem_24g_data_type 
+042e 20600000 rtn 
+
+p_g24_transmit_hop_pac_fail:
+042f 204004ee call power_ctrl_pac_succ_decrs 
+0430 6800ccc8 fetch 1 ,mem_24g_rf_work_stage 
+0431 c0008434 beq 1 ,p_g24_transmit_hop_pac_fail_wo_hop 
+0432 c0010438 beq 2 ,p_g24_transmit_hop_pac_fail_hop_stage2 
+0433 20600000 rtn 
+
+p_g24_transmit_hop_pac_fail_wo_hop:
+0434 704cc902 jam 2 ,mem_24g_sync_cnt 
+
+p_g24_transmit_hop_pac_fail_stage1:
+0435 704cc500 jam 0 ,mem_24g_hop_pac_retry 
+0436 704cc700 jam 0 ,mem_24g_rf_last_sta 
+0437 20200422 branch p_g24_transmit_rf_ctrl_clear 
+
+p_g24_transmit_hop_pac_fail_hop_stage2:
+0438 704cc600 jam 0 ,mem_24g_rf_hop_ch 
+0439 20200435 branch p_g24_transmit_hop_pac_fail_stage1 
+
+p_g24_transmit_pac_fail_hop_stage3:
+043a 68014b97 fetch 2 ,mem_24g_txfail_cnt 
+043b 1fe0fe01 increase 1 ,pdata 
+043c 60014b97 store 2 ,mem_24g_txfail_cnt 
+043d c28504dc bbit1 10 ,p_g24_tx_attempt_fail 
+043e 6800ccc6 fetch 1 ,mem_24g_rf_hop_ch 
+043f c0008443 beq 1 ,p_g24_rf_hop_fastly 
+0440 704cc601 jam 1 ,mem_24g_rf_hop_ch 
+
+p_g24_rf_hop_attemp_again:
+0441 6800ccc6 fetch 1 ,mem_24g_rf_hop_ch 
+0442 c0808422 bne 1 ,p_g24_transmit_rf_ctrl_clear 
+
+p_g24_rf_hop_fastly:
+0443 6800ccc4 fetch 1 ,mem_24g_hop_fastly_cnt 
+0444 1fe0fe01 increase 1 ,pdata 
+0445 6000ccc4 store 1 ,mem_24g_hop_fastly_cnt 
+0446 c002044a beq 4 ,p_g24_rf_hop_fastly_exit 
+0447 2040060a call p_g24_ch 
+0448 704bd602 jam 2 ,mem_24g_max_retry 
+0449 20200499 branch p_g24_transmit_packet 
+
+p_g24_rf_hop_fastly_exit:
+044a 204004ee call power_ctrl_pac_succ_decrs 
+044b 704cc400 jam 0 ,mem_24g_hop_fastly_cnt 
+044c 20200422 branch p_g24_transmit_rf_ctrl_clear 
+
+p_g24_transmit_hop_pac_succ_wo_hop:
+044d 704cc902 jam 2 ,mem_24g_sync_cnt 
+
+p_g24_transmit_hop_pac_succ:
+044e 704cc701 jam 1 ,mem_24g_rf_last_sta 
+044f 704cc600 jam 0 ,mem_24g_rf_hop_ch 
+0450 20200422 branch p_g24_transmit_rf_ctrl_clear 
+
+p_g24_transmit_succ_rf_config:
+0451 6800ccc8 fetch 1 ,mem_24g_rf_work_stage 
+0452 c001844e beq 3 ,p_g24_transmit_hop_pac_succ 
+0453 6800cb92 fetch 1 ,mem_24g_data_type 
+0454 2fec0004 isolate0 bit_hop ,pdata 
+0455 20208420 branch p_g24_transmit_rf_sta_init ,true 
+0456 6800ccc8 fetch 1 ,mem_24g_rf_work_stage 
+0457 c000844d beq 1 ,p_g24_transmit_hop_pac_succ_wo_hop 
+0458 c001044e beq 2 ,p_g24_transmit_hop_pac_succ 
+0459 20600000 rtn 
+
+p_g24_rf_sta_check:
+045a 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+045b c1ff8000 rtnne state_24g_pairing_success 
+045c 2040045f call p_g24_rf_laststa_synccnt_check 
+045d 24560467 ncall p_g24_rf_sync_cnt_check ,user2 
+045e 20600000 rtn 
+
+p_g24_rf_laststa_synccnt_check:
+045f 78567c00 disable user2 
+0460 6800ccc7 fetch 1 ,mem_24g_rf_last_sta 
+0461 c1808000 rtnne 1 
+0462 6800ccc9 fetch 1 ,mem_24g_sync_cnt 
+0463 c1800000 rtnne 0 
+0464 704cc801 jam 1 ,mem_24g_rf_work_stage 
+0465 704bd604 jam 4 ,mem_24g_max_retry 
+0466 20207feb branch enable_user2 
+
+p_g24_rf_sync_cnt_check:
+0467 6800ccc9 fetch 1 ,mem_24g_sync_cnt 
+0468 203a046f branch p_g24_rf_hop_attemp ,blank 
+0469 1fe0ffff increase -1 ,pdata 
+046a 6000ccc9 store 1 ,mem_24g_sync_cnt 
+046b 704cc802 jam 2 ,mem_24g_rf_work_stage 
+046c 2040060a call p_g24_ch 
+046d 704bd604 jam 4 ,mem_24g_max_retry 
+046e 20600000 rtn 
+
+p_g24_rf_hop_attemp:
+046f 704cc803 jam 3 ,mem_24g_rf_work_stage 
+0470 6800ccc6 fetch 1 ,mem_24g_rf_hop_ch 
+0471 243a0441 nbranch p_g24_rf_hop_attemp_again ,blank 
+0472 2040060a call p_g24_ch 
+0473 704bd602 jam 2 ,mem_24g_max_retry 
+0474 20600000 rtn 
+
+p_g24_txdata_prep:
+0475 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+0476 c0ff8533 bne state_24g_pairing_success ,p_g24_pairing_sm 
+
+p_g24_txdata_prep_packeage_data:
+0477 2040047b call p_g24_package_data 
+0478 204005f8 call p_g24_transmit_prep 
+
+p_g24_txdata_enable_tx:
+0479 704b9601 jam ensure_on_24g ,mem_24g_ensure 
+047a 20600000 rtn 
+
+p_g24_package_data:
+047b 68014cc2 fetch 2 ,mem_cb_24g_data 
+047c 20407f9c call callback_func 
+047d 20340481 branch p_g24_accumulate_mouse_data ,user 
+047e 6803cb2e fetch 7 ,mem_24g_txbuf + 1 
+047f 207a0000 rtn blank 
+0480 20207fe7 branch enable_user 
+
+p_g24_accumulate_mouse_data:
+0481 704bbd00 jam 0 ,mem_24g_abort_pac 
+0482 1a20fe01 add rega ,1 ,pdata 
+0483 6000cb91 store 1 ,mem_24g_datalen 
+0484 20400422 call p_g24_transmit_rf_ctrl_clear 
+0485 6000cb2d store 1 ,mem_24g_txbuf 
+0486 e8a88000 ifetcht 1 ,contw 
+0487 ea408000 ifetch 1 ,regb 
+0488 9841fe00 ior temp ,pdata 
+0489 e0a08000 istore 1 ,contw 
+048a 1a40a401 increase 1 ,regb 
+048b df200002 arg 2 ,loopcnt 
+
+p_g24_accumulation_loop:
+048c ea410000 ifetch 2 ,regb 
+048d e0a10000 istore 2 ,contw 
+048e 1a40a402 increase 2 ,regb 
+048f c200048c loop p_g24_accumulation_loop 
+0490 d8a04b33 arg mem_24g_txbuf + 6 ,contw 
+0491 df200002 arg 2 ,loopcnt 
+
+p_g24_accumulation_loop2:
+0492 ea408000 ifetch 1 ,regb 
+0493 e8a88000 ifetcht 1 ,contw 
+0494 9840fe00 iadd temp ,pdata 
+0495 e0a08000 istore 1 ,contw 
+0496 1a40a401 increase 1 ,regb 
+0497 c2000492 loop p_g24_accumulation_loop2 
+0498 20600000 rtn 
+
+p_g24_transmit_packet:
+0499 704b9a00 jam 0 ,mem_24g_retry 
+
+p_g24_transmit_loop:
+049a d9600d00 arg param_rx_setup ,timeup 
+049b 34730200 until clkn_rt ,meet 
+049c 204004b5 call p_g24_transmit_receive_ack 
+049d 6800cbcd fetch 1 ,mem_24g_no_ack 
+049e c1008000 rtneq no_ack_24g 
+049f 242c04c4 nbranch p_g24_retransmit ,sync 
+04a0 243784c4 nbranch p_g24_retransmit ,user3 
+04a1 204004b0 call p_g24_txbuf_clear 
+04a2 204004e0 call p_g24_ackpayload_parse 
+04a3 204004ea call power_ctrl_pac_succ_incrs 
+
+p_g24_transmit_next_packet:
+04a4 6800cb90 fetch 1 ,mem_24g_pid 
+04a5 1fe0fe01 increase 1 ,pdata 
+04a6 6000cb90 store 1 ,mem_24g_pid 
+04a7 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+04a8 c0ff84b3 bne state_24g_pairing_success ,p_g24_paring_mode_start 
+04a9 20400451 call p_g24_transmit_succ_rf_config 
+
+p_g24_transmit_abandon:
+04aa 58000000 setarg 0 
+04ab 60014b97 store 2 ,mem_24g_txfail_cnt 
+04ac 6000cb99 store 1 ,mem_24g_get_ack_fail 
+04ad 6000ccc5 store 1 ,mem_24g_hop_pac_retry 
+04ae 704b9600 jam ensure_off_24g ,mem_24g_ensure 
 04af 20600000 rtn 
 
-p_send_lmp:
-04b0 78547c00 disable user 
-04b1 204062c1 call lmo_fifo_process 
-04b2 68008048 fetch 1 ,mem_lmp_to_send 
-04b3 207a0000 rtn blank 
-04b4 c28384b9 bbit1 7 ,p_send_lmp_escape 
-04b5 c00184c9 beq lmp_accepted ,p_send_lmp_accepted 
-04b6 c01884c5 beq lmp_setup_complete ,p_send_lmp_setup_complete 
-04b7 c00b84c7 beq lmp_sniff_req ,p_send_lmp_sniff_req 
-04b8 20206010 branch send_lmp0 
-
-p_send_lmp_escape:
-04b9 c04204bc beq lmp_ext_features_res ,p_send_lmpext_features_res 
-04ba c04184bf beq lmp_ext_features_req ,p_send_lmpext_features_req 
-04bb 2020603f branch send_lmp_escape 
-
-p_send_lmpext_features_res:
-04bc 204004c2 call p_check_ssp_enable 
-04bd 68008048 fetch 1 ,mem_lmp_to_send 
-04be 20206099 branch send_lmpext_features_res 
-
-p_send_lmpext_features_req:
-04bf 204004c2 call p_check_ssp_enable 
-04c0 68008048 fetch 1 ,mem_lmp_to_send 
-04c1 2020610d branch send_lmpext_features_req 
-
-p_check_ssp_enable:
-04c2 6800c65a fetch 1 ,mem_ssp_enable 
-04c3 203a612b branch ssp_disable ,blank 
-04c4 20206124 branch ssp_enable 
-
-p_send_lmp_setup_complete:
-04c5 704b0101 jam 1 ,mem_bt_send_lmp_setup_complete 
-04c6 202061c3 branch send_lmp_setup_complete 
-
-p_send_lmp_sniff_req:
-04c7 704b0904 jam 4 ,mem_mouse_bt_send_first_package_timer 
-04c8 202061a4 branch send_lmp_sniff_req 
-
-p_send_lmp_accepted:
-04c9 18007e02 force 2 ,pdata 
-04ca 20406298 call msg_send_lmp 
-04cb 68008049 fetch 1 ,mem_lmi_opcode 
-04cc e0a08000 istore 1 ,contw 
-04cd 6000cafc store 1 ,mem_lmi_opcode_temp 
-04ce 204062a7 call send_lmp_follow 
-04cf 6800cafc fetch 1 ,mem_lmi_opcode_temp 
-04d0 c01704d2 beq lmp_max_slot_req ,p_send_lmp_accepted_max_slot_req 
-04d1 20206051 branch send_lmp_accepted + 7 
-
-p_send_lmp_accepted_max_slot_req:
-04d2 6800caff fetch 1 ,mem_bt_rcvd_switch_req_accept 
-04d3 207a0000 rtn blank 
-04d4 704aff00 jam 0 ,mem_bt_rcvd_switch_req_accept 
-04d5 6800cb01 fetch 1 ,mem_bt_send_lmp_setup_complete 
-04d6 c1810000 rtnne 2 
-04d7 704b0001 jam 1 ,mem_bt_send_max_slot_req_accept_after_switch 
-04d8 1c427e00 copy clkn_bt ,pdata 
-04d9 600204e9 store 4 ,mem_aurand_send_delay_time 
-04da 20600000 rtn 
-
-p_process_conn_sm:
-04db 204062bc call lmo_fifo_check 
-04dc 247a0000 nrtn blank 
-
-p_process_conn_sm_continue:
-04dd 68008055 fetch 1 ,mem_conn_sm 
-04de 207a0000 rtn blank 
-04df c00204fd beq conn_sm_send_conn_req ,p_host_create_conn_send_conn_req 
-04e0 c00804e2 beq conn_sm_wait_switch_after_host_connection ,p_host_creat_conn_wait_switch 
-04e1 20206320 branch process_conn_sm_continue + 2 
-
-p_host_creat_conn_wait_switch:
-04e2 6800c55b fetch 1 ,mem_switch_flag 
-04e3 c1000000 rtneq switch_flag_init 
-04e4 c00084e6 beq switch_flag_accept ,p_host_create_conn_switch_accept 
-04e5 2020635f branch host_creat_conn_wait_switch + 3 
-
-p_host_create_conn_switch_accept:
-04e6 20748000 rtn master 
-
-p_host_create_conn_auth_pair:
-04e7 6800816d fetch 1 ,mem_connection_options 
-04e8 c28004ea bbit1 connection_auth ,p_host_create_conn_auth_pair_true 
-04e9 20206399 branch host_create_conn_auth_pair + 1 
-
-p_host_create_conn_auth_pair_true:
-04ea 6800cb01 fetch 1 ,mem_bt_send_lmp_setup_complete 
-04eb c000e39d beq 1 ,host_create_conn_auth_pair_true 
-04ec 6800c1bd fetch 1 ,mem_link_key_exists 
-04ed 203a63a9 branch host_create_conn_auth_pair_nokey ,blank 
-04ee 680084d1 fetch 1 ,mem_lmp_conn_state 
-04ef c4018000 rtnbit0 sent_setup_complete 
-04f0 c4010000 rtnbit0 received_setup_complete 
-04f1 6800cb00 fetch 1 ,mem_bt_send_max_slot_req_accept_after_switch 
-04f2 207a0000 rtn blank 
-04f3 704b0000 jam 0 ,mem_bt_send_max_slot_req_accept_after_switch 
-04f4 680204e9 fetch 4 ,mem_aurand_send_delay_time 
-04f5 d8400014 arg 20 ,temp 
-04f6 98408400 iadd temp ,temp 
-04f7 1c427e00 copy clkn_bt ,pdata 
-04f8 98467c00 isub temp ,null 
-04f9 242104fb nbranch p_bt_send_max_slot_req_accept_after_switch_wait ,positive 
-04fa 20206349 branch host_create_conn_auth 
-
-p_bt_send_max_slot_req_accept_after_switch_wait:
-04fb 704b0001 jam 1 ,mem_bt_send_max_slot_req_accept_after_switch 
-04fc 20600000 rtn 
-
-p_host_create_conn_send_conn_req:
-04fd 70480914 jam 20 ,mem_mouse_send_switch_req_timer 
-04fe 2020636f branch host_create_conn_send_conn_req 
+p_g24_txbuf_clear:
+04b0 df200004 arg 4 ,loopcnt 
+04b1 d8a04b2d arg mem_24g_txbuf ,contw 
+04b2 20207ec6 branch memset0 
+
+p_g24_paring_mode_start:
+04b3 204004e7 call power_ctrl_pac_succ_cnt_init 
+04b4 2020054e branch p_g24_paring_mode 
+
+p_g24_transmit_receive_ack:
+04b5 7857fc00 disable user3 
+04b6 20400673 call p_g24_transmit 
+04b7 6800cbcd fetch 1 ,mem_24g_no_ack 
+04b8 c00084c2 beq no_ack_24g ,p_g24_transmit_no_ack 
+04b9 18002a00 force 0 ,radio_ctrl 
+04ba 68024bb9 fetch 4 ,mem_24g_addr 
+04bb 98001200 iforce access 
+04bc 68088017 fetcht 1 ,mem_last_freq 
+04bd 2040291f call set_freq_rx 
+04be 20402924 call rf_rx_enable 
+04bf 2040062d call p_g24_receive_rxon 
+04c0 2057866b call p_g24_end_of_packet ,user3 
+04c1 20600000 rtn 
+
+p_g24_transmit_no_ack:
+04c2 2040066b call p_g24_end_of_packet 
+04c3 202004a4 branch p_g24_transmit_next_packet 
+
+p_g24_retransmit:
+04c4 6800cb99 fetch 1 ,mem_24g_get_ack_fail 
+04c5 1fe0fe01 increase 1 ,pdata 
+04c6 6000cb99 store 1 ,mem_24g_get_ack_fail 
+04c7 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+04c8 c0ff84d8 bne state_24g_pairing_success ,p_g24_tx_paring_retry 
+04c9 6808cb9a fetcht 1 ,mem_24g_retry 
+04ca 18408401 increase 1 ,temp 
+04cb 6008cb9a storet 1 ,mem_24g_retry 
+04cc 6800cbd6 fetch 1 ,mem_24g_max_retry 
+04cd 98467e00 isub temp ,pdata 
+04ce 243a049a nbranch p_g24_transmit_loop ,blank 
+04cf 6800ccc8 fetch 1 ,mem_24g_rf_work_stage 
+04d0 c001843a beq 3 ,p_g24_transmit_pac_fail_hop_stage3 
+04d1 6800ccc5 fetch 1 ,mem_24g_hop_pac_retry 
+04d2 1fe0fe01 increase 1 ,pdata 
+04d3 6000ccc5 store 1 ,mem_24g_hop_pac_retry 
+04d4 c001042f beq 2 ,p_g24_transmit_hop_pac_fail 
+04d5 20400426 call p_g24_hop_ch_enable 
+04d6 704bd601 jam 1 ,mem_24g_max_retry 
+04d7 20200499 branch p_g24_transmit_packet 
+
+p_g24_tx_paring_retry:
+04d8 6800cb99 fetch 1 ,mem_24g_get_ack_fail 
+04d9 c1ff8000 rtnne 0xff 
+04da 704b9900 jam 0 ,mem_24g_get_ack_fail 
+04db 202004de branch p_g24_stop_g24_mode 
+
+p_g24_tx_attempt_fail:
+04dc 58000000 setarg 0 
+04dd 60014b97 store 2 ,mem_24g_txfail_cnt 
+
+p_g24_stop_g24_mode:
+04de 700a993a jam bt_evt_24g_attempt_fail ,mem_fifo_temp 
+04df 20207d86 branch ui_ipc_send_event 
+
+p_g24_ackpayload_parse:
+04e0 20400569 call p_g24_read_len_pid_crc 
+04e1 6800cb8f fetch 1 ,mem_24g_rxdata_length 
+04e2 207a0000 rtn blank 
+04e3 98007200 iforce loopcnt 
+04e4 d8c04b0d arg mem_24g_rxbuf + 2 ,contr 
+04e5 d8a04b6f arg mem_24g_rxpayload ,contw 
+04e6 20207f01 branch memcpy 
 
 power_ctrl_pac_succ_cnt_init:
-04ff 704cdf01 jam 1 ,mem_power_ctrl_level 
-0500 704cdc00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
-0501 20600000 rtn 
+04e7 704ccd01 jam 1 ,mem_power_ctrl_level 
+04e8 704cca00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+04e9 20600000 rtn 
 
 power_ctrl_pac_succ_incrs:
-0502 6800ccdc fetch 1 ,mem_power_ctrl_pac_succ_cnt 
-0503 1fe0fe01 increase 1 ,pdata 
-0504 6000ccdc store 1 ,mem_power_ctrl_pac_succ_cnt 
-0505 20600000 rtn 
+04ea 6800ccca fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+04eb 1fe0fe01 increase 1 ,pdata 
+04ec 6000ccca store 1 ,mem_power_ctrl_pac_succ_cnt 
+04ed 20600000 rtn 
 
 power_ctrl_pac_succ_decrs:
-0506 6800ccdc fetch 1 ,mem_power_ctrl_pac_succ_cnt 
-0507 1fe67c02 sub pdata ,2 ,null 
-0508 2441050e ncall power_ctrl_pac_succ_cnt_reinit ,positive 
-0509 6800ccdc fetch 1 ,mem_power_ctrl_pac_succ_cnt 
-050a c1000000 rtneq 0 
-050b 1fe0ffff increase -1 ,pdata 
-050c 6000ccdc store 1 ,mem_power_ctrl_pac_succ_cnt 
-050d 20600000 rtn 
+04ee 6800ccca fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+04ef 1fe67c02 sub pdata ,2 ,null 
+04f0 244104f6 ncall power_ctrl_pac_succ_cnt_reinit ,positive 
+04f1 6800ccca fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+04f2 c1000000 rtneq 0 
+04f3 1fe0ffff increase -1 ,pdata 
+04f4 6000ccca store 1 ,mem_power_ctrl_pac_succ_cnt 
+04f5 20600000 rtn 
 
 power_ctrl_pac_succ_cnt_reinit:
-050e 704cdc03 jam 3 ,mem_power_ctrl_pac_succ_cnt 
-050f 20600000 rtn 
+04f6 704cca03 jam 3 ,mem_power_ctrl_pac_succ_cnt 
+04f7 20600000 rtn 
 
 power_ctrl_start:
-0510 68014682 fetch 2 ,mem_ui_state_map 
-0511 c3858000 rtnbit1 ui_state_ble_adv 
-0512 c3838000 rtnbit1 ui_state_bt_reconnect 
-0513 c3830000 rtnbit1 ui_state_bt_discovery 
-0514 da204c65 arg mem_rssi_signal_buf ,rega 
-0515 20400056 call p_rssi_average 
-0516 6008ccdd storet 1 ,mem_rssi_avg_received 
-0517 58000082 setarg rssi_dis_max_24g 
-0518 c513051a bmark1 mark_24g ,power_ctrl_start_next 
-0519 58000080 setarg rssi_dis_max_ble 
-
-power_ctrl_start_next:
-051a 98467c00 isub temp ,null 
-051b 24210532 nbranch power_ctrl_txpower_incrs_force ,positive 
-051c 6800ccdc fetch 1 ,mem_power_ctrl_pac_succ_cnt 
-051d 1fe67c02 sub pdata ,2 ,null 
-051e 24210522 nbranch power_ctrl_txpower_decrs_check ,positive 
-051f 6800ccdc fetch 1 ,mem_power_ctrl_pac_succ_cnt 
-0520 c0000533 beq 0 ,power_ctrl_txpower_incrs 
-0521 20600000 rtn 
+04f8 68014682 fetch 2 ,mem_ui_state_map 
+04f9 c3858000 rtnbit1 ui_state_ble_adv 
+04fa da204c53 arg mem_rssi_signal_buf ,rega 
+04fb 204005d9 call p_rssi_average 
+04fc 6008cccb storet 1 ,mem_rssi_avg_received 
+04fd 280ffe26 isolate1 mark_24g ,mark 
+04fe 20408508 call power_ctrl_24g_dis_max ,true 
+04ff 2440850c ncall power_ctrl_le_dis_max ,true 
+0500 98467c00 isub temp ,null 
+0501 24210520 nbranch power_ctrl_txpower_incrs_force ,positive 
+0502 6800ccca fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0503 1fe67c02 sub pdata ,2 ,null 
+0504 24210510 nbranch power_ctrl_txpower_decrs_check ,positive 
+0505 6800ccca fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0506 c0000521 beq 0 ,power_ctrl_txpower_incrs 
+0507 20600000 rtn 
+
+power_ctrl_24g_dis_max:
+0508 58000082 setarg rssi_dis_max_24g 
+0509 20600000 rtn 
+
+power_ctrl_24g_dis_min:
+050a 58000077 setarg rssi_dis_min_24g 
+050b 20600000 rtn 
+
+power_ctrl_le_dis_max:
+050c 58000080 setarg rssi_dis_max_ble 
+050d 20600000 rtn 
+
+power_ctrl_le_dis_min:
+050e 58000075 setarg rssi_dis_min_ble 
+050f 20600000 rtn 
 
 power_ctrl_txpower_decrs_check:
-0522 6800ccdc fetch 1 ,mem_power_ctrl_pac_succ_cnt 
-0523 c1900000 rtnne 32 
-0524 704cdc00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+0510 6800ccca fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+0511 c1900000 rtnne 32 
+0512 704cca00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 
 power_ctrl_txpower_decrs:
-0525 6808ccdd fetcht 1 ,mem_rssi_avg_received 
-0526 58000077 setarg rssi_dis_min_24g 
-0527 c5130529 bmark1 mark_24g ,power_ctrl_txpower_decrs_next 
-0528 58000075 setarg rssi_dis_min_ble 
-
-power_ctrl_txpower_decrs_next:
-0529 98467c00 isub temp ,null 
-052a 24610000 nrtn positive 
-052b 6800ccdf fetch 1 ,mem_power_ctrl_level 
-052c c000053a beq 0 ,power_ctrl_decrs_level0 
-052d 1fe0ffff increase -1 ,pdata 
-052e 6000ccdf store 1 ,mem_power_ctrl_level 
-052f c000053a beq 0 ,power_ctrl_decrs_level0 
+0513 6808cccb fetcht 1 ,mem_rssi_avg_received 
+0514 280ffe26 isolate1 mark_24g ,mark 
+0515 2040850a call power_ctrl_24g_dis_min ,true 
+0516 2440850e ncall power_ctrl_le_dis_min ,true 
+0517 98467c00 isub temp ,null 
+0518 24610000 nrtn positive 
+0519 6800cccd fetch 1 ,mem_power_ctrl_level 
+051a c0000528 beq 0 ,power_ctrl_decrs_level0 
+051b 1fe0ffff increase -1 ,pdata 
+051c 6000cccd store 1 ,mem_power_ctrl_level 
+051d c0000528 beq 0 ,power_ctrl_decrs_level0 
 
 power_ctrl_decrs_level1:
 
 power_ctrl_incrs_level1:
-0530 7041de00 jam tx_power_0db ,mem_tx_power 
-0531 20600000 rtn 
+051e 7041de00 jam tx_power_0db ,mem_tx_power 
+051f 20600000 rtn 
 
 power_ctrl_txpower_incrs_force:
-0532 704cdc00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+0520 704cca00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
 
 power_ctrl_txpower_incrs:
-0533 6800ccdf fetch 1 ,mem_power_ctrl_level 
-0534 c0010538 beq 2 ,power_ctrl_incrs_level2 
-0535 1fe0fe01 increase 1 ,pdata 
-0536 6000ccdf store 1 ,mem_power_ctrl_level 
-0537 c0008530 beq 1 ,power_ctrl_incrs_level1 
+0521 6800cccd fetch 1 ,mem_power_ctrl_level 
+0522 c0010526 beq 2 ,power_ctrl_incrs_level2 
+0523 1fe0fe01 increase 1 ,pdata 
+0524 6000cccd store 1 ,mem_power_ctrl_level 
+0525 c000851e beq 1 ,power_ctrl_incrs_level1 
 
 power_ctrl_incrs_level2:
-0538 7041de02 jam tx_power_5db ,mem_tx_power 
-0539 20600000 rtn 
+0526 7041de02 jam tx_power_5db ,mem_tx_power 
+0527 20600000 rtn 
 
 power_ctrl_decrs_level0:
-053a 7041de04 jam tx_power_f5db ,mem_tx_power 
-053b 20600000 rtn 
+0528 7041de04 jam tx_power_f5db ,mem_tx_power 
+0529 20600000 rtn 
+
+p_g24_start_pairing_sm1:
+052a 79200026 set1 mark_24g ,mark 
+052b 2040052e call p_g24_pair_init 
+
+p_g24_set_pairing_sm_1:
+052c 704ba101 jam state_24g_pairing_1 ,mem_24g_pairing_sm 
+052d 20600000 rtn 
+
+p_g24_pair_init:
+052e 7041de20 jam tx_power_pair ,mem_tx_power 
+052f 704b9000 jam 0 ,mem_24g_pid 
+0530 704b9b4e jam g24_pair_ch ,mem_24g_ch 
+0531 68024b9d fetch 4 ,mem_24g_paring_addr 
+0532 202005ea branch p_g24_update_addr_and_synccrc8 
+
+p_g24_pairing_sm:
+0533 6800cb96 fetch 1 ,mem_24g_ensure 
+0534 c000ffe7 beq ensure_on_24g ,enable_user 
+0535 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+0536 c000853a beq state_24g_pairing_1 ,p_g24_pairing_sm_1 
+0537 c001053d beq state_24g_pairing_2 ,p_g24_pairing_sm_2 
+0538 c0018540 beq state_24g_pairing_3 ,p_g24_pairing_sm_3 
+0539 20202a8c branch assert 
+
+p_g24_pairing_sm_1:
+053a 704ba111 jam state_24g_pairing_1_waiting_ack ,mem_24g_pairing_sm 
+053b 70119eaa jam 0xaa ,mem_24g_common_temp 
+053c 20200542 branch p_g24_pairing_sm_common 
+
+p_g24_pairing_sm_2:
+053d 704ba112 jam state_24g_pairing_2_waiting_ack ,mem_24g_pairing_sm 
+053e 70119e55 jam 0x55 ,mem_24g_common_temp 
+053f 20200542 branch p_g24_pairing_sm_common 
+
+p_g24_pairing_sm_3:
+0540 704ba113 jam state_24g_pairing_3_waiting_ack ,mem_24g_pairing_sm 
+0541 70119e22 jam 0x22 ,mem_24g_common_temp 
+
+p_g24_pairing_sm_common:
+0542 6800cb92 fetch 1 ,mem_24g_data_type 
+0543 1fe17e07 and_into bits_data ,pdata 
+0544 6000919f store 1 ,mem_24g_common_temp + 1 
+0545 68024bc8 fetch 4 ,mem_24g_device_addr 
+0546 600211a0 store 4 ,mem_24g_common_temp + 2 
+
+p_g24_put_pairing_data_in_buff:
+0547 7011a400 jam 0 ,mem_24g_common_temp + 6 
+0548 da20119e arg mem_24g_common_temp ,rega 
+0549 d8400007 arg 7 ,temp 
+054a 20400564 call p_g24_put_data_in_buff 
+054b 204005f8 call p_g24_transmit_prep 
+054c 20400479 call p_g24_txdata_enable_tx 
+054d 20207fe7 branch enable_user 
+
+p_g24_paring_mode:
+054e 6800cba1 fetch 1 ,mem_24g_pairing_sm 
+054f c17f8000 rtneq state_24g_pairing_success 
+0550 c0088554 beq state_24g_pairing_1_waiting_ack ,p_g24_pairing_sm_1_waiting_ack 
+0551 c0090556 beq state_24g_pairing_2_waiting_ack ,p_g24_pairing_sm_2_waiting_ack 
+0552 c0098558 beq state_24g_pairing_3_waiting_ack ,p_g24_pairing_sm_3_waiting_ack 
+0553 20600000 rtn 
+
+p_g24_pairing_sm_1_waiting_ack:
+0554 704ba102 jam state_24g_pairing_2 ,mem_24g_pairing_sm 
+0555 202004aa branch p_g24_transmit_abandon 
+
+p_g24_pairing_sm_2_waiting_ack:
+0556 704ba103 jam state_24g_pairing_3 ,mem_24g_pairing_sm 
+0557 202004aa branch p_g24_transmit_abandon 
+
+p_g24_pairing_sm_3_waiting_ack:
+0558 704ba1ff jam state_24g_pairing_success ,mem_24g_pairing_sm 
+0559 700a9939 jam bt_evt_24g_pairing_complete ,mem_fifo_temp 
+055a 20407d86 call ui_ipc_send_event 
+055b 68024b71 fetch 4 ,mem_24g_rxpayload + 2 
+055c 204005ea call p_g24_update_addr_and_synccrc8 
+055d 202004aa branch p_g24_transmit_abandon 
+
+p_g24_start_24g_mode:
+055e 20600000 rtn 
+
+p_g24_auto_pair_start:
+055f 20600000 rtn 
+
+p_g24_check_51cmd_stop_24g:
+0560 793f8026 set0 mark_24g ,mark 
+0561 204053ce call le_disable 
+
+p_mouse_disable_g24_pairing_flag:
+0562 d8e00003 arg mosue_24g_pairing_flag ,queue 
+0563 202043d2 branch mouse_disable_function_flag 
+
+p_g24_put_data_in_buff:
+0564 6008cb91 storet 1 ,mem_24g_datalen 
+0565 18427200 copy temp ,loopcnt 
+0566 d8a04b2d arg mem_24g_txbuf ,contw 
+0567 1a220c00 copy rega ,contr 
+0568 20207f01 branch memcpy 
+
+p_g24_read_len_pid_crc:
+0569 6800cb0c fetch 1 ,mem_24g_rxbuf + 1 
+056a 1fe97e00 rshift3 pdata ,pdata 
+056b 6000cb8f store 1 ,mem_24g_rxdata_length 
+056c 1fe0fe01 increase 1 ,pdata 
+056d d8c04b0c arg mem_24g_rxbuf + 1 ,contr 
+056e 98c08c00 iadd contr ,contr 
+056f e8c18000 ifetch 3 ,contr 
+0570 6001cbce store 3 ,mem_24g_sta_crc 
+0571 6800cb0c fetch 1 ,mem_24g_rxbuf + 1 
+0572 1fe37e00 rshift pdata ,pdata 
+0573 1fe17e03 and pdata ,0x03 ,pdata 
+0574 6000cbd4 store 1 ,mem_24g_sta_pid 
+0575 20600000 rtn 
 
 p_set_freq_tx:
-053c 60088017 storet 1 ,mem_last_freq 
-053d 1840a200 add temp ,0 ,rega 
-053e 20402981 call rf_write_freq 
-053f 58000500 setarg param_pll_setup 
-0540 20402a8f call sleep 
+0576 60088017 storet 1 ,mem_last_freq 
+0577 1840a200 add temp ,0 ,rega 
+0578 20402981 call rf_write_freq 
+0579 58000500 setarg param_pll_setup 
+057a 20402a8f call sleep 
 
 p_rf_tx_enable:
-0541 70890601 jam 0x1 ,rfen_adc 
-0542 7089003c jam 0x3c ,rfen_rx 
-0543 708901e0 jam 0xe0 ,rfen_tx 
-0544 2000000a nop 10 
-0545 70890201 jam 0x01 ,rfen_mdm 
-0546 7089023d jam 0x3d ,rfen_mdm 
-0547 2000000a nop 10 
-0548 708903b7 jam 0xb7 ,rfen_sn 
-0549 2000000a nop 10 
-054a 7089027d jam 0x7d ,rfen_mdm 
-054b 6800c1de fetch 1 ,mem_tx_power 
-054c c0010554 beq tx_power_5db ,p_set_tx_power_5db 
-054d c0020559 beq tx_power_f5db ,p_set_tx_power_f5db 
-054e c0100568 beq tx_power_pair ,p_set_tx_power_pair 
+057b 70890601 jam 0x1 ,rfen_adc 
+057c 7089003c jam 0x3c ,rfen_rx 
+057d 708901e0 jam 0xe0 ,rfen_tx 
+057e 2000000a nop 10 
+057f 70890201 jam 0x01 ,rfen_mdm 
+0580 7089023d jam 0x3d ,rfen_mdm 
+0581 2000000a nop 10 
+0582 708903b7 jam 0xb7 ,rfen_sn 
+0583 2000000a nop 10 
+0584 7089027d jam 0x7d ,rfen_mdm 
+0585 6800c1de fetch 1 ,mem_tx_power 
+0586 c000058c beq tx_power_0db ,p_set_tx_power_0db 
+0587 c0008594 beq tx_power_3db ,p_set_tx_power_3db 
+0588 c001059c beq tx_power_5db ,p_set_tx_power_5db 
+0589 c00205a4 beq tx_power_f5db ,p_set_tx_power_f5db 
+058a c01005b6 beq tx_power_pair ,p_set_tx_power_pair 
+058b 2020058c branch p_set_tx_power_0db 
 
 p_set_tx_power_0db:
-054f 2040055e call p_rx_low_sens 
-0550 708955d0 jam 0xd0 ,0x8955 
-0551 708956e0 jam 0xe0 ,0x8956 
-0552 7089586c jam 0x6c ,0x8958 
-0553 2020294b branch set_tx_power_0db 
+058c 204005ac call p_rx_low_sens 
+058d 70894bba jam 0xba ,0x894b 
+058e 708955d0 jam 0xd0 ,0x8955 
+058f 708956e0 jam 0xe0 ,0x8956 
+0590 70895788 jam 0x88 ,0x8957 
+0591 7089586c jam 0x6c ,0x8958 
+0592 70895910 jam 0x10 ,0x8959 
+0593 2020294b branch set_tx_power_0db 
+
+p_set_tx_power_3db:
+0594 204005b1 call p_rx_high_sens 
+0595 70894bba jam 0xba ,0x894b 
+0596 708955d0 jam 0xd0 ,0x8955 
+0597 708956e0 jam 0xe0 ,0x8956 
+0598 70895788 jam 0x88 ,0x8957 
+0599 7089583c jam 0x3c ,0x8958 
+059a 70895910 jam 0x10 ,0x8959 
+059b 2020294f branch set_tx_power_3db 
 
 p_set_tx_power_5db:
-0554 20400563 call p_rx_high_sens 
-0555 708955d0 jam 0xd0 ,0x8955 
-0556 708956e0 jam 0xe0 ,0x8956 
-0557 7089583c jam 0x3c ,0x8958 
-0558 20202953 branch set_tx_power_5db 
+059c 204005b1 call p_rx_high_sens 
+059d 70894bba jam 0xba ,0x894b 
+059e 708955d0 jam 0xd0 ,0x8955 
+059f 708956e0 jam 0xe0 ,0x8956 
+05a0 70895788 jam 0x88 ,0x8957 
+05a1 7089583c jam 0x3c ,0x8958 
+05a2 70895910 jam 0x10 ,0x8959 
+05a3 20202953 branch set_tx_power_5db 
 
 p_set_tx_power_f5db:
-0559 2040055e call p_rx_low_sens 
-055a 708955d0 jam 0xd0 ,0x8955 
-055b 708956c0 jam 0xc0 ,0x8956 
-055c 7089586c jam 0x6c ,0x8958 
-055d 2020295b branch set_tx_power_f5db 
+05a4 204005ac call p_rx_low_sens 
+05a5 70894bba jam 0xba ,0x894b 
+05a6 708955d0 jam 0xd0 ,0x8955 
+05a7 708956c0 jam 0xc0 ,0x8956 
+05a8 70895788 jam 0x88 ,0x8957 
+05a9 7089586c jam 0x6c ,0x8958 
+05aa 70895910 jam 0x10 ,0x8959 
+05ab 2020295b branch set_tx_power_f5db 
 
 p_rx_low_sens:
-055e 70894c5b jam 0x5b ,0x894c 
-055f 70894d96 jam 0x96 ,0x894d 
-0560 70894e2c jam 0x2c ,0x894e 
-0561 70894f46 jam 0x46 ,0x894f 
-0562 20600000 rtn 
+05ac 70894c5b jam 0x5b ,0x894c 
+05ad 70894d96 jam 0x96 ,0x894d 
+05ae 70894e2c jam 0x2c ,0x894e 
+05af 70894f46 jam 0x46 ,0x894f 
+05b0 20600000 rtn 
 
 p_rx_high_sens:
-0563 70894cfb jam 0xfb ,0x894c 
-0564 70894def jam 0xef ,0x894d 
-0565 70894eec jam 0xec ,0x894e 
-0566 70894f5e jam 0x5e ,0x894f 
-0567 20600000 rtn 
+05b1 70894cfb jam 0xfb ,0x894c 
+05b2 70894def jam 0xef ,0x894d 
+05b3 70894eec jam 0xec ,0x894e 
+05b4 70894f5e jam 0x5e ,0x894f 
+05b5 20600000 rtn 
 
 p_set_tx_power_pair:
-0568 708956c2 jam 0xc2 ,0x8956 
-0569 708955d0 jam 0xd0 ,0x8955 
-056a 20600000 rtn 
+05b6 70894bba jam 0xba ,0x894b 
+05b7 708956c2 jam 0xc2 ,0x8956 
+05b8 708955d0 jam 0xd0 ,0x8955 
+05b9 20600000 rtn 
 
 p_shutdown_radio:
-056b 18002a08 force 8 ,radio_ctrl 
-056c 202028fa branch shutdown_radio + 1 
+05ba 18002a08 force 8 ,radio_ctrl 
+05bb 202028fa branch shutdown_radio + 1 
 
-p_drawing_optima_init:
-056d df200005 arg 5 ,loopcnt 
-056e d8a04b0b arg mem_mouse_asm_flag ,contw 
-056f 20207ed4 branch clear_mem 
-
-p_drawing_optima:
-0570 6802469b fetch 4 ,mem_mouse_x 
-0571 207a0000 rtn blank 
-0572 204005c1 call p_data_abs_check 
-0573 58000006 setarg 0x06 
-0574 204005b4 call p_data_greater_than_check 
-0575 58000003 setarg 0x03 
-0576 204005ba call p_data_less_than_check 
-0577 6800cb0b fetch 1 ,mem_mouse_asm_flag 
-0578 c000857a beq 1 ,p_drawing_optima_modify 
-0579 2020056d branch p_drawing_optima_init 
-
-p_drawing_optima_modify:
-057a 68014b0c fetch 2 ,mem_mouse_x_pre 
-057b 600111be store 2 ,mem_data_pre 
-057c 6801469b fetch 2 ,mem_mouse_x 
-057d 600111c0 store 2 ,mem_data_current 
-057e 2040058d call p_drawing_optima_data 
-057f 680111be fetch 2 ,mem_data_pre 
-0580 60014b0c store 2 ,mem_mouse_x_pre 
-0581 680111c0 fetch 2 ,mem_data_current 
-0582 6001469b store 2 ,mem_mouse_x 
-0583 68014b0e fetch 2 ,mem_mouse_y_pre 
-0584 600111be store 2 ,mem_data_pre 
-0585 6801469d fetch 2 ,mem_mouse_y 
-0586 600111c0 store 2 ,mem_data_current 
-0587 2040058d call p_drawing_optima_data 
-0588 680111be fetch 2 ,mem_data_pre 
-0589 60014b0e store 2 ,mem_mouse_y_pre 
-058a 680111c0 fetch 2 ,mem_data_current 
-058b 6001469d store 2 ,mem_mouse_y 
-058c 20600000 rtn 
-
-p_drawing_optima_data:
-058d 680111be fetch 2 ,mem_data_pre 
-058e 680911c0 fetcht 2 ,mem_data_current 
-058f 9840fe00 iadd temp ,pdata 
-0590 600191c2 store 3 ,mem_data_sum 
-0591 2feffe10 isolate1 16 ,pdata 
-0592 2020859a branch p_data_sum_overflow ,true 
-0593 680091c3 fetch 1 ,mem_data_sum + 1 
-0594 c07f85a1 beq 0xff ,p_data_sum_n 
-0595 680091c2 fetch 1 ,mem_data_sum 
-
-p_data_store_pre:
-0596 1fe37e00 rshift pdata ,pdata 
-0597 600111be store 2 ,mem_data_pre 
-0598 600111c0 store 2 ,mem_data_current 
-0599 20600000 rtn 
-
-p_data_sum_overflow:
-059a 680091c3 fetch 1 ,mem_data_sum + 1 
-059b c000059e beq 0 ,p_data_sum_overflow_p 
-059c 680191c2 fetch 3 ,mem_data_sum 
-059d 20200596 branch p_data_store_pre 
-
-p_data_sum_overflow_p:
-059e 7011c400 jam 0 ,mem_data_sum + 2 
-059f 680091c2 fetch 1 ,mem_data_sum 
-05a0 20200596 branch p_data_store_pre 
-
-p_data_sum_n:
-05a1 680091c2 fetch 1 ,mem_data_sum 
-05a2 204005ac call p_pdata_get_half 
-05a3 600091be store 1 ,mem_data_pre 
-05a4 600091c0 store 1 ,mem_data_current 
-05a5 203a05aa branch p_data_zero ,blank 
-05a6 580000ff setarg 0xff 
-
-p_data_set_direction:
-05a7 600091bf store 1 ,mem_data_pre + 1 
-05a8 600091c1 store 1 ,mem_data_current + 1 
-05a9 20600000 rtn 
-
-p_data_zero:
-05aa 58000000 setarg 0 
-05ab 202005a7 branch p_data_set_direction 
-
-p_pdata_get_half:
-05ac 1fe67e00 sub pdata ,0 ,pdata 
-05ad 60008aae store 1 ,mem_rega 
-05ae 68008aae fetch 1 ,mem_rega 
-05af 1fe37e00 rshift pdata ,pdata 
-05b0 60008aae store 1 ,mem_rega 
-05b1 68008aae fetch 1 ,mem_rega 
-05b2 1fe67e00 sub pdata ,0 ,pdata 
-05b3 20600000 rtn 
-
-p_data_greater_than_check:
-05b4 9a267c00 isub rega ,null 
-05b5 242105bf nbranch p_enable_asm ,positive 
-05b6 9a467c00 isub regb ,null 
-05b7 242105bf nbranch p_enable_asm ,positive 
+p_g24_timer_check:
+05bc 20407fe9 call disable_user 
+05bd 680a4bb2 fetcht 4 ,mem_24g_tx_btclk 
+05be 1c427e00 copy clkn_bt ,pdata 
+05bf 98467c00 isub temp ,null 
+05c0 24412d18 ncall g24_timer_timeout ,positive 
+05c1 1fe22400 copy pdata ,regb 
+05c2 68024bb2 fetch 4 ,mem_24g_tx_btclk 
+05c3 6808cbb6 fetcht 1 ,mem_24g_interval 
+05c4 98408400 iadd temp ,temp 
+05c5 1a427e00 copy regb ,pdata 
+05c6 98467c00 isub temp ,null 
+05c7 24610000 nrtn positive 
+05c8 793ffe1c set0 28 ,pdata 
+05c9 60024bb2 store 4 ,mem_24g_tx_btclk 
+05ca 20207fe7 branch enable_user 
+
+p_rssi_noise:
+05cb 204029bb call save_rssi 
+05cc 207a0000 rtn blank 
+05cd 6808cc4b fetcht 1 ,mem_rssi_noise_index 
+05ce da200d9e arg mem_rssi_noise_buffer ,rega 
+05cf 204005d2 call p_rssi_store 
+05d0 6008cc4b storet 1 ,mem_rssi_noise_index 
+05d1 20600000 rtn 
+
+p_rssi_store:
+05d2 1a227e00 copy rega ,pdata 
+05d3 98408a00 iadd temp ,contw 
+05d4 68008018 fetch 1 ,mem_rssi 
+05d5 e0a08000 istore 1 ,contw 
+05d6 18408401 increase 1 ,temp 
+05d7 18410407 and_into rssi_buf_len_signal ,temp 
+05d8 20600000 rtn 
 
-p_disable_asm:
-05b8 704b0b00 jam 0 ,mem_mouse_asm_flag 
-05b9 20600000 rtn 
+p_rssi_average:
+05d9 d8400000 arg 0 ,temp 
+05da df200008 arg rssi_buf_len_signal + 1 ,loopcnt 
+05db 1a220c00 copy rega ,contr 
 
-p_data_less_than_check:
-05ba 9a267c00 isub rega ,null 
-05bb 24610000 nrtn positive 
-05bc 9a467c00 isub regb ,null 
-05bd 24610000 nrtn positive 
-05be 202005b8 branch p_disable_asm 
-
-p_enable_asm:
-05bf 704b0b01 jam 1 ,mem_mouse_asm_flag 
-05c0 20600000 rtn 
-
-p_data_abs_check:
-05c1 6801469b fetch 2 ,mem_mouse_x 
-05c2 600111c0 store 2 ,mem_data_current 
-05c3 204005ca call p_data_abs 
-05c4 1fe22200 copy pdata ,rega 
-05c5 6801469d fetch 2 ,mem_mouse_y 
-05c6 600111c0 store 2 ,mem_data_current 
-05c7 204005ca call p_data_abs 
-05c8 1fe22400 copy pdata ,regb 
-05c9 20600000 rtn 
-
-p_data_abs:
-05ca 680091c1 fetch 1 ,mem_data_current + 1 
-05cb c07f85cf beq 0xff ,p_data_reversal 
-05cc 680091c0 fetch 1 ,mem_data_current 
-
-p_data_abs_store:
-05cd 1fe17eff and_into 0xff ,pdata 
-05ce 20600000 rtn 
-
-p_data_reversal:
-05cf 680111c0 fetch 2 ,mem_data_current 
-05d0 1fe67e00 sub pdata ,0 ,pdata 
-05d1 202005cd branch p_data_abs_store 
+p_rssi_average_loop:
+05dc e8c08000 ifetch 1 ,contr 
+05dd 98408400 iadd temp ,temp 
+05de c20005dc loop p_rssi_average_loop 
+05df 18497e00 rshift3 temp ,pdata 
+05e0 1fe20400 copy pdata ,temp 
+05e1 c6930000 rtnmark0 mark_24g 
+05e2 1fe6fc0a div pdata ,10 
+05e3 20407f86 call wait_div_end 
+05e4 1807fe00 quotient pdata 
+05e5 1ff27e00 lshift4 pdata ,pdata 
+05e6 18070400 remainder temp 
+05e7 98418400 ior temp ,temp 
+05e8 20600000 rtn 
+05e9 20600000 rtn 
+
+p_g24_update_addr_and_synccrc8:
+05ea 60024bb9 store 4 ,mem_24g_addr 
+
+p_g24_syncword_crc8:
+05eb da200000 arg 0 ,rega 
+05ec df200004 arg 4 ,loopcnt 
+05ed d8c04bb9 arg mem_24g_addr ,contr 
+
+p_g24_syncword_crc8_loop:
+05ee e8c08000 ifetch 1 ,contr 
+05ef 9a20a200 iadd rega ,rega 
+05f0 c20005ee loop p_g24_syncword_crc8_loop 
+05f1 1a227e00 copy rega ,pdata 
+05f2 60014c42 store 2 ,mem_24g_syncword 
+05f3 6800cc42 fetch 1 ,mem_24g_syncword 
+05f4 6808cc43 fetcht 1 ,mem_24g_syncword + 1 
+05f5 9840fe00 iadd temp ,pdata 
+05f6 6000cc44 store 1 ,mem_24g_syncword_crc8 
+05f7 20600000 rtn 
+
+p_g24_transmit_prep:
+05f8 6800cb91 fetch 1 ,mem_24g_datalen 
+05f9 1fe0fe02 increase 2 ,pdata 
+05fa 6000cb93 store 1 ,mem_24g_txlen 
+05fb 6800cb92 fetch 1 ,mem_24g_data_type 
+05fc 6000cb4d store 1 ,mem_24g_txpayload 
+05fd 6800cb91 fetch 1 ,mem_24g_datalen 
+05fe 1fe9fe00 lshift3 pdata ,pdata 
+05ff 6808cb90 fetcht 1 ,mem_24g_pid 
+0600 18410403 and temp ,0x03 ,temp 
+0601 18438400 lshift temp ,temp 
+0602 9841fe00 ior temp ,pdata 
+0603 6808cbcd fetcht 1 ,mem_24g_no_ack 
+0604 9840fe00 iadd temp ,pdata 
+0605 e0a08000 istore 1 ,contw 
+0606 6800cb91 fetch 1 ,mem_24g_datalen 
+0607 98007200 iforce loopcnt 
+0608 d8c04b2d arg mem_24g_txbuf ,contr 
+0609 20207f01 branch memcpy 
+
+p_g24_ch:
+060a 6808cb9c fetcht 1 ,mem_24g_current_ch_number 
+060b 2040060e call p_g24_ch_map_size 
+060c 6008cb9c storet 1 ,mem_24g_current_ch_number 
+060d 20600000 rtn 
+
+p_g24_ch_map_size:
+060e 20400612 call p_g24_ch_calc 
+060f 18408401 increase 1 ,temp 
+0610 18410403 and_into 3 ,temp 
+0611 20600000 rtn 
+
+p_g24_ch_calc:
+0612 6800cbb9 fetch 1 ,mem_24g_addr 
+0613 1fe17e03 and_into 0x03 ,pdata 
+0614 1fefa204 mul32 pdata ,4 ,rega 
+0615 58004ba2 setarg mem_24g_ch_map1 
+0616 9a20fe00 iadd rega ,pdata 
+0617 98408c00 iadd temp ,contr 
+0618 e8c08000 ifetch 1 ,contr 
+0619 6000cb9b store 1 ,mem_24g_ch 
+061a 20600000 rtn 
+
+p_g24_prep:
+061b 7844fc00 disable enable_crc 
+061c 7843fc00 disable enable_white 
+061d 58555555 setarg 0x555555 
+061e 98001e00 iforce crc24_init 
+061f 6800cb9b fetch 1 ,mem_24g_ch 
+0620 1fed8400 reverse pdata ,temp 
+0621 79200401 set1 1 ,temp 
+0622 18431c00 rshift temp ,white_init 
+0623 20600000 rtn 
+
+p_g24_receive_packet:
+0624 204053c4 call le_enable 
+0625 68024bb9 fetch 4 ,mem_24g_addr 
+0626 98001200 iforce access 
+0627 20402918 call set_sync_on 
+0628 6808cb9b fetcht 1 ,mem_24g_ch 
+0629 2040291f call set_freq_rx 
+062a 58000500 setarg param_pll_setup 
+062b 20402a8f call sleep 
+062c 20402924 call rf_rx_enable 
+
+p_g24_receive_rxon:
+062d 2040061b call p_g24_prep 
+062e 7857fc00 disable user3 
+062f 7826fc00 enable decode_fec0 
+0630 7830fc00 enable is_rx 
+0631 78507c00 disable is_tx 
+0632 78287c00 enable swfine 
+0633 68014b94 fetch 2 ,mem_24g_rx_window 
+0634 98003600 iforce stop_watch 
+0635 37c18400 correlate null ,timeout 
+0636 242c066f nbranch p_g24_sync_timeout ,sync 
+0637 7846fc00 disable decode_fec0 
+0638 7825fc00 enable decode_fec1 
+0639 7823fc00 enable enable_white 
+063a 7824fc00 enable enable_crc 
+063b 09800008 parse demod ,bucket ,8 
+063c 19897e00 rshift3 pwindow ,pdata 
+063d 6000cc45 store 1 ,mem_24g_get_syncword_crc8 
+063e 6808cc44 fetcht 1 ,mem_24g_syncword_crc8 
+063f 98467c00 isub temp ,null 
+0640 2422866b nbranch p_g24_end_of_packet ,zero 
+0641 09800008 parse demod ,bucket ,8 
+0642 19897e00 rshift3 pwindow ,pdata 
+0643 6000cb0b store 1 ,mem_24g_rxbuf 
+0644 6800cbd7 fetch 1 ,mem_24g_mode 
+0645 1fe67c02 sub pdata ,rx_24g ,null 
+0646 2022864b branch p_g24_receive_skip ,zero 
+0647 6800cb0b fetch 1 ,mem_24g_rxbuf 
+0648 6808cb92 fetcht 1 ,mem_24g_data_type 
+0649 a8400e00 icompare bits_data ,temp 
+064a 2420866b nbranch p_g24_end_of_packet ,true 
+
+p_g24_receive_skip:
+064b 09800008 parse demod ,bucket ,8 
+064c 19897e00 rshift3 pwindow ,pdata 
+064d e0a08000 istore 1 ,contw 
+064e 1fe97e00 rshift3 pdata ,pdata 
+064f 1fe1721f and pdata ,0x1f ,loopcnt 
+0650 20228655 branch p_g24rx_nopayload ,zero 
+
+p_g24rx_loop:
+0651 09800008 parse demod ,bucket ,8 
+0652 19897e00 rshift3 pwindow ,pdata 
+0653 e0a08000 istore 1 ,contw 
+0654 c2000651 loop p_g24rx_loop 
+
+p_g24rx_nopayload:
+0655 18a22200 copy contw ,rega 
+0656 09800008 parse demod ,bucket ,8 
+0657 19897e00 rshift3 pwindow ,pdata 
+0658 6000cccc store 1 ,mem_rssi_hex_received 
+0659 1a220a00 copy rega ,contw 
+065a 09800018 parse demod ,bucket ,24 
+065b 78287c00 enable swfine 
+065c db600664 arg param_sifs ,stop_watch 
+065d 1fef7e00 rshift32 pdata ,pdata 
+065e 1ff17e00 rshift16 pdata ,pdata 
+065f e0a18000 istore 3 ,contw 
+0660 7845fc00 disable decode_fec1 
+0661 2023066b branch p_g24_end_of_packet ,crc_failed 
+0662 7837fc00 enable user3 
+0663 68008017 fetch 1 ,mem_last_freq 
+0664 1fe0a200 add pdata ,0 ,rega 
+0665 20402981 call rf_write_freq 
+0666 7846fc00 disable decode_fec0 
+0667 20402918 call set_sync_on 
+0668 6800cccc fetch 1 ,mem_rssi_hex_received 
+0669 2040001f call p_rssi_signal 
+066a 20600000 rtn 
+
+p_g24_end_of_packet:
+066b 784dfc00 disable encode_fec1 
+066c 7845fc00 disable decode_fec1 
+066d 2040264d call end_of_packet 
+066e 20600000 rtn 
+
+p_g24_sync_timeout:
+066f 2020066b branch p_g24_end_of_packet 
+
+p_g24_set_freq_tx:
+0670 20402918 call set_sync_on 
+0671 6808cb9b fetcht 1 ,mem_24g_ch 
+0672 20202933 branch set_freq_tx 
+
+p_g24_transmit:
+0673 204053c4 call le_enable 
+0674 68024bb9 fetch 4 ,mem_24g_addr 
+0675 98001200 iforce access 
+0676 2040061b call p_g24_prep 
+0677 20400670 call p_g24_set_freq_tx 
+0678 79202a00 set1 txgfsk ,radio_ctrl 
+0679 782efc00 enable encode_fec0 
+067a 78307c00 enable is_tx 
+067b 7850fc00 disable is_rx 
+067c 19317e00 rshift16 access ,pdata 
+067d 1fecfe00 rshift8 pdata ,pdata 
+067e 1ff1fe00 rshift4 pdata ,pdata 
+067f 08008628 inject mod ,40 
+0680 784efc00 disable encode_fec0 
+0681 782dfc00 enable encode_fec1 
+0682 7823fc00 enable enable_white 
+0683 7824fc00 enable enable_crc 
+0684 6800cc44 fetch 1 ,mem_24g_syncword_crc8 
+0685 08008608 inject mod ,8 
+0686 6800cb93 fetch 1 ,mem_24g_txlen 
+0687 98007200 iforce loopcnt 
+0688 d8c04b4d arg mem_24g_txpayload ,contr 
+
+p_g24tr_loop:
+0689 e8c08000 ifetch 1 ,contr 
+068a 08008608 inject mod ,8 
+068b c2000689 loop p_g24tr_loop 
+068c 78247c00 enable enable_parity 
+068d 08008618 inject mod ,24 
+068e 78447c00 disable enable_parity 
+068f 37d38200 until null ,tx_clear 
+0690 20000064 nop 100 
+0691 784efc00 disable encode_fec0 
+0692 784dfc00 disable encode_fec1 
+0693 20600000 rtn 
+
+p_mouse_data_init:
+0694 7047a007 jam 7 ,mem_mouse_data_queue 
+0695 7047a104 jam 4 ,mem_mouse_data_queue + 1 
+0696 580047a0 setarg mem_mouse_data_queue 
+0697 60014218 store 2 ,mem_queue_ptr 
+0698 20207e38 branch queue_init 
+
+p_mouse_data_push:
+0699 da20469a arg mem_mouse_key ,rega 
+069a 20407e3d call queue_push 
+069b 2054069d call p_mouse_queue_increase ,user 
+069c 20600000 rtn 
+
+p_mouse_queue_increase:
+069d 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
+069e 1fe0fe01 increase 1 ,pdata 
+069f 6000c7c1 store 1 ,mem_mouse_data_queue_num 
+06a0 20600000 rtn 
+
+p_mouse_data_pull:
+06a1 da20469a arg mem_mouse_key ,rega 
+06a2 20407e54 call queue_pop 
+06a3 203406a5 branch p_mouse_fill_data_le ,user 
+06a4 20600000 rtn 
+
+p_mouse_fill_data_le:
+06a5 20405652 call le_clear_md 
+06a6 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
+06a7 1fe67c01 sub pdata ,1 ,null 
+06a8 24415650 ncall le_set_md ,positive 
+06a9 6800c7c1 fetch 1 ,mem_mouse_data_queue_num 
+06aa 207a0000 rtn blank 
+06ab 1fe0ffff increase -1 ,pdata 
+06ac 6000c7c1 store 1 ,mem_mouse_data_queue_num 
+06ad 20203f90 branch mouse_fill_data_le 
 org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/program/patch.prog	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/program/patch.prog	(working copy)
@@ -1,9 +1,7 @@
 //define DONGLE
 define MOUSE
-//define G24
 define BLE
-define CLASSIC_BT
-define MOUSE_SMOOTHER
+//define CLASSIC_BT
 define ADC_ENABLE
 //define P24G_LOG
 //define RF_DEBUG
@@ -21,38 +19,42 @@
 //define DEBUGLOG_UPPER_SM
 
 ifdef PATCH
-	bbit1 8,pf_patch_ext
-	beq patch00_1,p_soft_reset_1
-	beq patch00_2,p_soft_reset_2
+	bbit1 8,pf_patch_ext	
 	beq patch10_5,p_shutdown_radio
 	beq patch11_1,p_set_freq_tx
+ifdef DONGLE
+	beq patch11_6,p_save_rssi
+	beq patch18_4,p_app_init
+	beq patch1f_0,p_usb_status1
+endif
+ifdef MOUSE
+	beq patch00_1,p_soft_reset_1
+	beq patch00_2,p_soft_reset_2	
 ifdef CLASSIC_BT
 	beq patch03_3,p_page_wait_fhs_reply_ok
-	beq patch04_6,p_role_switch_master
 	beq patch09_0,p_quit_connection_cont
 	beq patch09_2,p_prepare_tx
  	beq patch0b_1,p_process_dmh
 	beq patch0a_1,p_slave_conn_recv_packet
 	beq patch14_7,p_lpm_dispatch
-	beq patch15_5,p_lpm_set_mult
-	beq patch19_3,app_bt_start_reconnect+3
-	beq patch1d_1,p_mouse_bb_disconnected
+	beq patch19_3,p_app_bt_start_reconnect
 endif	
 	beq patch14_1,p_init_param
+	beq patch15_0,p_lpm_dispatch_next2
 	beq patch16_1,p_lpm_check_wake_lock
-ifdef G24
 	beq patch16_2,p_g24_dispatch
-endif	
 	beq patch18_4,p_device_init
 	beq patch19_1,p_app_flag_store
 	beq patch19_2,p_app_initflag_check
 	beq patch1c_3,p_mouse_seting_dpi
-	beq patch1c_6,p_mouse_motion
+	beq patch1d_1,p_mouse_bb_disconnected
 	beq patch1d_2,p_mouse_bb_event_discovery_btn
 	beq patch1d_3,p_mouse_start_discovery
 	beq patch1d_4,p_mouse_stop_discovery
+endif
 	branch loop
 pf_patch_ext:
+ifdef MOUSE
 ifdef BLE
 	beq patch27_1,p_le_slave_match
 	beq patch28_3,p_le_next_adv_channel
@@ -64,23 +66,955 @@
 	beq patch2c_7,p_le_parse_l2cap
 	beq patch2d_2,p_le_adv_not_match
 	beq patch2e_7,p_le_lpm_setmult
-	beq patch3f_2,p_check_51cmd_once_continue
 endif	
 ifdef CLASSIC_BT
-	beq patch20_5,p_hid_rx_process
-	beq patch30_0,p_parse_lmp_accepted
 	beq patch30_2,p_send_lmp
-	beq patch31_0,p_process_conn_sm
+	beq patch39_5,p_sdp_process
 endif
 	beq patch31_4,p_twspi_reset
+	beq patch3f_2,p_check_51cmd_once_continue	
 ifdef DEBUGLOG
 	beq patch2f_6,p_parse_lmp_opcode
+	beq patch31_0,p_process_conn_sm
 	beq patch37_6,p_process_upper_sm_reconn
 	beq patch3e_6,p_ui_ipc_send_event
 	beq patch3e_7,p_ui_ipc_send_cmd
 endif
+endif
 	branch loop
+
+
+ifdef DONGLE
+p_save_rssi:
+	hfetch 2,rf_afc_d2a
+	rshift4 pdata,pdata
+	rshift3 pdata,pdata
+	sub pdata,0,pdata
+	and_into 0xff,pdata
+	store 1,mem_rssi_hex
+	branch save_rssi+6
+
+p_usb_status1:
+	jam 0x11,core_usb_status
+	hfetch 1,core_usb_ep_len
+	store 1,mem_usb_read_len
+	copy pdata,loopcnt
+	branch usb_rx_no_data,blank
+	arg mem_usb_setup,contw
+	call usb_rx_read
+	fetch 1,mem_usb_read_len
+	sub pdata,7,null
+	rtn positive 
+	fetch 1,mem_usb_setup_bmRequestType
+	and_into 0x80,pdata
+	beq OUT_DEVICE,p_usb_out_device
+	branch usb_class_type+2
+p_usb_out_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq CLASS_REQ,p_usb_out_class_req	
+	branch usb_out_device+4
+p_usb_out_class_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq SET_REPORT,p_usb_set_report
+	branch usb_out_class_req+1
+p_usb_set_report:
+	jam 1,mem_usb0_get_set_report
+	call usb_set_report_resume_judge
+	fetch 2,mem_usb_setup_bValue
+	store 2,mem_usb_setup_bValue_temp
+	nop 15000	//delay 1ms
+	hfetch 1,core_usb_ep_len
+	ncall p_usb_set_report_rxdata,blank
+	branch usb_set_report+4
+p_usb_set_report_rxdata:
+	copy pdata,loopcnt
+	arg mem_usb0_setup,contw
+	branch usb_rx_read
+
+p_app_init:
+	call enable_authrom
+	call p_dongle_init
+	call p_g24_queue_init
+	fetch 1,mem_24g_pair_mode
+	beq 0x00,p_dongle_auto_bind
+	beq 0x01,p_dongle_pc_bind
+	beq 0x0f,p_dongle_all_powerful
+	branch assert
+
+p_dongle_init:
+	fetch 1,mem_tx_power
+	store 1,mem_tx_power_temp
+	arg 0x80,loopcnt
+	arg mem_rssi_noise_buffer,contw
+	call memset0
+	branch usb_init
+
+p_dongle_all_powerful:
+	call p_dongle_check_mode
+p_dongle_all_powerful_loop:
+	call p_g24_dongle_work_mode
+	call usb_isr
+	branch p_dongle_all_powerful_loop
+
+p_dongle_pc_bind:
+	call p_dongle_check_mode
+p_dongle_pc_bind_loop:	
+	call p_g24_dongle_work_mode
+	call p_g24_dongle_bind_mode
+	call p_dongle_usb_dispatch
+	branch p_dongle_pc_bind_loop
+
+p_dongle_check_mode:
+	jam 0,mem_24g_ackpayload_enable
+p_dongle_work_mode_enable:
+	jam DONGLE_WORK,mem_dongle_work_mode
+	jam CLEAR_INIT,mem_dongle_mode_init	
+	rtn
+
+p_g24_dongle_work_mode:
+	fetch 1,mem_dongle_work_mode
+	rtnne DONGLE_WORK
+p_g24_dongle_work_mode_start:	
+	call p_g24_dongle_work_init
+	call p_g24_ch_process
+	call p_g24_receive_packet_start
+	branch p_g24_blank_data_process
+
+p_g24_dongle_work_init:
+	fetch 1,mem_dongle_mode_init
+	rtnbit1 DONGLE_WORK
+	set1 DONGLE_WORK,pdata
+	store 1,mem_dongle_mode_init
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+	jam 0,mem_24g_ackpayload_enable
+	jam 0,mem_usb_tx_enable
+	jam 1,mem_24g_abort_packet
+	jam 0,mem_24g_pid
+	fetch 4,mem_24g_rx_addr
+	call p_g24_update_addr_and_synccrc8
+	call p_g24_ch
+	branch p_g24_rx_interrupt_clear
+
+p_g24_ch_process:
+	fetch 1,mem_24g_abort_packet
+	beq 1,p_g24_noise_rssi
+	fetch 1,mem_24g_hop_packet
+	beq 1,p_g24_ch_receive_hop_pac
+	fetcht 4,mem_24g_hop_btclk
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall g24_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_24g_hop_btclk
+	fetcht 1,mem_24g_hop_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_24g_hop_btclk
+	jam 1,mem_24g_abort_packet
+	branch p_g24_ch
+
+p_g24_ch_receive_hop_pac:
+	jam 0,mem_24g_hop_packet
+	branch p_g24_ch
+
+p_g24_ch_timer_reinit:
+	copy clkn_bt,pdata
+	store 4,mem_24g_hop_btclk
+	jam 0,mem_24g_rf_laststa
+	rtn
+
+p_g24_noise_rssi:
+	arg mem_rssi_noise_buffer,rega
+	call p_rssi_average
+	storet 1,mem_rssi_noise_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	branch p_g24_ch
+
+p_g24_blank_data_process:
+	call p_g24_ms_blank_data
+	call p_g24_kb_blank_data
+	branch p_g24_kb_mul_blank_data
+
+p_g24_ms_blank_data:
+	fetch 1,mem_24g_ms_blank_data_enable
+	rtn blank
+	arg TIMER_MS_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_24g_ms_blank_data_enable
+	branch g24_ms_blank_data_2usb
+
+p_g24_kb_blank_data:
+	fetch 1,mem_24g_kb_blank_data_enable
+	rtn blank
+	arg TIMER_KB_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_24g_kb_blank_data_enable
+	branch g24_kb_blank_data_2usb
+
+p_g24_kb_mul_blank_data:
+	fetch 1,mem_24g_kb_mul_blank_data_enable
+	rtn blank
+	arg TIMER_KB_MUL_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_24g_kb_mul_blank_data_enable
+	branch g24_kb_mul_blank_data_2usb
+
+p_g24_dongle_bind_mode:
+	fetch 1,mem_dongle_work_mode
+	rtnne DONGLE_BIND
+	call p_g24_dongle_bind_init
+	branch p_g24_dongle_bind_data_process
+
+p_g24_dongle_bind_init:
+	fetch 1,mem_dongle_mode_init
+	rtnbit1 DONGLE_BIND
+	set1 DONGLE_BIND,pdata
+	store 1,mem_dongle_mode_init
+	setarg 0
+	store 3,mem_dongle_ms_bind_step
+	jam TX_POWER_f5DB,mem_tx_power
+	jam 1,mem_24g_ackpayload_enable
+	jam 0,mem_24g_pid
+	jam G24_PAIR_CH,mem_24g_ch	//2480MHz
+	fetch 4,mem_24g_paring_addr	//Address
+	branch p_g24_update_addr_and_synccrc8
+
+p_g24_dongle_bind_data_process:
+	call p_g24_receive_transmit_ack
+	nbranch p_g24_rx_interrupt_clear,user3
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	arg 8,loopcnt
+	call memcpy
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_BIND,p_g24_dongle_bind_first_step	//bind step 1
+	beq DATATYPE_CONFIG,p_g24_dongle_bind_second_step
+	beq DATATYPE_OK,p_g24_dongle_bind_third_step
+	beq 0xff,p_g24_data_attemp_bind
+p_g24_rx_interrupt_clear:
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem
+
+p_g24_dongle_bind_first_step:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq BIND_MOUSE,p_g24_dongle_bind_first_step_mouse
+	beq BIND_KEYBOARD,p_g24_dongle_bind_first_step_keyboard
+	rtn
+p_g24_dongle_bind_first_step_mouse:
+	jam 1,mem_dongle_ms_bind_step
+p_g24_dongle_bind_ms_payload_cfg:
+	jam DATATYPE_MOUSE,mem_24g_bind_payload
+p_g24_dongle_bind_payload_cfg:	
+	jam 0x80,mem_24g_bind_payload+1
+	fetch 6,mem_24g_rx_addr
+	store 6,mem_24g_bind_payload+2
+	rtn
+
+p_g24_dongle_bind_first_step_keyboard:
+	jam 1,mem_dongle_kb_bind_step
+p_g24_dongle_bind_kb_payload_cfg:
+	jam DATATYPE_KEYBOARD,mem_24g_bind_payload
+	branch p_g24_dongle_bind_payload_cfg
+
+p_g24_dongle_bind_second_step:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq BIND_MOUSE,p_g24_dongle_bind_second_step_mouse
+	beq BIND_KEYBOARD,p_g24_dongle_bind_second_step_keyboard
+	rtn
+p_g24_dongle_bind_second_step_mouse:
+	call p_g24_dongle_bind_ms_payload_cfg
+	fetch 1,mem_dongle_ms_bind_step
+	beq 1,p_g24_dongle_ms_bind_step_set2
+	rtn
+p_g24_dongle_ms_bind_step_set2:
+	jam 2,mem_dongle_ms_bind_step
+	rtn
+p_g24_dongle_bind_second_step_keyboard:
+	call p_g24_dongle_bind_kb_payload_cfg	
+	fetch 1,mem_dongle_kb_bind_step
+	beq 1,p_g24_dongle_kb_bind_step_set2
+	rtn
+p_g24_dongle_kb_bind_step_set2:
+	jam 2,mem_dongle_kb_bind_step
+	rtn
+
+p_g24_dongle_bind_third_step:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq BIND_MOUSE,p_g24_dongle_bind_third_step_mouse
+	beq BIND_KEYBOARD,p_g24_dongle_bind_third_step_keyboard
+	rtn
+p_g24_dongle_bind_third_step_mouse:
+	fetch 1,mem_dongle_ms_bind_step
+	beq 2,p_g24_dongle_ms_bind_step_success
+	rtn
+p_g24_dongle_ms_bind_step_success:
+	fetch 1,mem_dongle_bind_device_status
+	or_into 0x01,pdata
+	store 1,mem_dongle_bind_device_status
+p_g24_dongle_bind_exit:	
+	setarg 0
+	store 2,mem_dongle_ms_bind_step
+	branch p_g24_rx_interrupt_clear
+	
+p_g24_dongle_bind_third_step_keyboard:
+	fetch 1,mem_dongle_kb_bind_step
+	bne 0,p_g24_dongle_kb_bind_step_success
+	rtn
+p_g24_dongle_kb_bind_step_success:
+	fetch 1,mem_dongle_bind_device_status
+	or_into 0x02,pdata
+	store 1,mem_dongle_bind_device_status
+	branch p_g24_dongle_bind_exit
+
+p_g24_data_attemp_bind:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_MOUSE,p_g24_data_attemp_mouse_bind
+	beq DATATYPE_KEYBOARD,p_g24_data_attemp_kbd_bind
+	rtn
+p_g24_data_attemp_mouse_bind:
+	fetch 4,mem_24g_rxdata_temp+4
+p_g24_store_mouse_addr:
+	store 4,mem_24g_ms_addr
+	rtn
+p_g24_data_attemp_kbd_bind:
+	fetch 4,mem_24g_rxdata_temp+4
+p_g24_store_kbd_addr:	
+	store 4,mem_24g_kb_addr
+	rtn
+
+p_g24_queue_init:
+	jam 0,mem_queue_ele_num
+	setarg mem_queue_start
+	store 2, mem_queue_read
+	store 2, mem_queue_write
+	rtn
+	
+p_g24_queue_put:
+	arg 0x1f,loopcnt
+	arg mem_usb0_set_report_data,temp
+	fetch 2, mem_queue_write
+	copy pdata,contw
+	copy temp,contr
+	call memcpy
+	fetch 1,mem_queue_ele_num
+	increase 1,pdata
+	store 1,mem_queue_ele_num
+	setarg mem_queue_write
+p_g24_queue_increase:
+	copy pdata,rega
+	arg mem_queue_end,temp
+	ifetch 2,rega
+	increase QUEUE_ELE_LENGTH,pdata
+	isub temp,null
+	nbranch p_g24_queue_put_end,positive
+	setarg mem_queue_start
+p_g24_queue_put_end:
+	istore 2,rega
+	rtn
+
+p_g24_queue_read_point:
+	disable user
+	fetch 1,mem_queue_ele_num
+	rtn blank
+	enable user
+	fetch 2,mem_queue_read
+	rtn
+
+p_dongle_usb_dispatch:
+	call usb_isr
+	fetch 1,mem_usb0_get_set_report
+	rtn blank
+	jam 0,mem_usb0_get_set_report
+	fetch 2,mem_usb_setup_bValue_temp
+	arg PC_SET_REPORT,temp
+	isub temp,null
+	nrtn zero
+	//get usb host command
+	fetch 1,mem_usb0_set_report_data
+	rtnne PC_REPORT_ID
+	fetch 1,mem_usb0_set_report_data+1
+	beq COMMAND_MODE,p_dongle_dispose_cmd_mode
+	beq COMMAND_BIND,p_dongle_dispose_cmd_bind
+	beq COMMAND_CURRENT_PROJECT,dongle_dispose_cmd_current_project
+	beq COMMAND_CURRENT_MODE,p_dongle_dispose_cmd_current_mode
+	beq COMMAND_CURRENT_FW_VERSION,p_dongle_dispose_cmd_current_fw_version
+	beq COMMAND_USER_DEFINED,p_dongle_dispose_cmd_user_defined
+	branch usb0_data_ready_report_set0
+
+p_dongle_dispose_cmd_bind:
+	fetch 1,mem_usb0_set_report_data+2
+	beq COM_BIND_GET,p_dongle_dispose_cmd_get_bind
+	beq COM_BIND_EXIT,p_dongle_dispose_cmd_exit_bind
+	beq COM_READ_MODE,dongle_dispose_cmd_read_mode
+	branch usb0_data_ready_report_set0
+p_dongle_dispose_cmd_get_bind:
+	fetch 1,mem_dongle_bind_device_status
+	store 1,mem_usb0_get_report_data+1
+	branch usb0_data_ready_report_set1
+p_dongle_dispose_cmd_exit_bind:
+	call p_dongle_work_mode_enable
+	branch p_dongle_dispose_cmd_get_bind
+ 
+p_dongle_dispose_cmd_mode:
+	fetch 1,mem_usb0_set_report_data+2
+	beq COM_MODE_BIND,p_dongle_enter_bind_mode
+	branch usb0_data_ready_report_set0
+p_dongle_enter_bind_mode:
+	call p_g24_bind_mode_enable
+	branch usb0_data_ready_report_set1
+
+p_dongle_dispose_cmd_current_mode:
+	fetch 1,mem_dongle_work_mode
+	beq DONGLE_WORK,p_dongle_dispose_in_work_mode
+	beq DONGLE_BIND,dongle_dispose_in_bind_mode
+	rtn
+p_dongle_dispose_in_work_mode:
+	jam COMMAND_MODE,mem_usb0_get_report_data+1
+	branch usb0_data_ready_report_set1
+	
+p_dongle_dispose_cmd_current_fw_version:
+	jam FW_VERSION3,mem_usb0_get_report_data+4
+	branch dongle_dispose_cmd_current_fw_version
+
+p_dongle_dispose_cmd_user_defined:
+	fetch 1,mem_usb0_set_report_data+2
+	beq 0xff,soft_reset_chip
+p_dongle_dispose_cmd_ota:
+	jam 2,mem_24g_ackpayload_enable
+	fetch 1,mem_queue_ele_num
+	beq QUEUE_ELE_COUNT,p_user_defined_queue_buff_full
+	call p_g24_queue_put
+	fetch 1,mem_queue_ele_num
+	beq QUEUE_ELE_COUNT,p_user_defined_queue_buff_full
+p_user_defined_queue_buff_free:
+	jam 0,mem_usb0_get_report_data+1
+	branch usb0_data_ready_report_set1
+
+p_user_defined_queue_buff_full:
+	jam 1,mem_usb0_get_report_data+1
+	branch usb0_data_ready_report_set1
+
+p_dongle_auto_bind:
+	call p_g24_mode_switch_init
+p_dongle_auto_bind_loop:
+	call p_g24_mode_switch
+	call p_g24_dongle_work_mode_auto
+	call p_g24_dongle_bind_mode_auto
+	call p_g24_dongle_search_mode_auto
+	call p_dongle_usb_dispatch
+	branch p_dongle_auto_bind_loop
+
+p_g24_dongle_work_mode_auto:
+	fetch 1,mem_dongle_work_mode
+	rtnne DONGLE_WORK
+	call p_g24_dongle_work_mode_start
+	branch p_g24_rx_nodata_process
+
+p_g24_dongle_bind_mode_auto:
+	fetch 1,mem_dongle_work_mode
+	rtnne DONGLE_BIND
+	call p_g24_dongle_bind_init
+	call p_g24_dongle_bind_data_process
+	fetch 1,mem_dongle_bind_device_status
+	rtn blank
+	jam 0,mem_24g_mode_switch
+	call p_dongle_check_mode
+	call p_g24_enable_nodata_timer
+	branch p_g24_timer_init
+	
+p_g24_mode_switch_init:
+	jam 1,mem_24g_mode_switch
+	jam 0,mem_24g_time_slice
+	jam 0xff,mem_24g_interval
+p_g24_timer_init:
+	setarg 0
+	store 4,mem_24g_tx_btclk
+	rtn
+	
+p_g24_mode_switch:
+	fetch 1,mem_24g_mode_switch
+	rtn blank
+	call p_g24_timer_check
+	nrtn user
+	fetch 1,mem_24g_time_slice
+	increase 1,pdata
+	and_into 1,pdata
+	store 1,mem_24g_time_slice
+	beq 0,p_dongle_check_mode
+	beq 1,p_g24_bind_mode_enable
+	rtn
+
+p_g24_bind_mode_enable:
+	jam DONGLE_BIND,mem_dongle_work_mode
+	jam CLEAR_INIT,mem_dongle_mode_init
+	rtn
+
+p_g24_enable_nodata_timer:
+	jam 1,mem_24g_nodata_timer_enable
+	branch g24_enable_nodata_timer_init
+
+p_g24_rx_nodata_process:
+	fetch 1,mem_24g_ackpayload_enable
+	rtneq 2
+	fetch 1,mem_24g_nodata_timer_enable
+	rtn blank
+	arg TIMER_NODATA,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_24g_nodata_timer_enable
+	//no data for more than 100ms,then go to search
+	jam DONGLE_SEARCH,mem_dongle_work_mode
+	jam CLEAR_INIT,mem_dongle_mode_init
+	branch p_g24_rx_interrupt_clear
+
+p_g24_receive_transmit_ack:
+	call p_g24_rx_interrupt_clear
+	call p_g24_receive_packet
+	nrtn user3
+	branch p_g24_transmit_ack
+
+
+p_g24_dongle_search_mode_auto:
+	fetch 1,mem_dongle_work_mode
+	rtnne DONGLE_SEARCH
+	call p_g24_dongle_search_mode_init
+	call p_g24_rx_auto_addr_ch_search
+	call p_g24_receive_transmit_ack
+	nbranch p_g24_rx_interrupt_clear,user3
+	//dongle addr,then parse rxdata
+	call p_g24_rx_addr_check
+	call p_g24_receive_packet_parse,zero
+	//receive data,then go to paired
+	jam DONGLE_WORK,mem_dongle_work_mode
+	fetch 1,mem_dongle_mode_init
+	set1 DONGLE_WORK,pdata
+	store 1,mem_dongle_mode_init
+
+	fetch 1,mem_24g_ackpayload_enable
+	sub pdata,2,null
+	ncall p_g24_ackpayload_disable,zero
+
+	call p_g24_rx_interrupt_clear
+	call p_g24_enable_nodata_timer
+	call p_g24_rx_addr_check
+	branch p_g24_dg_ch_num_reinit,zero
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_kb_addr
+	isub temp,null
+	branch p_g24_kb_ch_num_reinit,zero		
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_ms_addr
+	isub temp,null
+	branch p_g24_ms_ch_num_reinit,zero
+	rtn
+
+p_g24_ackpayload_disable:
+	jam 0,mem_24g_ackpayload_enable
+	rtn
+
+p_g24_dg_ch_num_reinit:
+	fetch 1,mem_24g_dg_ch_number
+p_g24_current_ch_num_reinit:
+	store 1,mem_24g_current_ch_number
+	rtn
+p_g24_kb_ch_num_reinit:
+	fetch 1,mem_24g_kb_ch_number
+	branch p_g24_current_ch_num_reinit
+p_g24_ms_ch_num_reinit:
+	fetch 1,mem_24g_ms_ch_number
+	branch p_g24_current_ch_num_reinit
+
+p_g24_dongle_search_mode_init:
+	fetch 1,mem_dongle_mode_init
+	rtnbit1 DONGLE_SEARCH
+	set1 DONGLE_SEARCH,pdata
+	store 1,mem_dongle_mode_init
+	jam 0,mem_24g_time_slice
+	jam 1,mem_24g_ackpayload_enable
+	setarg 0
+	store 3,mem_rssi_noise_dg_index
+	store 7,mem_24g_dg_config_ch_once
+	call p_g24_rx_addr_check
+	nrtn zero
+	fetch 1,mem_24g_current_ch_number
+	store 1,mem_24g_dg_ch_number
+	fetch 1,mem_24g_ch
+	store 1,mem_24g_dg_last_ch
+	rtn
+
+p_g24_rx_addr_check:
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_rx_addr
+	isub temp,null
+	rtn
+
+p_g24_rx_auto_addr_ch_search:
+	fetch 1,mem_24g_time_slice
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_24g_time_slice
+	//pairing address and channel come first
+	beq 0,p_g24_rx_auto_bind_config_kb
+	beq 1,p_g24_rx_auto_bind_config_dongle
+	beq 2,p_g24_rx_auto_bind_config_mouse
+	beq 3,p_g24_rx_auto_bind_config_dongle
+	rtn
+
+p_g24_rx_auto_bind_config_mouse:
+	call p_g24_dongle_bind_ms_payload_cfg
+	fetch 4,mem_24g_ms_addr
+	branch p_g24_rx_auto_addr_ch_search,blank
+	call p_g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_ms_config_ch_once
+	call p_g24_ms_config_ch_once,blank
+	fetch 1,mem_24g_ms_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_ms_index
+	arg mem_rssi_noise_ms_buffer,rega
+	call p_rssi_store
+	storet 1,mem_rssi_noise_ms_index
+	call p_rssi_average
+	storet 1,mem_rssi_noise_ms_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_ms_ch_number
+	call p_g24_ch_map_size
+	storet 1,mem_24g_ms_ch_number
+	store 1,mem_24g_ms_last_ch
+	rtn
+
+p_g24_ms_config_ch_once:
+	jam 1,mem_24g_ms_config_ch_once
+	arg 0,temp
+	call p_g24_ch_calc
+	store 1,mem_24g_ms_last_ch
+	rtn
+	
+p_g24_rx_auto_bind_config_kb:
+	call p_g24_dongle_bind_kb_payload_cfg
+	fetch 4,mem_24g_kb_addr
+	branch p_g24_rx_auto_addr_ch_search,blank
+	call p_g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_kb_config_ch_once
+	call p_g24_kb_config_ch_once,blank
+	fetch 1,mem_24g_kb_last_ch
+	store 1,mem_24g_ch	
+	fetcht 1,mem_rssi_noise_kb_index
+	arg mem_rssi_noise_kb_buffer,rega
+	call p_rssi_store
+	storet 1,mem_rssi_noise_kb_index
+	call p_rssi_average
+	storet 1,mem_rssi_noise_kb_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_kb_ch_number
+	call p_g24_ch_map_size
+	storet 1,mem_24g_kb_ch_number
+	store 1,mem_24g_kb_last_ch
+	rtn
+
+p_g24_kb_config_ch_once:
+	jam 1,mem_24g_kb_config_ch_once
+	arg 0,temp
+	call p_g24_ch_calc
+	store 1,mem_24g_kb_last_ch
+	rtn	
+
+p_g24_rx_auto_bind_config_dongle:
+	call p_g24_dongle_bind_ms_payload_cfg
+	fetch 4,mem_24g_rx_addr
+	call p_g24_update_addr_and_synccrc8	
+	fetch 1,mem_24g_dg_config_ch_once
+	call p_g24_dg_config_ch_once,blank
+	fetch 1,mem_24g_dg_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_dg_index
+	arg mem_rssi_noise_dg_buffer,rega
+	call p_rssi_store
+	storet 1,mem_rssi_noise_dg_index
+	call p_rssi_average
+	storet 1,mem_rssi_noise_dg_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_dg_ch_number
+	call p_g24_ch_map_size
+	storet 1,mem_24g_dg_ch_number
+	store 1,mem_24g_dg_last_ch
+	rtn
+
+p_g24_dg_config_ch_once:
+	jam 1,mem_24g_dg_config_ch_once
+	fetch 1,mem_24g_dg_last_ch
+	store 1,mem_24g_ch
+	rtn
+
+
+
+p_g24_read_len_pid_crc:
+//read control
+	fetch 1,mem_24g_rxbuf+1
+	rshift3 pdata,pdata
+	store 1,mem_24g_rxdata_length
+//get crc
+	increase 1,pdata
+	arg mem_24g_rxbuf+1,contr
+	iadd contr,contr
+	ifetch 3,contr
+	store 3,mem_24g_sta_crc
+//read pid
+	fetch 1,mem_24g_rxbuf+1
+	rshift pdata,pdata
+	and pdata,0x03,pdata
+	store 1,mem_24g_sta_pid
+	rtn
+
+p_g24_transmit_ack:
+//data type
+	fetch 1,mem_24g_rxbuf
+	store 1,mem_24g_data_type
+//read len pid crc
+	call p_g24_read_len_pid_crc
+//read ack
+	fetch 1,mem_24g_rxbuf+1
+	isolate1 bit_ack_24g,pdata
+	branch p_g24tx_no_ack,true
+p_g24tx_with_ack:
+	call p_g24_ackpayload_prep
+	call p_g24_transmit_prep
+	call p_g24_transmit
+p_g24tx_no_ack:
+	branch p_g24_end_of_packet
+
+p_g24_ackpayload_prep:
+	jam 0,mem_24g_datalen
+	fetch 1,mem_24g_ackpayload_enable
+	rtn blank
+	beq BIND_ACKPAYLOAD,p_g24_bind_ackpayload_prep
+	beq USER_ACKPAYLOAD,p_g24_user_ackpayload_prep
+	rtn
+
+p_g24_bind_ackpayload_prep:
+	jam 0x08,mem_24g_datalen
+	arg 0x08,loopcnt
+	arg mem_24g_bind_payload,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy
+
+p_g24_user_ackpayload_prep:
+	call p_g24_queue_read_point
+	nrtn user
+	jam 0x1f,mem_24g_datalen
+	arg 0x1f,loopcnt
+	copy pdata,contr
+	arg mem_24g_txbuf,contw
+	call memcpy
+	fetch 2,mem_24g_txbuf+3	//pac id
+	store 2,mem_24g_ota_sta_pid
+	rtn
+
+p_g24_receive_packet_start:
+	call p_g24_receive_transmit_ack
+	nbranch p_g24_rx_interrupt_clear,user3
+	branch p_g24_receive_packet_parse
+
+p_g24_receive_packet_parse:
+	call p_g24_receive_packet_parse_pid_crc
+	nbranch p_g24_rx_interrupt_clear,user
+	fetch 1,mem_24g_rxdata_length
+	branch p_g24_rx_interrupt_clear,blank
+	increase 2,pdata
+	iforce loopcnt
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	call memcpy
+	jam 0,mem_24g_mode_switch
+	fetch 1,mem_24g_pair_mode
+	call p_g24_enable_nodata_timer,blank
+	fetch 1,mem_24g_rxdata_temp+2
+	beq 0x01,p_g24_data_type1
+	beq 0x02,p_g24_data_type2
+	beq 0x03,p_g24_data_type3
+	beq 0xff,p_g24_data_attemp
+	branch p_g24_rx_interrupt_clear
+
+p_g24_receive_packet_parse_pid_crc:
+	call disable_user
+	fetch 1,mem_24g_sta_pid
+	fetcht 1,mem_24g_last_pid
+	isub temp,null
+	ncall enable_user,zero
+	fetch 1,mem_24g_sta_pid
+	store 1,mem_24g_last_pid
+	fetch 3,mem_24g_sta_crc
+	fetcht 3,mem_24g_last_crc
+	isub temp,null
+	ncall enable_user,zero
+	fetch 3,mem_24g_sta_crc
+	store 3,mem_24g_last_crc
+	rtn
+
+p_g24_data_type1:
+	call p_g24_ch_timer_reinit
+	fetch 1,mem_24g_abort_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	setflag true,0,pdata
+	store 1,mem_24g_abort_packet
+	beq 1,p_g24_data_attemp_mouse_abort
+	fetch 1,mem_24g_hop_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_hop,temp
+	setflag true,0,pdata
+	store 1,mem_24g_hop_packet
+
+	fetch 1,mem_24g_rxdata_temp+3	//OTA
+	beq CMD_OTA,p_g24_ota_process
+	
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data	//report id
+	fetch 7,mem_24g_rxdata_temp+3	//key
+	istore 7,contw
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	ncall p_g24_ms_enable_blank_data_forcibly,blank//get kb data
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	call p_g24_ms_disable_blank_data_forcibly,blank
+	branch g24_data_type1_usbtx_enable
+
+p_g24_ms_enable_blank_data_forcibly:
+	jam 1,mem_24g_ms_blank_data_enable
+	branch g24_ms_enable_blank_data_timer
+p_g24_ms_disable_blank_data_forcibly:
+	jam 0,mem_24g_ms_blank_data_enable
+	branch g24_ms_disable_blank_data_timer
+
+p_g24_data_type2:
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	branch p_g24_data_attemp_kbd_abort,true
+	arg mem_usb_kb_data,contw
+	call p_g24_data_type2_reverse_data
+	fetch 8,mem_usb_kb_data
+	ncall p_g24_kb_enable_blank_data_forcibly,blank//get kb data
+	fetch 8,mem_usb_kb_data	
+	call p_g24_kb_disable_blank_data_forcibly,blank
+	fetch 8,mem_usb_kb_data
+	store 8,mem_24g_kb_data_sta_data
+	fetcht 8,mem_24g_kb_data_last_data
+	isub temp,null
+	ncall g24_kb_data_into_ep1_fifo,zero
+	fetch 8,mem_24g_kb_data_sta_data
+	store 8,mem_24g_kb_data_last_data
+	branch p_g24_rx_interrupt_clear
+
+p_g24_data_type2_reverse_data:
+	arg mem_24g_rxdata_temp+2,contr
+	arg 9,loopcnt
+	branch reverse_byte
+
+p_g24_kb_enable_blank_data_forcibly:
+	jam 1,mem_24g_kb_blank_data_enable
+	branch g24_kb_enable_blank_data_timer
+
+p_g24_kb_disable_blank_data_forcibly:
+	jam 0,mem_24g_kb_blank_data_enable
+	branch g24_kb_disable_blank_data_timer
+
+
+p_g24_data_type3:
+	arg mem_usb_kb_multikey,contw
+	call p_g24_data_type2_reverse_data
+	fetch 2,mem_usb_kb_multikey+1
+	ncall p_g24_kb_mul_enable_blank_data_forcibly,blank//get multikey data
+	fetch 2,mem_usb_kb_multikey+1
+	call p_g24_kb_mul_disable_blank_data_forcibly,blank
+	fetch 3,mem_usb_kb_multikey
+	store 3,mem_24g_kb_multikey_sta_data
+	fetcht 3,mem_24g_kb_multikey_last_data
+	isub temp,null
+	ncall g24_kb_mul_data_into_ep2_fifo,zero
+	fetch 3,mem_24g_kb_multikey_sta_data
+	store 3,mem_24g_kb_multikey_last_data
+	branch p_g24_rx_interrupt_clear
+
+p_g24_kb_mul_enable_blank_data_forcibly:
+	jam 1,mem_24g_kb_mul_blank_data_enable
+	branch g24_kb_mul_enable_blank_data_timer
+
+p_g24_kb_mul_disable_blank_data_forcibly:
+	jam 0,mem_24g_kb_mul_blank_data_enable
+	branch g24_kb_mul_disable_blank_data_timer
+
 	
+p_g24_data_attemp:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_MOUSE,p_g24_data_attemp_mouse
+	beq DATATYPE_KEYBOARD,p_g24_data_attemp_kbd
+	rtn
+p_g24_data_attemp_mouse:
+	fetch 4,mem_24g_rxdata_temp+4
+	branch p_g24_store_mouse_addr
+p_g24_data_attemp_kbd:
+	fetch 4,mem_24g_rxdata_temp+4
+	branch p_g24_store_kbd_addr
+p_g24_data_attemp_mouse_abort:
+	fetch 4,mem_24g_rxdata_temp+10
+	branch p_g24_store_mouse_addr
+p_g24_data_attemp_kbd_abort:
+	fetch 4,mem_24g_rxdata_temp+10
+	branch p_g24_store_kbd_addr
+
+p_g24_ota_process:
+	fetch 2,mem_24g_rxdata_temp+5	//ackpayload pid
+	fetcht 2,mem_24g_ota_sta_pid
+	isub temp,null
+	branch p_g24_ota_next_pac,zero
+	rtn
+	
+p_g24_ota_next_pac:
+	fetch 1,mem_24g_rxdata_temp+4	//OTA TYPE
+	beq CMD_OTA_EXIT,p_g24_ota_exit_process
+	fetch 1,mem_queue_ele_num
+	rtn blank	
+	setarg mem_queue_read
+	call p_g24_queue_increase
+	fetch 1,mem_queue_ele_num
+	increase -1,pdata
+	store 1,mem_queue_ele_num
+	fetch 1,mem_24g_rxdata_temp+4	//OTA TYPE
+	beq CMD_OTA_DATA,p_user_defined_queue_buff_free
+	beq CMD_OTA_EXIT,p_g24_ota_exit_process
+	rtn
+
+p_g24_ota_exit_process:
+	setarg 0
+	store 2,mem_24g_ota_sta_pid
+	store 1,mem_24g_ackpayload_enable
+	call p_g24_queue_init
+	fetch 1,mem_24g_rxdata_temp+7	//ackpayload pid
+	beq OTA_STA_SUCCESS,p_g24_ota_exit_success
+	beq OTA_STA_FAIL,p_g24_ota_exit_fail
+	rtn
+p_g24_ota_exit_success:
+	jam 2,mem_usb0_get_report_data+1
+	branch usb0_data_ready_report_set1
+p_g24_ota_exit_fail:
+	jam 3,mem_usb0_get_report_data+1
+	branch usb0_data_ready_report_set1
+endif
+
+
 
 ifdef MOUSE
 p_rssi_signal:
@@ -99,9 +1033,7 @@
 	arg mem_sp_state,contw
 	arg 12,loopcnt
 	call clear_mem
-ifdef BLE
 	call p_mouse_le_txbuff_load
-endif	
 	call rfcomm_init
 	call init_lmp
 	ncall lpm_disable_exen_output,wake
@@ -116,6 +1048,7 @@
 	call ssp_disable
 ifdef SECURE_CONNECTION
 	call publickey_init
+
 endif
 endif
 	call lpm_recover_clk,wake
@@ -134,20 +1067,21 @@
 	store 2,mem_lmp_version+3
 	branch init_param+12
 
+p_lpm_dispatch_next2:
+	fetch 1,mem_mouse_wheel_trigger
+	nrtn blank
+	branch lpm_dispatch_next2
+
 p_lpm_check_wake_lock:
 	rtnmark1 mark_24g
 	fetch 1,mem_mouse_clear_sensor_data_flag
-	branch disable_blank,blank
+	beq 0,disable_blank
 	fetch 1,mem_mouse_le_conn_param_reject
 	beq LE_LPM_DISABLE,disable_blank
 	fetch 2,mem_sdp_remote_cid
 	nbranch disable_blank,blank
-	fetch 1,mem_mouse_wheel_trigger
-	nbranch disable_blank,blank
 	branch enable_blank
 
-
-ifdef G24
 p_g24_dispatch:
 	rtnmark0 mark_24g
 	fetch 1,mem_24g_transmit_by_interrupt
@@ -161,16 +1095,19 @@
 	fetch 1,mem_24g_pairing_sm
 	rtnne STATE_24G_PAIRING_SUCCESS
 	call power_ctrl_start
-p_g24_short_sleep:	
-	call p_g24_lpm_wait
-	nrtn user
+p_g24_short_sleep:
+	fetch 1,mem_24g_transmit_by_interrupt
+	rtneq G24_TX_TIMER_INT_ENABLE
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	rtn blank
+	fetch 1,mem_lpm_mode
+	rtn blank
+	call p_mouse_setgpio_lpm
 	call p_clear_wake
 	setarg 60500
-p_g24_enter_sleep:	
-	call clk2lpo
-	storet 4,mem_sleep_counter
-  	branch lpm_sleep
-  	
+	branch lpm_dispatch_sleep
+	
 p_g24_transmit_by_interrupt:
 	call p_g24_timer_check
 	nrtn user
@@ -187,13 +1124,13 @@
 p_g24_interval_min:
 	jam 0,mem_24g_pac_index
 	fetch 1,mem_24g_interval_min
-p_g24_current_interval_store:
 	store 1,mem_24g_interval
 	rtn
 p_g24_interval_max:
 	fetch 1,mem_24g_interval_max
-	branch p_g24_current_interval_store
-p_g24_interval_calibrate:
+	store 1,mem_24g_interval
+	rtn	
+p_g24_interval_calibrate:
 	fetch 1,mem_24g_pac_index
 	increase 1,pdata
 	store 1,mem_24g_pac_index
@@ -209,21 +1146,16 @@
 	fetch 1,mem_24g_abort_pac
 	call p_g24_send_abort_packet,blank
 p_g24_long_sleep:
-	call p_g24_lpm_wait
-	nrtn user
-	fetch 3,mem_24g_enter_hibernate
-  	branch p_g24_enter_sleep
-	
-p_g24_lpm_wait:
-	enable user
 	call lpo_calibration
 	fetch 3,mem_clks_per_lpo
-	branch disable_user,blank
+	rtn blank
 	fetch 1,mem_lpm_mode
-	branch disable_user,blank
-	fetch 1,mem_24g_transmit_by_interrupt
-	beq G24_TX_TIMER_INT_ENABLE,disable_user
-	branch p_mouse_setgpio_lpm
+	rtn blank
+	call p_mouse_setgpio_lpm
+	fetch 8,mem_24g_enter_hibernate
+	call clk2lpo
+	storet 4,mem_sleep_counter
+  	branch lpm_sleep
 
 p_g24_send_abort_packet:
 	jam 1,mem_24g_abort_pac
@@ -238,2922 +1170,2757 @@
 	fetch 1,mem_24g_data_type
 	set1 bit_abort,pdata
 	store 1,mem_24g_data_type
+	call p_g24_transmit_prep
 	call p_g24_txdata_enable_tx
 	branch p_g24_transmit_start
 
-p_g24_set_device_addr:
-//	call adc_init_data
-//	fetch 4,mem_2v_adc_vinlpm_data	//adc data from otp
-//	store 4,mem_24g_device_addr	
-//	nrtn blank
-	fetch 4,mem_lap
-	store 4,mem_24g_device_addr
-	rtn
 
-p_g24_transmit_rf_sta_init:
-	jam 1,mem_24g_rf_last_sta
-	jam 0,mem_24g_sync_cnt
-p_g24_transmit_rf_ctrl_clear:	
-	fetch 1,mem_24g_data_type
-	and_into bits_data,pdata
-	store 1,mem_24g_data_type
-	rtn
-	
-p_g24_hop_ch_enable:
-	fetch 1,mem_24g_data_type
-	set1 bit_hop,pdata
-	store 1,mem_24g_data_type
-	//update txpayload
-	store 1,mem_24g_txpayload
+p_mouse_before_lpm:
+	rtnmark1 mark_24g
+	call p_mouse_le_txbuff_save
+	call p_mouse_setgpio_lpm
+	fetch 1,mem_context
+	bbit0 state_inconn,p_clear_wake
+	fetch 1,mem_lpm_current_mult
+	nrtn blank
+p_clear_wake:
+	setarg 0
+	store 8,mem_gpio_wakeup_low
 	rtn
-p_g24_hop_ch_disable:
-	fetch 1,mem_24g_data_type
-	set0 bit_hop,pdata
-	store 1,mem_24g_data_type
-	rtn	
 
-p_g24_transmit_hop_pac_fail:
-	call power_ctrl_pac_succ_decrs
-	fetch 1,mem_24g_rf_work_stage
-	beq 1,p_g24_transmit_hop_pac_fail_wo_hop
-	beq 2,p_g24_transmit_hop_pac_fail_hop_stage2
+p_mouse_setgpio_lpm:
+	call p_mouse_set_sdio_high
+	call p_clear_wake
+	call mouse_lpm_before_common
+	hfetch 4,core_gpio_oe0
+	hfetcht 4,core_gpio_pu0
+	ior temp,temp
+	invert temp,temp
+	hstoret 4,core_gpio_pd0
 	rtn
-p_g24_transmit_hop_pac_fail_wo_hop:
-	jam 2,mem_24g_sync_cnt
-p_g24_transmit_hop_pac_fail_stage1:	
-	jam 0,mem_24g_hop_pac_retry
-	jam 0,mem_24g_rf_last_sta
-	branch p_g24_transmit_rf_ctrl_clear
 
-p_g24_transmit_hop_pac_fail_hop_stage2:
-	jam 0,mem_24g_rf_hop_ch
-	branch p_g24_transmit_hop_pac_fail_stage1
+p_mouse_set_sdio_high:
+	fetch 1,mem_mouse_init_sensor_reset_flag
+	rtn blank
+	branch p_mouse_seting_dpi+1	// make sdio high to make 100uA less	
 
-	
-p_g24_transmit_pac_fail_hop_stage3:
-	fetch 2,mem_24g_txfail_cnt
-	increase 1,pdata
-	store 2,mem_24g_txfail_cnt
-	bbit1 10,p_g24_tx_attempt_fail	//1024ms * 8
-	fetch 1,mem_24g_rf_hop_ch
-	beq 1,p_g24_rf_hop_fastly
-	jam 1,mem_24g_rf_hop_ch
-p_g24_rf_hop_attemp_again:
-	fetch 1,mem_24g_rf_hop_ch
-	bne 1,p_g24_transmit_rf_ctrl_clear
-p_g24_rf_hop_fastly:
-	fetch 1,mem_24g_hop_fastly_cnt
-	increase 1,pdata
-	store 1,mem_24g_hop_fastly_cnt
-	beq 4,p_g24_rf_hop_fastly_exit
-	call p_g24_ch
-	jam 2,mem_24g_max_retry
-	branch p_g24_transmit_packet
+p_mouse_le_txbuff_save:
+	arg mem_le_tx_buffer0,contr
+	arg mem_le_tx_buffer0_omemalloc,contw
+	call p_mouse_le_txbuff_copy
+	arg mem_le_tx_buffer1,contr
+	arg mem_le_tx_buffer1_omemalloc,contw
+	call p_mouse_le_txbuff_copy
+	arg mem_le_tx_buffer2,contr
+	arg mem_le_tx_buffer2_omemalloc,contw
+	call p_mouse_le_txbuff_copy
+	arg mem_le_tx_buffer3,contr
+	arg mem_le_tx_buffer3_omemalloc,contw
+p_mouse_le_txbuff_copy:	
+	arg 27,loopcnt
+	branch memcpy
 
-p_g24_rf_hop_fastly_exit:
-	call power_ctrl_pac_succ_decrs
-	jam 0,mem_24g_hop_fastly_cnt
-	branch p_g24_transmit_rf_ctrl_clear
+p_mouse_le_txbuff_load:
+	arg mem_le_tx_buffer0_omemalloc,contr
+	arg mem_le_tx_buffer0,contw
+	call p_mouse_le_txbuff_copy
+	arg mem_le_tx_buffer1_omemalloc,contr
+	arg mem_le_tx_buffer1,contw
+	call p_mouse_le_txbuff_copy
+	arg mem_le_tx_buffer2_omemalloc,contr
+	arg mem_le_tx_buffer2,contw
+	call p_mouse_le_txbuff_copy
+	arg mem_le_tx_buffer3_omemalloc,contr
+	arg mem_le_tx_buffer3,contw
+	branch p_mouse_le_txbuff_copy
 
-p_g24_transmit_hop_pac_succ_wo_hop:
-	jam 2,mem_24g_sync_cnt
-p_g24_transmit_hop_pac_succ:
-	jam 1,mem_24g_rf_last_sta
-	jam 0,mem_24g_rf_hop_ch
-	branch p_g24_transmit_rf_ctrl_clear
+p_device_init:
+ifdef DEBUGLOG
+	call debuglog_init
+ifdef DEBUGLOG_STATUS
+	setarg DEBUGLOG_DTYPE_STATUS
+	store 2,mem_debuglog_datatype
+	setarg STATUS_LPM_WAKE
+	store 2,mem_debuglog_dataval
+	call debuglog_push	
+endif
+endif
+	call app_lpm_mult_enable
+	branch p_device_init_common,wake
+ifdef DEBUGLOG
+ifdef DEBUGLOG_STATUS
+	setarg DEBUGLOG_DTYPE_STATUS
+	store 2,mem_debuglog_datatype
+	setarg STATUS_CODE_WAKE
+	store 2,mem_debuglog_dataval
+	call debuglog_push
+endif
+endif
+	jam 0x20,core_gpio_pu0
 
-p_g24_transmit_succ_rf_config:
-	fetch 1,mem_24g_rf_work_stage
-	beq 3,p_g24_transmit_hop_pac_succ
-	fetch 1,mem_24g_data_type
-	isolate0 bit_hop,pdata
-	branch p_g24_transmit_rf_sta_init,true
-	fetch 1,mem_24g_rf_work_stage
-	beq 1,p_g24_transmit_hop_pac_succ_wo_hop
-	beq 2,p_g24_transmit_hop_pac_succ
-	rtn
+	call p_mouse_data_init
+	fetch 1,mem_tx_power
+	store 1,mem_tx_power_temp
+	call power_ctrl_pac_succ_cnt_init
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_combination_ui_button_count	//combination key timer init
+	call mouse_bt_discovery_button_down_disable
+p_device_init_common:
+	call p_mouse_init
+	branch enable_authrom
 
-p_g24_rf_sta_check:
-	fetch 1,mem_24g_pairing_sm
-	rtnne STATE_24G_PAIRING_SUCCESS
-	call p_g24_rf_laststa_synccnt_check
-	ncall p_g24_rf_sync_cnt_check,user2
-	rtn
+p_mouse_init:
+	ncall p_mouse_setting_config,wake
+	call p_mouse_spi_init
+	rtn wake
+ifdef RF_DEBUG
+	call test_gpio_init
+endif
+	call p_mouse_cb_fuction
+//	call mouse_check_key_gpio
+//	beq MOUSE_LM_BUTTON,p_mouse_24g_pairing_button
+	call p_mouse_wakeup_from_power
+	rtnmark1 mark_24g
+	branch p_mouse_check_reconn_target
 
-p_g24_rf_laststa_synccnt_check:
-	disable user2
-	fetch 1,mem_24g_rf_last_sta
-	rtnne 1
-	fetch 1,mem_24g_sync_cnt
-	rtnne 0
-	jam 1,mem_24g_rf_work_stage
-	jam 4,mem_24g_max_retry
-	branch enable_user2
+p_mouse_check_reconn_target:
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+	fetch 1,mem_xrecord_mode
+	beq REC_3_MODE,p_mouse3_0_check_reconn_target
+	beq REC_4_MODE,p_mouse4_0_check_reconn_target
+	//enter hibernate if it is in its factory state
+	branch p_mouse_null_enter_hibernate_enable
 
-p_g24_rf_sync_cnt_check:
-	fetch 1,mem_24g_sync_cnt
-	branch p_g24_rf_hop_attemp,blank
-	increase -1,pdata
-	store 1,mem_24g_sync_cnt
-	jam 2,mem_24g_rf_work_stage
-	jam 4,mem_24g_max_retry
-	branch p_g24_ch
+p_mouse3_0_check_reconn_target:
+	fetch 6,mem_hci_plap
+	branch app_bt_start_discovery_short,blank
+	branch mouse3_0_check_reconn_target+3
+	
+p_mouse4_0_check_reconn_target:
+	jam 1,mem_le_send_security_request_flag
+	jam 1,mem_mouse_le_reconnect_flag
+	fetch 2,mem_mouse_direct_timeout
+ifdef BLE_FAST_CONN_ENABLE
+	fetcht 1,mem_mouse_fast_conn_flag
+	sub temp,0xff,null
+	nbranch p_mouse4_0_check_reconn_target_next,zero
+	setarg 0x0258								//ble fast conn time 1min
+endif
+p_mouse4_0_check_reconn_target_next:
+	store 2,mem_mouse_direct_timer
+	call app_lpm_mult_disable
+	call p_le_check_adv_flag
+	setarg ADV_FLAG_BREDR_NOT_SUPPORTED
+	istore 1,contr
+	branch check_51cmd_adv
 
-p_g24_rf_hop_attemp:
-	jam 3,mem_24g_rf_work_stage
-	fetch 1,mem_24g_rf_hop_ch
-	nbranch p_g24_rf_hop_attemp_again,blank
-	jam 2,mem_24g_max_retry
-	branch p_g24_ch
+p_le_check_adv_flag:
+	arg mem_le_adv_data,rega
+p_le_check_adv_flag_loop:
+	ifetch 1,rega	//length
+	rtn blank
+	iadd contr,rega
+	ifetch 1,contr	//type
+	rtneq 0x01
+	branch p_le_check_adv_flag_loop
 
-p_g24_txdata_prep:
-	fetch 1,mem_24g_pairing_sm
-	bne STATE_24G_PAIRING_SUCCESS,p_g24_pairing_sm	
-p_g24_txdata_prep_packeage_data:
-	call p_g24_package_data
-p_g24_txdata_enable_tx:	
-	call p_g24_transmit_prep
-	jam ENSURE_ON_24G,mem_24g_ensure
-	rtn
+//p_mouse_24g_pairing_button:
+//	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+//	rtnbit0 MOUSE_ENABLE_24G
+//	rtnbit1 MOSUE_24G_PAIRING_FLAG
+//	rtnmark1 mark_24g
+//	call mouse_devce_led_off
+//	arg MOSUE_24G_PAIRING_FLAG,queue
+//	call mouse_enable_function_flag
+//	setarg 0
+//	store 2,mem_mouse_direct_timer
+//	store 1,mem_mouse_send_blank_timer
+//	store 2,mem_24g_check_dongle_times
+//	call mouse_stop_discovery
+//	branch p_g24_start_pairing_sm1
 
-p_g24_package_data:
-	fetch 2,mem_cb_24g_data
-	call callback_func
-	branch p_g24_accumulate_mouse_data,user
-	fetch 7,mem_24g_txbuf+1	//mouse data
-	rtn blank
-	branch enable_user	// retransmit
-p_g24_accumulate_mouse_data:
-	jam 0,mem_24g_abort_pac
-	add rega,1,pdata
-	store 1,mem_24g_datalen
-	call p_g24_transmit_rf_ctrl_clear
-	store 1,mem_24g_txbuf
-	ifetcht 1,contw
-	ifetch 1,regb
-	ior temp,pdata
-	istore 1,contw	//key
-	increase 1,regb
-	ifetch 4,regb
-	istore 4,contw	//x,y
-	increase 4,regb
-	arg mem_24g_txbuf+6,contw
-	arg 2,loopcnt
-p_g24_accumulation_loop:
-	ifetch 1,regb
-	ifetcht 1,contw	//wheel,twheel
-	iadd temp,pdata
-	istore 1,contw
-	increase 1,regb
-	loop p_g24_accumulation_loop
-	rtn
+p_mouse_dpi_config:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_EEPROM,mouse_dpi_config
+	fetch 1,mem_mouse_dpi
+	beq 0xff,mouse_dpi_config
+	branch mouse_seting_dpi+2
 
-p_g24_transmit_packet:
-	jam 0,mem_24g_retry
-p_g24_transmit_loop:
-	arg param_rx_setup,timeup
-	until clkn_rt,meet
-	call p_g24_transmit_receive_ack
-	fetch 1,mem_24g_no_ack	//tx noack
-	rtneq no_ack_24g
-	nbranch p_g24_retransmit,sync
-	nbranch p_g24_retransmit,user3
-	call p_g24_txbuf_clear
-	call p_g24_ackpayload_parse
-	call power_ctrl_pac_succ_incrs
-p_g24_transmit_next_packet:
-	fetch 1,mem_24g_pid
-	increase 1,pdata
-	store 1,mem_24g_pid
-	fetch 1,mem_24g_pairing_sm
-	bne STATE_24G_PAIRING_SUCCESS,p_g24_paring_mode_start
-	call p_g24_transmit_succ_rf_config
-p_g24_transmit_abandon:
-	setarg 0
-	store 2,mem_24g_txfail_cnt
-	store 1,mem_24g_get_ack_fail
-	store 1,mem_24g_hop_pac_retry
-	jam ENSURE_OFF_24G,mem_24g_ensure
-	rtn
+p_mouse_spi_init:
+	jam 0x76,mem_spi_init_clk
+	branch mouse_spi_init
+	
+p_mouse_init_sunt:
+	call p_mouse_spi_init
+	call mouse_spi_sdio_gpio_pollup
+	fetch 1,mem_config_sensor_type
+	beq P3610,mouse_init_3610sensor
+p_mouse_init_sensor:
+	call mouse_read_sensor_id
+	beq P32XX_ID1,p_mouse_init_p32xx_id2_judge
+	beq P3065_ID1,p_mouse_p3065_init_param
+	call mouse_twspi_reset
+	nop 1000
+	branch p_mouse_init_sensor
 
-p_g24_txbuf_clear:
-	arg 4,loopcnt
-	arg mem_24g_txbuf,contw
-	branch memset0
+p_mouse_init_sensor_reset:
+	jam 1,mem_mouse_init_sensor_reset_flag
+	call spi_ncs_enable
+	call p_mouse_init_sunt
+	branch spi_ncs_disable
 
-p_g24_paring_mode_start:
-	call power_ctrl_pac_succ_cnt_init
-	branch p_g24_paring_mode
+p_mouse_init_p32xx_id2_judge:
+	call p_mouse_sensor_poweron
+	branch mouse_init_p32xx_id2_judge
 
-p_g24_transmit_receive_ack:
-	disable user3
-	call p_g24_transmit
-	
-ifdef RF_DEBUG
-	call test_gpio_low
-endif
 
-	fetch 1,mem_24g_no_ack
-	beq no_ack_24g,p_g24_transmit_no_ack	//tx no ack
-	force 0,radio_ctrl
-	fetch 4,mem_24g_addr
-	iforce access
-	fetcht 1,mem_last_freq
-	call set_freq_rx
-	call rf_rx_enable
-	call p_g24_receive_rxon
-	call p_g24_end_of_packet,user3
+p_mouse_p3065_init_param:
+	call p_mouse_sensor_poweron
+	fetch 1,mem_sensor_id2
+	beq P3065_XY_ID2,mouse_p3065xy_init_param
+	jam P3065,mem_config_sensor_type
 	rtn
-p_g24_transmit_no_ack:
-	call p_g24_end_of_packet
-	branch p_g24_transmit_next_packet
 
-p_g24_retransmit:
-	fetch 1,mem_24g_get_ack_fail
-	increase 1,pdata
-	store 1,mem_24g_get_ack_fail
-	fetch 1,mem_24g_pairing_sm
-	bne STATE_24G_PAIRING_SUCCESS,p_g24_tx_paring_retry
-	fetcht 1,mem_24g_retry
-	increase 1,temp
-	storet 1,mem_24g_retry
-	fetch 1,mem_24g_max_retry
-	isub temp,pdata
-	nbranch p_g24_transmit_loop,blank
-	fetch 1,mem_24g_rf_work_stage
-	beq 3,p_g24_transmit_pac_fail_hop_stage3
-	fetch 1,mem_24g_hop_pac_retry
-	increase 1,pdata
-	store 1,mem_24g_hop_pac_retry
-	beq 2,p_g24_transmit_hop_pac_fail
-	call p_g24_hop_ch_enable
-	jam 1,mem_24g_max_retry
-	branch p_g24_transmit_packet
+p_mouse_sensor_poweron:
+	setarg 0x8006	// reset to factory settings
+	call twspi_write
+	nop 12000
+	branch p_mouse_dpi_config
+p_mouse_sensor_powerdown:
+	setarg 0x06
+	call twspi_read
+	or pdata,0x08,pdata
+	lshift8 pdata,pdata
+	add pdata,0x06,pdata
+	branch twspi_write	//make sdio high
 
-p_g24_tx_paring_retry:
-	fetch 1,mem_24g_get_ack_fail
-	rtnne 0xff
-	jam 0,mem_24g_get_ack_fail
-	branch p_g24_stop_g24_mode
+p_mouse_setting_config:
+	call p_g24_set_device_addr
+	//disable usb function
+	hfetch 1,core_usb_config
+	set0 4,pdata
+	hstore 1,core_usb_config
+	call mouse_gpio_init
+	call mouse_param_init
+	call p_mouse_bt_sdp_update
+	setarg 0
+	store 2,mem_lpm_interval	
+	call mouse_adc_init
+	call le_set_config_fixed_ltk
+	call le_set_justwork
+	call le_set_fixed_ltk
+	call le_set_config_read_authentication
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_EEPROM,p_mouse_init_iic
+//	bbit1 MOUSE_ENABLE_FLASH,p_mouse_load_flash_info_cheak
+	rtn
 
-p_g24_tx_attempt_fail:
+p_mouse_init_iic:
+	call iic_init_390k
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	isolate1 MOUSE_ENABLE_2K_EEPROM,pdata
+	ncall clear_eeprom_size_2k,true
+	call mouse_load_eeprom_dpi
+	call p_mouse_init_environment
+	call p_mouse_set_24g_addr_eeprom
+	call iicd_read_eep_data
+ifdef BLE_FAST_CONN_ENABLE
+	call p_mouse_load_fast_conn_flag
+	fetch 1,mem_mouse_fast_conn_flag
+	beq 0xff,p_mouse_fast_conn_init
+endif
+	rtn
+
+ifdef BLE_FAST_CONN_ENABLE
+p_mouse_load_fast_conn_flag:
+	arg 1,temp
+	arg mem_mouse_fast_conn_flag,rega
+	arg MOUSE_FAST_CONN_FLAG_OFFSET,regb
+	branch iicd_read_eep_data
+p_mouse_store_fast_conn_flag:
+	arg 1,temp
+	arg mem_mouse_fast_conn_flag,rega
+	arg MOUSE_FAST_CONN_FLAG_OFFSET,regb
+	branch iicd_write_protect_eep_data
+p_mouse_fast_conn_init:
+	jam 0x34,mem_xrecord_mode
 	setarg 0
-	store 2,mem_24g_txfail_cnt
-p_g24_stop_g24_mode:
-	jam BT_EVT_24G_ATTEMPT_FAIL,mem_fifo_temp
-	branch ui_ipc_send_event
+	invert pdata,pdata
+	store 6,mem_le_lap
+	rtn	
+endif
 
-p_g24_ackpayload_parse:
-	call p_g24_read_len_pid_crc
-	fetch 1,mem_24g_rxdata_length	//ack payload length 
-	rtn blank
-	iforce loopcnt
-	arg mem_24g_rxbuf+2,contr
-	arg mem_24g_rxpayload,contw	//ack payload buffer 
-	branch memcpy
+p_mouse_bt_sdp_update:
+	call enable_authrom
+	arg 0x8c00,contr
+	arg mem_mouse_uuid_list,contw
+	arg 369,loopcnt
+	call memcpy
+	//Attribute: HID SSR Host Max Latency
+	setarg 0x0f0209
+	istore 3,contw
+	setarg 0x120009
+	istore 3,contw
+	//Attribute: HID SSR Host Min Timeout
+	setarg 0x100209
+	istore 3,contw
+	setarg 0x000009
+	istore 3,contw
+	arg 0x8d71,contr
+	arg 265,loopcnt
+	call memcpy
+	
+	jam 0,mem_mouse_uuid_list+23	//Service Record Handle: 0x 00 01 00 00
+	jam 0x6d,mem_mouse_uuid_list+15	//total length
+	setarg 0x401f
+	store 2,mem_mouse_uuid_list+357	//timeout
+	setarg 0x6d04
+	store 2,mem_mouse_uuid_list+462	//VID
+	setarg 0x16b0
+	store 2,mem_mouse_uuid_list+468	//PID
 
-p_g24_start_pairing_sm1:
-	set1 mark_24g,mark
-	call p_g24_pair_init
-p_g24_set_pairing_sm_1:
-	jam STATE_24G_PAIRING_1,mem_24g_pairing_sm
+	setarg mem_mouse_uuid_list				//bt sdp start address
+	store 2,mem_ui_uuid_table
 	rtn
 
-p_g24_pair_init:
-	jam TX_POWER_PAIR,mem_tx_power
-	jam 0,mem_24g_pid
-	jam G24_PAIR_CH,mem_24g_ch
-	fetch 4,mem_24g_paring_addr
-	branch p_g24_update_addr_and_synccrc8
-
-p_g24_pairing_sm:
-	fetch 1,mem_24g_ensure
-	beq ENSURE_ON_24G,enable_user
-	fetch 1,mem_24g_pairing_sm
-	beq STATE_24G_PAIRING_1,p_g24_pairing_sm_1
-	beq STATE_24G_PAIRING_2,p_g24_pairing_sm_2
-	beq STATE_24G_PAIRING_3,p_g24_pairing_sm_3
-	branch assert
-
-p_g24_pairing_sm_1:
-	jam STATE_24G_PAIRING_1_WAITING_ACK,mem_24g_pairing_sm
-	jam 0xaa,mem_24g_common_temp
-	branch p_g24_pairing_sm_common
-p_g24_pairing_sm_2:
-	jam STATE_24G_PAIRING_2_WAITING_ACK,mem_24g_pairing_sm
-	jam 0x55,mem_24g_common_temp
-	branch p_g24_pairing_sm_common
-p_g24_pairing_sm_3:
-	jam STATE_24G_PAIRING_3_WAITING_ACK,mem_24g_pairing_sm
-	jam 0x22,mem_24g_common_temp
-p_g24_pairing_sm_common:
-	fetch 1,mem_24g_data_type
-	and_into bits_data,pdata
-	store 1,mem_24g_common_temp+1
-	fetch 4,mem_24g_device_addr
-	store 4,mem_24g_common_temp+2
-p_g24_put_pairing_data_in_buff:
-	jam 0,mem_24g_common_temp+6
-	arg mem_24g_common_temp,rega
-	arg 7,temp
-	call p_g24_put_data_in_buff
-	call p_g24_txdata_enable_tx
-	branch enable_user
+p_mouse_init_environment:
+	call app_initflag_check
+	branch mouse_eeprom_load_recon_info,zero
+	call p_le_addr_random_config
+	branch mouse_init_environment+2
 
-p_g24_paring_mode:
-	fetch 1,mem_24g_pairing_sm
-	rtneq STATE_24G_PAIRING_SUCCESS
-	beq STATE_24G_PAIRING_1_WAITING_ACK,p_g24_pairing_sm_1_waiting_ack
-	beq STATE_24G_PAIRING_2_WAITING_ACK,p_g24_pairing_sm_2_waiting_ack
-	beq STATE_24G_PAIRING_3_WAITING_ACK,p_g24_pairing_sm_3_waiting_ack
-	rtn
+p_app_flag_store:
+	arg 2,temp
+	arg mem_timeup,rega
+	arg MOUSE_EEPROM_MODULE_INIT_FLAG,regb
+	branch iicd_write_eep_data
 
+p_app_initflag_check:
+	arg 2,temp
+	arg mem_pdatatemp,rega
+	arg MOUSE_EEPROM_MODULE_INIT_FLAG,regb
+	branch app_initflag_check+4
 
-p_g24_pairing_sm_1_waiting_ack:
-	jam STATE_24G_PAIRING_2,mem_24g_pairing_sm
-	branch p_g24_transmit_abandon
-p_g24_pairing_sm_2_waiting_ack:
-	jam STATE_24G_PAIRING_3,mem_24g_pairing_sm
-	branch p_g24_transmit_abandon
-p_g24_pairing_sm_3_waiting_ack:
-	jam STATE_24G_PAIRING_SUCCESS,mem_24g_pairing_sm
-	jam BT_EVT_24G_PAIRING_COMPLETE,mem_fifo_temp
-	call ui_ipc_send_event	
-	fetch 4,mem_24g_rxpayload+2
-	call p_g24_update_addr_and_synccrc8
-	branch p_g24_transmit_abandon
+/*
+p_mouse_load_flash_info_cheak:
+	call mouse_load_flash_flag
+	fetch 2,mem_store_flag
+	arg EEPROM_INIT_FLAG,temp
+	isub temp,null
+	branch p_mouse_load_flash_device_info,zero
+	storet 2,mem_store_flag
+	call mouse_ble_init_address
+	branch mouse_store_flash_device_info
+
+p_mouse_load_flash_device_info:
+	setarg mem_mouse_information_end
+	arg mem_mouse_information_start,temp
+	isub temp,temp
+	fetch 3,mem_flash_base
+	arg mem_mouse_information_start,rega
+	call spid_read_flash
+	call mouse_select_reconn_device
+	fetch 4,mem_mouse_24g_addr
+	store 4,mem_24g_addr
+	rtn
+*/
 
-p_g24_start_24g_mode:
-	set0 mark_24g,mark
-	call p_g24_ch_syncword_crc8_init
-	fetch 1,mem_24g_pairing_sm
-	rtnne STATE_24G_PAIRING_SUCCESS
-	call p_g24_tx_attemp_data_prep
-p_g24_tx_attemp_dongle:
-	setarg 0
-	store 2,mem_24g_check_dongle_times
-p_g24_tx_attemp_dongle_loop:
-	call lpo_calibration
-	nop 2000
-	fetch 1,mem_24g_check_dongle_times
-	beq 0xff,p_g24_stop_g24_mode
-	call p_g24_transmit_receive_ack
-	nbranch p_g24_attemp_txdata_retry,sync
-	nbranch p_g24_attemp_txdata_retry,user3
-p_g24_tx_attemp_dongle_succ:
-	set1 mark_24g,mark
-	setarg 0
-	store 2,mem_24g_check_dongle_times
-	jam BT_EVT_24G_ATTEMPT_SUCCESS,mem_fifo_temp
-	call ui_ipc_send_event
-	call p_g24_txbuf_clear
-	branch p_g24_transmit_by_interrupt_enable
 
-p_g24_tx_attemp_data_prep:
-	jam 0xff,mem_24g_common_temp
-	fetch 1,mem_24g_data_type
-	store 1,mem_24g_common_temp+1
-	fetch 4,mem_24g_device_addr
-	store 4,mem_24g_common_temp+2
-	arg 6,temp
-	arg mem_24g_common_temp,rega
-	call p_g24_put_data_in_buff
-	branch p_g24_transmit_prep
-	
-p_g24_attemp_txdata_retry:
-	fetch 2,mem_24g_check_dongle_times
-	increase 1,pdata
-	store 2,mem_24g_check_dongle_times
-	call p_g24_ch
-	branch p_g24_tx_attemp_dongle_loop
+p_mouse_wakeup_from_power:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_WAKEUP_FROM_POWER,p_mouse_wakeup_no_from_power
+	fetch 1,mem_wakup_from_power_flag
+	isolate0 gpio_latch,pdata
+	nbranch p_mouse_wakeup_no_from_power,true
+	call p_mouse_init_sunt
+	call p_mouse_sensor_powerdown
+p_mouse_wakeup_no_from_power:
+	fetch 1,mem_reconn_times_init
+	store 1,mem_reconn_times
+	fetch 1,mem_config_function_enable
+	rtnbit1 ENABLE_SELECT_DEVICE_BY_GPIO_BUTTON
+	rtnbit1 ENABLE_SELECT_DEVICE_BY_SWITCH
+p_mouse_start_24g_mode:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G
+	call p_g24_factory_check
+	branch p_g24_auto_pair_start,user
+	branch p_g24_start_24g_mode
 
-p_g24_auto_pair_start:
-	set0 mark_24g,mark
-	call p_g24_auto_pair_all_powerful
-	call p_g24_tx_attemp_data_prep
-p_g24_auto_pair_restart:
-	jam 0,mem_24g_check_dongle_times
-p_g24_auto_pair_start_loop:
-	call lpo_calibration
-	nop 2000
-	fetch 1,mem_24g_check_dongle_times
-	beq 0xff,p_g24_stop_g24_mode
-	call p_g24_transmit_receive_ack
-	nbranch p_g24_auto_pair_retry,sync
-	nbranch p_g24_auto_pair_retry,user3
-	call p_g24_ackpayload_parse
-	call p_mouse_tx_power_init
-	fetch 4,mem_24g_addr
-	fetcht 4,mem_24g_paring_addr
+p_g24_factory_check:
+	arg 2,loopcnt
+	arg mem_24g_addr,contr
+p_pdata_0xff_check:
+	call enable_user
+	setarg 0xffff
+p_pdata_0xff_check_loop:
+	ifetcht 2,contr
 	isub temp,null
-	branch p_g24_start_pairing_sm1,zero
-	branch p_g24_tx_attemp_dongle_succ
+	ncall disable_user,zero
+	loop p_pdata_0xff_check_loop
+	rtn
 
-p_g24_auto_pair_retry:
-	fetch 1,mem_24g_check_dongle_times
-	increase 1,pdata
-	store 1,mem_24g_check_dongle_times
-	fetch 1,mem_24g_auto_paring_switch
-	increase 1,pdata
-	and_into 1,pdata
-	store 1,mem_24g_auto_paring_switch
-	beq 0,p_g24_auto_pair_device_attemp
-	beq 1,p_g24_auto_pair_pair_attemp
+p_mouse_cb_fuction:
+	setarg p_mouse_g24_package_data
+	store 2,mem_cb_24g_data
+ifdef BLE
+	setarg p_mouse_le
+	store 2,mem_cb_le_process
+	setarg p_le_mouse_bb_event_connect_complete
+	store 2,mem_cb_att_write
+endif	
+	setarg p_mouse_bt
+	store 2,mem_cb_bt_process
+	setarg p_mouse_before_lpm
+	store 2,mem_cb_before_lpm
+	setarg p_mouse_priority_bb_event
+	store 2,mem_cb_bb_event_process
+	setarg p_mouse_idle
+	store 2,mem_cb_idle_process
+	setarg p_mouse_before_hibernate
+	store 2,mem_cb_before_hibernate
+	setarg p_mouse_bb_event_timer
+	store 2,mem_cb_event_timer
+	setarg mouse_spi_write_flash_cb
+	store 2,mem_cb_spi_flash_write_complate
 	rtn
+
+p_mouse_g24_package_data:
+	call mouse_g24_package_data
+	fetch 2,mem_mouse_z
+	rtn blank
+	branch p_g24_transmit_by_interrupt_enable
 	
-p_g24_auto_pair_all_powerful:
-	jam TX_POWER_PAIR,mem_tx_power
-	setarg 0x0f0f
-	store 2,mem_24g_addr
-	istore 2,contw
-p_g24_ch_syncword_crc8_init:	
-	call p_g24_syncword_crc8
-	branch p_g24_ch
+ifdef BLE	
+p_mouse_le:
+	call le_fifo_check_nearly_full
+	nrtn blank
+ifdef BLE_FAST_CONN_ENABLE
+	fetch 1,mem_mouse_fast_conn_flag
+	beq 0xff,p_mouse_le_next
+endif
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtnne 0x03
+p_mouse_le_next:
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	call p_mouse_clear_sensor_data,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+//	bbit1 MOSUE_24G_PAIRING_FLAG,mouse_le_send_empty_packet
+//	bbit1 MOUSE_SELECT_DEVICE_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_le_send_empty_packet
+	call mouse_motion
+	nrtn user
+	fetch 2,mem_mouse_z
+	ncall p_mouse_wheel_trigger,blank
+	branch p_mouse_data_push
+endif
 
-p_g24_auto_pair_device_attemp:
-	call p_g24_auto_pair_all_powerful
-	branch p_g24_auto_pair_start_loop
+p_mouse_wheel_trigger:
+	jam 1,mem_mouse_wheel_trigger
+	jam 2,mem_mouse_wheel_trigger_timer
+	rtn
 
-p_g24_auto_pair_pair_attemp:
-	call p_g24_pair_init
-	branch p_g24_auto_pair_start_loop
+p_mouse_bt:
+	rtn attempt
+	fetch 1,mem_app_handshake_flag
+	rtn blank
+	call l2cap_malloc_is_fifo_nearly_full
+	nrtn blank
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	call p_mouse_clear_sensor_data,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+//	bbit1 MOSUE_24G_PAIRING_FLAG,mouse_send_empty_data
+//	bbit1 MOUSE_SELECT_DEVICE_FLAG,mouse_send_empty_data
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_send_empty_data
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,mouse_send_empty_data
+	call mouse_motion
+	nrtn user
+	fetch 2,mem_mouse_z
+	ncall p_mouse_wheel_trigger,blank
+	branch mouse_send_data
+	
+p_mouse_clear_sensor_data:
+	call le_set_config_more_data
+	jam 1,mem_mouse_clear_sensor_data_flag
+	branch p_mouse_sensor_poweron
 
-p_g24_check_51cmd_stop_24g:
-	set0 mark_24g,mark
-	call le_disable
-p_mouse_disable_g24_pairing_flag:
+p_mouse_idle:
+//	call p_mouse_24g_pairing_button
+	call ui_check_paring_button
+	call mouse_dpi_cheak
+	branch mouse_wheel_check
+/*
+//pc bind api
+p_mouse_24g_pairing_button:
+	fetch 2,mem_24g_pairing_timer_count
+	rtn blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G
+	rtnbit1 MOSUE_24G_PAIRING_FLAG
+	rtnmark1 mark_24g
+	call mouse_check_key_gpio
+	rtnne MOUSE_LMR_BUTTON
+	call mouse_devce_led_off
 	arg MOSUE_24G_PAIRING_FLAG,queue
-	branch mouse_disable_function_flag
+	call mouse_enable_function_flag
+	setarg 0
+	store 2,mem_mouse_direct_timer
+	store 1,mem_mouse_send_blank_timer
+	store 2,mem_24g_check_dongle_times
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_RECONNECT,mouse_cancel_reconnect
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+	bbit1 UI_STATE_BT_CONNECTED,app_bt_disconnect
+	call mouse_stop_discovery
+	branch p_g24_start_pairing_sm1
+*/
+p_mouse_priority_bb_event:
+	copy regc,pdata
+ifdef BLE	
+	beq BT_EVT_LE_CONNECTED,p_mouse_le_bb_event_connected
+	beq BT_EVT_LE_DISCONNECTED,p_mouse_le_bb_disconnected
+	beq BT_EVT_LE_ENC_INFO,p_mouse_le_enc_info
+	beq BT_EVT_LE_START_ENC,p_mouse_le_ll_start_encryt
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,p_mouse_le_conn_param_update_rsp_recieved
+endif
+ifdef CLASSIC_BT
+	beq BT_EVT_RECONN_FAILED,p_mouse_bb_event_reconn_failed
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,p_mouse_bb_event_reconn_timeout
+	beq BT_EVT_VIRTUAL_CABLE_UNPLUG,p_mouse_irtual_cable_unplug
+	beq BT_EVT_SWITCH_NOT_ACCEPT,app_bt_role_switch	
+	beq BT_EVT_SNIFF_NOT_ACCEPT,p_mouse_sniff_not_accept
+	beq BT_EVT_BB_CONNECTED,p_mouse_bb_event_connected
+	beq BT_EVT_BB_DISCONNECTED,p_mouse_bb_event_disconnected
+	beq BT_EVT_SWITCH_SUCCESS_MASTER,p_mouse_enter_sniff_check
+	beq BT_EVT_HID_HANDSHAKE,p_mouse_bt_hid_handshake
+endif
+	beq BT_EVT_24G_PAIRING_COMPLETE,p_mouse_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_FAIL,p_mouse_24g_attempt_fail
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,p_mouse_24g_attempt_success
+	branch mouse_priority_bb_event+1
 
-p_g24_put_data_in_buff:
-	storet 1,mem_24g_datalen
-	copy temp,loopcnt
-	arg mem_24g_txbuf,contw
-	copy rega,contr
-	branch memcpy
+ifdef BLE
+p_mouse_le_bb_event_connected:
+	jam 1,mem_mouse_le_bb_connected_flag
+	fetch 1,mem_mouse_le_reconnect_flag
+	nbranch p_mouse_le_bb_event_connected_next,blank
+	jam 0x14,mem_mouse_send_secutiry_request_timer
+p_mouse_le_bb_event_connected_next:
+	call p_mouse_init_sensor_reset
+	call p_mouse_data_init
+	branch mouse_le_bb_event_connected
 
-p_g24_read_len_pid_crc:
-//read control
-	fetch 1,mem_24g_rxbuf+1
-	rshift3 pdata,pdata
-	store 1,mem_24g_rxdata_length
-//get crc
-	increase 1,pdata
-	arg mem_24g_rxbuf+1,contr
-	iadd contr,contr
-	ifetch 3,contr
-	store 3,mem_24g_sta_crc
-//read pid
-	fetch 1,mem_24g_rxbuf+1
-	rshift pdata,pdata
-	and pdata,0x03,pdata
-	store 1,mem_24g_sta_pid
-	rtn
+p_mouse_le_bb_disconnected:
+	jam 0,mem_mouse_le_bb_connected_flag
+	call p_mouse_sensor_powerdown_check
+	setarg LE_INTERVAL_8_75MS
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+	jam 0,mem_mouse_clear_sensor_data_flag
+	call p_mouse_data_init
+	call le_clr_config_more_data
+	branch mouse_bb_disconnected
 
-p_g24_update_addr_and_synccrc8:	
-	store 4,mem_24g_addr
-//output: 1BYTE crc8
-p_g24_syncword_crc8:
-	arg 0,rega
-	arg 4,loopcnt
-	arg mem_24g_addr,contr
-p_g24_syncword_crc8_loop:
-	ifetch 1,contr
-	iadd rega,rega
-	loop p_g24_syncword_crc8_loop
-	copy rega,pdata
-	store 2,mem_24g_syncword
-	fetch 1,mem_24g_syncword
-	fetcht 1,mem_24g_syncword+1
-	iadd temp,pdata
-	store 1,mem_24g_syncword_crc8
-	rtn
+p_mouse_le_enc_info:
+p_app_updata_le_param:
+	jam BT_CMD_LE_UPDATE_CONN,mem_fifo_temp
+	branch ui_ipc_send_cmd
 
-p_g24_transmit_prep:
-ifdef P24G_LOG
-	fetch 1,mem_24g_paccnt
-	increase 1,pdata
-	store 1,mem_24g_paccnt
-endif
+p_mouse_le_ll_start_encryt:
+	fetch 1,mem_mouse_le_reconnect_flag
+	beq 1,p_mouse_le_ll_reconn_start_encryt
+	branch p_mouse_le_ll_enable_start_enc_flag
 
-// total length
-	fetch 1,mem_24g_datalen
-	increase 2,pdata
-	store 1,mem_24g_txlen
-// data type
-	fetch 1,mem_24g_data_type
-	store 1,mem_24g_txpayload
-//prepare 5bit payload length, 2bit PID, 1bit NO_ACK
-	fetch 1,mem_24g_datalen
-	lshift3 pdata,pdata
-	fetcht 1,mem_24g_pid
-	and temp,0x03,temp
-	lshift temp,temp
-	ior temp,pdata
-	fetcht 1,mem_24g_no_ack
-	iadd temp,pdata
-	istore 1,contw
-//prepare payload data
-	fetch 1,mem_24g_datalen
-	iforce loopcnt
-	arg mem_24g_txbuf,contr
-	branch memcpy
+p_mouse_le_ll_reconn_start_encryt:
+	call p_app_updata_le_param
+	jam 20,mem_le_start_encrypt_timer
+p_mouse_le_ll_enable_start_enc_flag:
+	arg LL_START_ENC_FLAG,queue
+	branch mouse_le_enable_connect_flag
 
-p_g24_ch:
-	fetcht 1,mem_24g_current_ch_number
-	call p_g24_ch_map_size
-	storet 1,mem_24g_current_ch_number
-	rtn
+p_mouse_le_conn_param_update_rsp_recieved:
+	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	rtneq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+	fetch 1,mem_le_tsniff
+	rshift2 pdata,pdata
+	sub pdata,LE_INTERVAL_15MS,null
+	rtn positive
+	setarg LE_INTERVAL_11_25MS
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	call p_app_updata_le_param
+	branch p_mouse_le_conn_param_lpm_disable
+endif
 
-p_g24_ch_map_size:
-	call p_g24_ch_calc
-	increase 1,temp
-	and_into 3,temp //map size =4
-	rtn
-	
-p_g24_ch_calc:
-	fetch 1,mem_24g_addr	
-	and_into 0x03,pdata
-	mul32 pdata,4,rega			//24addr low bit0 bit1 ,00-map1,01-map2,10-map3,11-map4
-	setarg mem_24g_ch_map1
-	iadd rega,pdata
-	iadd temp,contr
-	ifetch 1,contr
-	store 1,mem_24g_ch
-	rtn
 
-p_g24_prep:
-	disable enable_crc
-	disable enable_white
-	setarg 0x555555
-	iforce crc24_init
-	fetch 1,mem_24g_ch
-	reverse pdata,temp
-	set1 1,temp
-	rshift temp,white_init
-	rtn
+ifdef CLASSIC_BT
+p_mouse_bb_event_reconn_timeout:
+p_mouse_bb_event_reconn_failed:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	rtnbit1 UI_STATE_BT_DISCOVERY
+	rtnbit1 UI_STATE_BLE_ADV
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
+//	bbit1 MOUSE_SELECT_DEVICE_FLAG,mouse_soft_reset
+//	bbit1 MOSUE_24G_PAIRING_FLAG,p_g24_start_pairing_sm1
+	branch app_bb_hibernate
 
-p_g24_receive_packet:
-	call le_enable
-	fetch 4,mem_24g_addr
-	iforce access
-	call set_sync_on
-	fetcht 1,mem_24g_ch
-	call set_freq_rx
-	setarg param_pll_setup
-	call sleep
-	call rf_rx_enable
-p_g24_receive_rxon:
+p_mouse_irtual_cable_unplug:
+	call mouse_irtual_cable_unplug
+	branch app_bb_hibernate
 
-ifdef RF_DEBUG
-	call test_h_l_h
-endif
+p_mouse_sniff_not_accept:
+	fetch 1,mem_mouse_enter_sniff_count
+	rtneq 2
+	increase 1,pdata
+	store 1,mem_mouse_enter_sniff_count
+	jam 0x12,mem_sniff_param_interval	//89Hz
+	branch app_bt_enter_sniff
 
-	call p_g24_prep
-	disable user3
-	enable decode_fec0
-	enable is_rx
-	disable is_tx
-	enable swfine
-	fetch 2,mem_24g_rx_window
-	iforce stop_watch
-	correlate null,timeout
-	nbranch p_g24_sync_timeout,sync
+p_mouse_bb_event_connected:
+	jam 0,mem_mouse_send_switch_req_timer
+	branch mouse_stop_discovery
 
-ifdef RF_DEBUG
-	call test_gpio_low
-	call test_gpio_high
-endif
+p_mouse_bb_event_disconnected:
+	call p_mouse_sensor_powerdown_check
+	branch mouse_bb_disconnected
 
-	disable decode_fec0
-	enable decode_fec1
-	enable enable_white
-	enable enable_crc
-	call p_g24_receive_byte
-	store 1,mem_24g_get_syncword_crc8
-	fetcht 1,mem_24g_syncword_crc8
-	isub temp,null
-	nbranch p_g24_end_of_packet,zero
-	call p_g24_receive_byte
-	store 1,mem_24g_rxbuf	//device id
-	fetch 1,mem_24g_mode
-	sub pdata,rx_24g,null
-	branch p_g24_receive_skip,zero
-	fetch 1,mem_24g_rxbuf
-	fetcht 1,mem_24g_data_type
-	icompare bits_data,temp
-	nbranch p_g24_end_of_packet,true
-p_g24_receive_skip:
-	call p_g24_receive_byte
-	istore 1,contw
-	rshift3 pdata,pdata
-	and pdata,0x1f,loopcnt	//max payload: 32bytes
-	branch p_g24rx_nopayload,zero
-p_g24rx_loop:
-	call p_g24_receive_byte
-	istore 1,contw
-	loop p_g24rx_loop
-p_g24rx_nopayload:
-ifdef MOUSE
-	//receive rssi hex
-	copy contw,rega
-	call p_g24_receive_byte
-	store 1,mem_rssi_hex_received
-	copy rega,contw
-endif
-	parse demod,bucket,24
-	enable swfine
-	arg param_sifs,stop_watch	
-	rshift32 pdata,pdata
-	rshift16 pdata,pdata
-	istore 3,contw
-	disable decode_fec1
-ifdef DONGLE
-	call save_rssi
-endif	
-	branch p_g24_end_of_packet,crc_failed
+p_mouse_enter_sniff_check:
+	fetch 1,mem_mouse_enter_sniff_count
+	rtnne 2
+	jam 0,mem_mouse_enter_sniff_count
+	jam 0x0e,mem_sniff_param_interval	//89Hz
+	branch app_bt_enter_sniff
 
-ifdef RF_DEBUG
-	call test_gpio_low
-	call test_gpio_high
+p_mouse_bt_hid_handshake:
+	call p_mouse_init_sensor_reset
+	branch mouse_bt_hid_handshake
+	
 endif
 
-	enable user3
-	fetch 1,mem_last_freq
-	add pdata,0,rega
-	call rf_write_freq
-	disable decode_fec0
-	call set_sync_on
-ifdef DONGLE
-	rtn
-endif
-ifdef MOUSE
-	fetch 1,mem_rssi_hex_received
-	call p_rssi_signal
-endif
-	rtn
+p_mouse_24g_pairing_complete:
+	call p_mouse_init_sensor_reset
 
-p_g24_receive_byte:
-	parse demod,bucket,8
-	rshift3 pwindow,pdata
-	rtn
+	jam 1,mem_mouse_24g_enter_lpm_enable
+	arg MOSUE_24G_PAIRING_FLAG,queue
+	call mouse_disable_function_flag
+	setarg 0
+	store 2,mem_24g_pairing_timer_count
+	jam 0,mem_mouse_move_flag
 	
-p_g24_end_of_packet:
-	disable encode_fec1
-	disable decode_fec1
-	call end_of_packet
-ifdef RF_DEBUG
-	call test_gpio_low
-endif
-	rtn
+	fetch 1,mem_config_sensor_type
+	sub pdata,P3610,null
+	call mouse_read_sensor3610_data,zero
+	ncall mouse_read_sensor_common,zero
 
-p_g24_sync_timeout:
-ifdef DONGLE
-	call p_rssi_noise
-endif
-	branch p_g24_end_of_packet
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
 
-p_g24_set_freq_tx:
-	call set_sync_on
-	fetcht 1,mem_24g_ch
-	branch set_freq_tx
+	fetch 1,MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_FLASH,p_mouse_store_flash_24g_address
+	call p_mouse_set_24g_addr_eeprom	//store rx dongle addr to eeprom
+	branch iicd_write_protect_eep_data
 
-p_g24_transmit:
-	call le_enable
-	fetch 4,mem_24g_addr
-	iforce access
-	call p_g24_prep
-	call p_g24_set_freq_tx
-	set1 TXGFSK,radio_ctrl
-	enable encode_fec0
-	enable is_tx
-	disable is_rx
+p_mouse_set_24g_addr_eeprom:
+	arg mem_24g_addr,rega
+	arg MOUSE_G24_ADDR_EEPROM_OFFECT,regb
+	arg 4,temp
+	rtn
 
-ifdef RF_DEBUG
-	call test_gpio_high
-endif
-	
-	rshift16 access,pdata
-	rshift8 pdata,pdata
-	rshift4 pdata,pdata
-	inject mod,40
-	disable encode_fec0
-	enable encode_fec1
-	enable enable_white
-	enable enable_crc
-	fetch 1,mem_24g_syncword_crc8
-	inject mod,8
-	fetch 1,mem_24g_txlen
-	iforce loopcnt
-	arg mem_24g_txpayload,contr
-p_g24tr_loop:
-	ifetch 1,contr
-	inject mod,8
-	loop p_g24tr_loop
-ifdef DONGLE
-	fetch 1,mem_rssi_hex
-	inject mod,8
-endif
+p_mouse_store_flash_24g_address:
+	arg mem_24g_addr,regb
+	ifetch 4,regb
+	store 4,mem_mouse_24g_addr
+	branch mouse_store_flash_device_info
 
-ifdef P24G_LOG	
-	fetch 1,mem_tx_power
-	inject mod,8
-	fetch 1,mem_rssi_avg_received
-	inject mod,8
-	fetch 1,mem_24g_paccnt
-	inject mod,8
-endif
+p_mouse_24g_attempt_fail:
+	call p_mouse_sensor_powerdown_check
+	jam G24_TX_TIMER_INT_DISABLE,mem_24g_transmit_by_interrupt
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+	call p_g24_check_51cmd_stop_24g
+	jam 0,mem_link_key_exists
+	call mouse_eeprom_load_recon_info	
+	arg 3,loopcnt
+	arg mem_device1_addr,contr
+	call p_pdata_0xff_check
+	branch p_mouse_null_enter_hibernate_enable,user
+p_mouse_24g_attempt_fail_next:
+	branch p_mouse_check_reconn_target
 
-	enable enable_parity
-	inject mod,24	//crc
-	disable enable_parity
-	until null,tx_clear
-	nop 100
-	disable encode_fec0
-	disable encode_fec1
+p_mouse_null_enter_hibernate_enable:	//ble never connected
+	jam 1,mem_mouse_null_enter_hibernate_flag
+	jam 40,mem_mouse_null_enter_hibernate_timer	//lmr 3s
 	rtn
 
-p_g24_timer_check:
-	call disable_user
-	fetcht 4,mem_24g_tx_btclk
-	copy clkn_bt,pdata
-	isub temp,null
-	ncall g24_timer_timeout,positive
-	copy pdata,regb
-	fetch 4,mem_24g_tx_btclk
-	fetcht 1,mem_24g_interval
-	iadd temp,temp
-	copy regb,pdata
-	isub temp,null
-	nrtn positive
-	set0 28,pdata
-	store 4,mem_24g_tx_btclk
-	branch enable_user
-
-p_rssi_noise:
-	call save_rssi
-	rtn blank
-	fetcht 1,mem_rssi_noise_index
-	arg mem_rssi_noise_buffer,rega
-	call p_rssi_store
-	storet 1,mem_rssi_noise_index
-	rtn
+p_mouse_24g_attempt_success:
+	call p_mouse_init_sensor_reset
+	branch mouse_no_data_timer_init
+p_mouse_before_hibernate:
+	enable user
+	hfetch 4,0x8138
+	setflag user,26,pdata
+	hstore 4,core_lpm_reg
+	call lpm_write_ctrl
+	call p_mouse_sensor_powerdown_check
+	call disable_authrom
+	call mouse_devce_led_off
+	call mouse_before_hibernate_wheel_gpio_set
+	branch mouse_lpm_before_common
 	
-p_rssi_store:
-	copy rega,pdata
-	iadd temp,contw
-	fetch 1,mem_rssi
-	istore 1,contw
-	increase 1,temp
-ifdef DONGLE
-	and_into RSSI_BUF_LEN_NOISE,temp
-endif
-ifdef MOUSE
-	and_into RSSI_BUF_LEN_SIGNAL,temp
-endif
-	rtn
+p_mouse_sensor_powerdown_check:
+	fetch 1,mem_mouse_init_sensor_reset_flag
+	rtn blank
+	jam 0,mem_mouse_init_sensor_reset_flag
+	branch p_mouse_sensor_powerdown
 
-endif
 
-p_rssi_average:
-	arg 0,temp
-ifdef DONGLE
-	arg RSSI_BUF_LEN_NOISE+1,loopcnt
-endif
-ifdef MOUSE
-	arg RSSI_BUF_LEN_SIGNAL+1,loopcnt
-endif
-	copy rega,contr
-ifdef DONGLE
-	branch rssi_average_loop
-endif
-ifdef MOUSE
-p_rssi_average_loop:
-	ifetch 1,contr
-	iadd temp,temp
-	loop p_rssi_average_loop
-	rshift3 temp,pdata
-	copy pdata,temp
-	rtnmark0 mark_24g
-	//2BCD
-	div pdata,10
-	call wait_div_end
-	quotient pdata
-	lshift4 pdata,pdata
-	remainder temp
-	ior temp,temp
-	rtn
+p_mouse_bb_event_timer:
+ifdef ADC_ENABLE	
+	call p_mouse_adc_read
+	call p_mouse_low_voltage_led_timer
 endif
-	rtn
+	call p_le_send_smp_security_request_timer
+	call p_mouse_send_switch_req_timer
+	call p_mouse_wheel_trigger_timer
+	call p_mouse_null_enter_hibernate_timer
+	call p_mouse_bt_discovery_check
+	call p_mouse_dpi_led_blink_delay_timer
+	call mouse_check_hid_handshake_timer
+	call mouse_check_discovery_timeout_timer
+	call mouse_check_direct_timeout_timer
+	call mouse_check_no_data_timeout_timer
+	branch p_mouse_le_enable_att_list_timer
 
-p_mouse_before_lpm:
-	rtnmark1 mark_24g
-	call p_mouse_le_txbuff_save
-	call p_mouse_setgpio_lpm
-	fetch 1,mem_context
-	bbit0 state_inconn,p_clear_wake
-	fetch 1,mem_lpm_current_mult
+p_le_send_smp_security_request_timer:
+	fetch 1,mem_mouse_le_bb_connected_flag
+	rtn blank
+	arg mem_mouse_send_secutiry_request_timer,regc
+	arg p_le_pairing_sm_start_check,regb
+	branch timer_single_step
+p_le_pairing_sm_start_check:
+	fetch 1,mem_le_send_security_request_flag
 	nrtn blank
-p_clear_wake:
-	setarg 0
-	store 8,mem_gpio_wakeup_low
-	rtn
+	branch le_pairing_sm_start	
 
-p_mouse_setgpio_lpm:
-	call p_mouse_set_sdio_high
-	call p_clear_wake
-p_mouse_setgpio_lpm_before:
-	call mouse_lpm_before_common
-	hfetch 4,core_gpio_oe0
-	hfetcht 4,core_gpio_pu0
-	ior temp,temp
-	invert temp,temp
-	hstoret 4,core_gpio_pd0
+p_mouse_send_switch_req_timer:
+	arg mem_mouse_send_switch_req_timer,regc
+	arg host_create_conn_resend,regb
+	branch timer_single_step
+
+p_mouse_wheel_trigger_timer:
+	arg mem_mouse_wheel_trigger_timer,regc
+	arg p_mouse_wheel_trigger_disable,regb
+	branch timer_single_step
+p_mouse_wheel_trigger_disable:
+	jam 0,mem_mouse_wheel_trigger
 	rtn
 
-p_mouse_set_sdio_high:
-	fetch 1,mem_mouse_init_sensor_reset_flag
-	rtn blank
-	branch p_mouse_seting_sensor_type// make sdio high to make 100uA less	
+p_mouse_le_enable_att_list_timer:
+	arg mem_le_start_encrypt_timer,regc
+	arg mouse_le_write_enable,regb
+	branch timer_single_step
 
-p_device_init:
-ifdef DEBUGLOG
-	call debuglog_init
-ifdef DEBUGLOG_STATUS
-	setarg DEBUGLOG_DTYPE_STATUS
-	store 2,mem_debuglog_datatype
-	setarg STATUS_LPM_WAKE
-	store 2,mem_debuglog_dataval
-	call debuglog_push	
-endif
-endif
-	call app_lpm_mult_enable
-	branch p_device_init_common,wake
-ifdef DEBUGLOG
-ifdef DEBUGLOG_STATUS
-	setarg DEBUGLOG_DTYPE_STATUS
-	store 2,mem_debuglog_datatype
-	setarg STATUS_CODE_WAKE
-	store 2,mem_debuglog_dataval
-	call debuglog_push
-endif
-endif
-ifdef BLE
-	call p_mouse_data_init
-endif
-	fetch 1,mem_tx_power
-	store 1,mem_tx_power_temp
-	call power_ctrl_pac_succ_cnt_init
+p_mouse_bt_discovery_check:
+	fetch 1,mem_config_function_enable
+	bbit1 ENABLE_BT_BUTTON,mouse_bt_discovery_by_button
+p_mouse_bt_discovery_commbination_key:
+	call mouse_check_key_gpio
+	beq MOUSE_RM_BUTTON,p_mouse_bt_discovery_commbination_key_down
+p_mouse_bt_discovery_commbination_key_up:
 	fetch 1,mem_ui_button_timeout
-	store 1,mem_combination_ui_button_count	//combination key timer init
-	call mouse_bt_discovery_button_down_disable
-p_device_init_common:
-	call p_mouse_init
-	branch enable_authrom
+	store 1,mem_combination_ui_button_count	//combination key timer init 
+	fetch 1,mem_bt_discovey_button_statue
+	rtneq DPI_BUTTON_STATE_UP
+	jam DPI_BUTTON_STATE_UP,mem_bt_discovey_button_statue
+	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
+	call mouse_disable_function_flag
+	branch mouse_bt_discovery_button_down_disable
+p_mouse_bt_discovery_commbination_key_down:
+	jam 40,mem_mouse_null_enter_hibernate_timer
+	call p_mouse_bt_discovery_timer
+	branch mouse_bt_discovery_commbination_key_down+1
 
-p_mouse_tx_power_init:
-	fetch 1,mem_tx_power_temp
-	store 1,mem_tx_power
-	rtn
+p_mouse_bt_discovery_timer:
+	arg mem_combination_ui_button_count,regc
+	arg p_mouse_long_button_bt_discovery,regb
+	branch timer_single_step
+	
+p_mouse_long_button_bt_discovery:
+	call p_mouse_sensor_powerdown_check
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_ADV,pdata
+	call mouse_stop_le_adv,true		//reconnect adv
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BT_RECONNECT,pdata
+	call mouse_cancel_reconnect,true
+	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
+	call mouse_enable_function_flag
+	branch mouse_long_button_bt_discovry
 
-p_mouse_init:
-	ncall p_mouse_setting_config,wake
-	call p_mouse_spi_init
-	rtn wake
-ifdef RF_DEBUG
-	call test_gpio_init
-endif
-ifdef MOUSE_SMOOTHER	
-	call p_drawing_optima_init
-endif
-	call p_mouse_cb_fuction
-ifdef G24	
-	call mouse_check_key_gpio
-	beq MOUSE_LM_BUTTON,p_mouse_24g_pairing_button
-endif
-	call p_mouse_wakeup_from_power
-	rtnmark1 mark_24g
-	branch p_mouse_check_reconn_target
+p_mouse_null_enter_hibernate_timer:
+	fetch 1,mem_mouse_null_enter_hibernate_flag
+	rtn blank
+	fetch 1,mem_mouse_null_enter_hibernate_timer
+	branch p_mouse_null_enter_hibernate,blank
+	increase -1,pdata
+	store 1,mem_mouse_null_enter_hibernate_timer
+	rtn
+p_mouse_null_enter_hibernate:
+	jam 0,mem_mouse_null_enter_hibernate_flag
+	branch app_enter_hibernate
 
-p_mouse_check_reconn_target:
-	call p_mouse_tx_power_init
-	fetch 1,mem_xrecord_mode
-ifdef CLASSIC_BT
-	beq REC_3_MODE,p_mouse3_0_check_reconn_target
-endif
-ifdef BLE	
-	beq REC_4_MODE,p_mouse4_0_check_reconn_target
-endif
-	branch p_mouse_null_enter_hibernate_enable
+	
+ifdef ADC_ENABLE
+p_mouse_adc_read:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+	fetch 1,mem_adc_read_timer
+	increase 1,pdata
+	store 1,mem_adc_read_timer
+	sub pdata,10,null              //1s read adc
+	rtn positive
+	jam 0,mem_adc_read_timer
+	call p_adc_set_mode
+	call vdd_calculate_by_mode
+	store 2,mem_mouse_vdd_now_vol
+	arg mem_mouse_vdd_calculate_set,rega
+	call p_adc_bat_percent_lowpower_out
+	fetch 1,mem_adc_power_flag
+	bbit1 1,app_enter_hibernate
+	bbit0 0,p_mouse_adc_no_low_voltage
+	jam 1,mem_mouse_adc_last_low_voltage_flag
+	branch mouse_adc_low_voltage
+p_mouse_adc_no_low_voltage:
+	call mouse_adc_no_low_voltage
+	fetch 1,mem_mouse_adc_last_low_voltage_flag
+	rtn blank
+	jam 0,mem_mouse_adc_last_low_voltage_flag
+	branch mouse_devce1_led_off
+	
+p_adc_set_mode:
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_GPIO,p_adc_check_gpio
+	branch adc_set_mode+1
+p_adc_check_gpio:
+	hfetch 1,core_gpio_pu0	//gpio5 pull up disable
+	set0 5,pdata
+	hstore 1,core_gpio_pu0
+	jam 0x8f,rf_adc_mode
+	fetch 1,mem_adc_channel
+	hstore 1,rf_adc_ch
+	call read_adc
+	hfetch 1,core_gpio_pu0	//gpio5 pull up enable
+	set1 5,pdata
+	hstore 1,core_gpio_pu0
+	rtn
 
-ifdef CLASSIC_BT
-p_mouse3_0_check_reconn_target:
-	fetch 6,mem_hci_plap
-	branch app_bt_start_discovery_short,blank
-	branch mouse3_0_check_reconn_target+3
-endif	
+p_adc_bat_percent_lowpower_out:
+	ifetch 8,rega
+	store 8,mem_pdatatemp
+	fetcht 2,mem_pdatatemp+2	//shutdown voltage 0.9v
+	fetch 2,mem_pdatatemp+6		//now voltage
+	lshift pdata,pdata			//partial pressure, now voltage*2
+	pincrease 6 
+	isub temp,null
+	nbranch adc_set_no_power_flag,positive
+	fetcht 2,mem_pdatatemp+4	//low voltage 1.0v
+	isub temp,null
+	nbranch adc_set_low_power_flag,positive
+p_adc_clear_low_power_flag:
+	fetch 1,mem_adc_power_flag
+	set0 0,pdata
+	store 1,mem_adc_power_flag
+	rtn	
 
-ifdef BLE
-p_mouse4_0_check_reconn_target:
-	jam 1,mem_le_send_security_request_flag
-	jam 1,mem_mouse_le_reconnect_flag
-	fetch 2,mem_mouse_direct_timeout
-ifdef BLE_FAST_CONN_ENABLE
-	fetcht 1,mem_mouse_fast_conn_flag
-	sub temp,0xff,null
-	nbranch p_mouse4_0_check_reconn_target_next,zero
-	setarg 0x0258								//ble fast conn time 1min
-endif
-p_mouse4_0_check_reconn_target_next:
-	store 2,mem_mouse_direct_timer
-	call app_lpm_mult_disable
-	call p_le_check_adv_flag
-	setarg ADV_FLAG_BREDR_NOT_SUPPORTED
-	istore 1,contr
-	branch check_51cmd_adv
+p_mouse_low_voltage_led_timer:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	rtnbit1 UI_STATE_BT_DISCOVERY
+	fetch 1,mem_adc_low_volatage_led_timer_count
+	pincrease 1
+	store 1,mem_adc_low_volatage_led_timer_count
+	beq 3,mouse_devce1_led_off
+	sub pdata,20,null
+	nbranch p_mouse_device1_led_on,positive
+	rtn
+p_mouse_device1_led_on:
+	jam 1,mem_adc_low_volatage_led_timer_count
+	branch mouse_device1_led_on
 
-p_le_check_adv_flag:
-	arg mem_le_adv_data,rega
-p_le_check_adv_flag_loop:
-	ifetch 1,rega	//length
-	rtn blank
-	iadd contr,rega
-	ifetch 1,contr	//type
-	rtneq 0x01
-	branch p_le_check_adv_flag_loop
 endif
 
-ifdef G24
-p_mouse_24g_pairing_button:
+p_mouse_dpi_led_blink_delay_timer:
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit0 MOUSE_ENABLE_24G
-	rtnbit1 MOSUE_24G_PAIRING_FLAG
-	rtnmark1 mark_24g
-	call mouse_devce_led_off
-	arg MOSUE_24G_PAIRING_FLAG,queue
-	call mouse_enable_function_flag
-	setarg 0
-	store 2,mem_mouse_direct_timer
-	store 1,mem_mouse_send_blank_timer
-	store 2,mem_24g_check_dongle_times
-	call mouse_stop_discovery
-	branch p_g24_start_pairing_sm1
-endif
+	rtnbit0 MOUSE_ENABLE_DPI_LED_BLINK
+	arg mem_mouse_dpi_led_delay_count,regc
+	arg p_mouse_dpi_led_setting,regb
+	branch timer_single_step	
 
-p_mouse_dpi_config:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	bbit0 MOUSE_ENABLE_EEPROM,mouse_dpi_config
-	fetch 1,mem_mouse_dpi
-	beq 0xff,p_mouse_dpi_config_default
-	branch p_mouse_seting_sensor_type
-p_mouse_dpi_config_default:
-	fetch 1,mem_config_sensor_motion
-	store 1,mem_mouse_dpi
-	branch p_mouse_seting_sensor_type
+p_mouse_dpi_led_setting:
+	fetch 1,mem_dpi_led_gpio
+	store 1,mem_mouse_struct_led_gpio
+	setarg LED_DPI_BLINK_FIXED
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time
+	arg 0,rega
+	fetcht 1,mem_mouse_dpi
+	//increase 1,temp
+	storet 1,mem_mouse_blink_count
+	jam UI_LED_STATE_BLINK_START,mem_mouse_led_type
+	rtn
 
-p_mouse_spi_init:
-	jam 0x76,mem_spi_init_clk
-	branch mouse_spi_init
+p_mouse_seting_dpi:
+	call p_mosue_dpi_led_blink_init
+	fetch 1,mem_config_sensor_type
+	beq P3610,mouse_seting_3610_dpi
+	beq P3212,mouse_seting_3212_dpi
+	beq P3065_XY,p_mouse_seting_3065XY_dpi
+	branch mouse_seting_dpi+5
 	
-p_mouse_init_sunt:
-	call p_mouse_spi_init
-	call mouse_spi_sdio_gpio_pollup
-p_mouse_init_sensor:
-	call mouse_read_sensor_id
-	beq P32XX_ID1,p_mouse_init_p32xx_id2_judge
-	beq P3065_ID1,p_mouse_p3065_init_param
-	call mouse_twspi_reset
-	nop 1000
-	branch p_mouse_init_sensor
+p_mouse_seting_3065XY_dpi:
+	fetch 1,mem_mouse_dpi
+	call p_mouse_3065xy_dpi_recount,blank
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL2,mouse_set_cpi1
+	beq MOUSE_DPI_LEVEL3,mouse_set_cpi3
+	beq MOUSE_DPI_LEVEL4,mouse_set_cpi4
+	branch mouse_set_cpi3
+p_mouse_3065xy_dpi_recount:
+	jam 1,mem_mouse_dpi
+	rtn
 
-p_mouse_init_sensor_reset:
-	jam 1,mem_mouse_init_sensor_reset_flag
-	call spi_ncs_enable
-	call p_mouse_init_sunt
-	branch spi_ncs_disable
+p_mosue_dpi_led_blink_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_DPI_LED_BLINK
+	jam 1,mem_mouse_dpi_led_delay_count  //delay 1s led blink
+	fetch 1,mem_dpi_led_gpio
+	store 1,mem_mouse_struct_led_gpio
+	rtn
 
-p_mouse_init_p32xx_id2_judge:
-	call p_mouse_sensor_poweron
-	branch mouse_init_p32xx_id2_judge
+p_mouse_bb_disconnected:
+	jam 0,mem_mouse_enter_sniff_count
+	jam 0x0e,mem_sniff_param_interval	//115Hz
+	call mouse_bb_discon_clear_stack
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BLE,mouse4_0_event_bb_disconn
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	bbit1 APP_DISC_AFTER_PAIRING,p_mouse_event_light_state_pairing
+	bbit1 APP_DISC_AFTER_RECONN,p_mouse_event_light_state_hibernate
+	bbit1 APP_DISC_AFTER_SNIFF,p_mouse_event_light_state_hibernate
+	branch mouse_start_discovery
+p_mouse_event_light_state_pairing:
+	bbit1 APP_DISC_AFTER_HANDSHAKE,p_mouse_event_light_state_hibernate
+	bbit1 APP_DISC_AFTER_SNIFF,p_mouse_event_light_state_hibernate
+	branch mouse_start_discovery
+p_mouse_event_light_state_hibernate:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BTN_DOWN,mouse_start_discovery
+	call app_disconn_reason_clear
+	call mouse_check_key_gpio
+	beq MOUSE_LMR_BUTTON,p_mouse_null_enter_hibernate_enable
+	branch app_bb_hibernate
 
-p_mouse_p3065_init_param:
-	call p_mouse_sensor_poweron
-	fetch 1,mem_sensor_id2
-	beq P3065_XY_ID2,mouse_p3065xy_init_param
-	jam P3065,mem_config_sensor_type
-	rtn
+p_mouse_bb_event_discovery_btn:
+	jam 0,mem_mouse_null_enter_hibernate_flag
+	jam 0,mem_mouse_null_enter_hibernate_timer
+	bmark1 mark_24g,p_mouse_switch_to_bt
+	branch mouse_bb_event_discovery_btn+1
+p_mouse_switch_to_bt:
+	call p_g24_check_51cmd_stop_24g
+	branch mouse_bb_event_discovery_btn+1
 
-p_mouse_sensor_poweron:
-	setarg 0x8006	// reset to factory settings
-	call twspi_write
-	nop 12000
-	branch p_mouse_dpi_config
-p_mouse_sensor_powerdown:
-	setarg 0x06
-	call twspi_read
-	or pdata,0x08,pdata
-	lshift8 pdata,pdata
-	add pdata,0x06,pdata
-	branch twspi_write	//make sdio high
 
-p_mouse_setting_config:
-ifdef G24
-	call p_g24_set_device_addr
-endif
-	call adc_init_data
-	//disable usb function
-	hfetch 1,core_usb_config
-	set0 4,pdata
-	hstore 1,core_usb_config
-	call mouse_gpio_init
-	call mouse_param_init
-ifdef CLASSIC_BT	
-	call p_mouse_bt_sdp_update
-endif
-	setarg 0
-	store 2,mem_lpm_interval
-	call mouse_adc_init
-ifdef BLE	
-	call le_set_config_fixed_ltk
-	call le_set_justwork
-	call le_set_fixed_ltk
-	call le_set_config_read_authentication
-endif	
-p_mouse_init_iic:
-	call iic_init_390k
-	call clear_eeprom_size_2k
-	call mouse_load_eeprom_dpi
-	call p_mouse_init_environment
-ifdef G24	
-	call p_mouse_set_24g_addr_eeprom
-	call iicd_read_eep_data
-endif	
-ifdef BLE_FAST_CONN_ENABLE
-	call p_mouse_load_fast_conn_flag
-	fetch 1,mem_mouse_fast_conn_flag
-	beq 0xff,p_mouse_fast_conn_init
-endif
-	rtn
+p_le_addr_random_config:
+	call load_adc_init
+	fetch 2,mem_0_5_adc_io_data	//adc data from otp
+	branch p_le_otp_adc_empty,blank
+	store 2,mem_random_addr_increase_count
+p_le_addr_random_store:
+	branch p_mouse_store_eerpom_random_addr_increase_count
+
+p_le_otp_adc_empty:
+	setarg 0x1122
+	store 2,mem_random_addr_increase_count
+	branch p_le_addr_random_store
+
+p_mouse_start_discovery:
+	jam 0,mem_le_send_security_request_flag
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+
+	jam 0,mem_mouse_clear_sensor_data_flag
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_ADV,p_mouse_start_discovery_norandom
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_BLE_RANDOM_ADDRE,p_mouse_start_discovery_norandom
+
+	call p_mouse_load_eeprom_random_addr_increase_count
+	fetcht 2,mem_random_addr_increase_count
+	increase 1,temp
+	storet 2,mem_random_addr_increase_count
+	storet 2,mem_le_lap+1
+	call p_mouse_store_eerpom_random_addr_increase_count
+	random pdata
+	store 1,mem_le_lap
 
+p_mouse_start_discovery_norandom:
 ifdef BLE_FAST_CONN_ENABLE
-p_mouse_load_fast_conn_flag:
-	arg 1,temp
-	arg mem_mouse_fast_conn_flag,rega
-	arg MOUSE_FAST_CONN_FLAG_OFFSET,regb
-	branch iicd_read_eep_data
-p_mouse_store_fast_conn_flag:
-	arg 1,temp
-	arg mem_mouse_fast_conn_flag,rega
-	arg MOUSE_FAST_CONN_FLAG_OFFSET,regb
-	branch iicd_write_protect_eep_data
-p_mouse_fast_conn_init:
-	jam 0x34,mem_xrecord_mode
-	setarg -1
-	store 6,mem_le_lap
-	rtn	
+	call app_ble_disconnect
+	setarg 0xed8e0e
+	store 3,mem_le_lap+3
+	jam 0x5a,mem_mouse_fast_conn_flag
+	call p_mouse_store_fast_conn_flag
 endif
+	call app_lpm_mult_disable
+	fetch 2,mem_discovery_timeout
+	store 2,mem_mouse_discovery_timer
+	jam 6,mem_connection_options
+	setarg 0
+	store 2,mem_mouse_no_data_timer
+	store 2,mem_mouse_direct_timer
+	arg MOUSE_STORE_EEPROM_FLAG,queue
+	call mouse_enable_function_flag
+	call mouse_bt_discovery_button_down_disable
+	fetch 1,mem_device_option
+	isolate1 MODE_4_MOUSE,pdata
+	call p_check_51cmd_adv,true
+	branch mouse_start_discovery_norandom+13
 
-ifdef CLASSIC_BT
-p_mouse_bt_sdp_update:
-	call enable_authrom
-	arg 0x8c00,contr
-	arg mem_mouse_uuid_list,contw
-	arg 369,loopcnt
-	call memcpy
-	//Attribute: HID SSR Host Max Latency
-	setarg 0x0f0209
-	istore 3,contw
-	setarg 0x120009
-	istore 3,contw
-	//Attribute: HID SSR Host Min Timeout
-	setarg 0x100209
-	istore 3,contw
-	setarg 0x000009
-	istore 3,contw
-	arg 0x8d71,contr
-	arg 265,loopcnt
-	call memcpy
+p_mouse_store_eerpom_random_addr_increase_count:
+	arg 2,temp
+	arg mem_random_addr_increase_count,rega
+	arg MOUSE_RANDOM_ADDR_COUNT_EEPROM_OFFSET,regb
+	branch iicd_write_protect_eep_data
 	
-	jam 0,mem_mouse_uuid_list+23	//Service Record Handle: 0x 00 01 00 00
-	jam 0x6d,mem_mouse_uuid_list+15	//total length
-	setarg 0x401f
-	store 2,mem_mouse_uuid_list+357	//timeout
-	setarg 0x6d04
-	store 2,mem_mouse_uuid_list+462	//VID
-	setarg 0x16b0
-	store 2,mem_mouse_uuid_list+468	//PID
+p_mouse_load_eeprom_random_addr_increase_count:
+	arg 2,temp
+	arg mem_random_addr_increase_count,rega
+	arg MOUSE_RANDOM_ADDR_COUNT_EEPROM_OFFSET,regb
+	branch iicd_read_eep_data
 
-	setarg mem_mouse_uuid_list				//bt sdp start address
-	store 2,mem_ui_uuid_table
-	rtn
-endif	
+p_check_51cmd_adv:
+	jam 0,mem_mouse_le_reconnect_flag
+	call p_le_check_adv_flag
+	setarg ADV_FLAG_BREDR_NOT_SUPPORTED |ADV_FLAG_LIMITED_DISCOVERABLE
+	istore 1,contr
+	branch check_51cmd_adv
+
+p_mouse_stop_discovery:
+	setarg 0
+	store 2,mem_mouse_discovery_timer
+	call p_mouse_sensor_poweron		//clear sensor data,confirm the motion pin high
+	branch mouse_stop_discovery+1
 
-p_mouse_init_environment:
-	call app_initflag_check
-	branch mouse_eeprom_load_recon_info,zero
 ifdef BLE
-	call p_le_addr_random_config
-endif
-	branch mouse_init_environment+2
+p_le_slave_match:
+	fetch 1,mem_le_md_count
+	pincrease 1
+	store 1,mem_le_md_count
+	beq LE_MD_MAX_COUNT,le_slave_cont
+	call le_acknowledge
+	call le_prepare_tx
+	call power_ctrl_start
+	branch le_slave_match+7
 
-p_app_flag_store:
-	arg 2,temp
-	arg mem_timeup,rega
-	arg MOUSE_EEPROM_MODULE_INIT_FLAG,regb
-	branch iicd_write_protect_eep_data
+p_le_next_adv_channel:
+	fetch 1,mem_le_ch_mapped
+	increase 1,pdata
+	store 1,mem_le_ch_mapped
+	rtnne 40
+	jam 37,mem_le_ch_mapped
+	rtn
 
-p_app_initflag_check:
-	arg 2,temp
-	arg mem_pdatatemp,rega
-	arg MOUSE_EEPROM_MODULE_INIT_FLAG,regb
-	branch app_initflag_check+4
+p_le_receive_skip:
+	call save_rssi
+	call p_rssi_signal
+	branch le_receive_skip+2
 
-p_mouse_wakeup_from_power:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	bbit0 MOUSE_ENABLE_WAKEUP_FROM_POWER,p_mouse_wakeup_no_from_power
-	fetch 1,mem_wakup_from_power_flag
-	isolate0 gpio_latch,pdata
-	nbranch p_mouse_wakeup_no_from_power,true
-	call p_mouse_init_sunt
-	call p_mouse_sensor_powerdown
-p_mouse_wakeup_no_from_power:
-	fetch 1,mem_reconn_times_init
-	store 1,mem_reconn_times
-	fetch 1,mem_config_function_enable
-	rtnbit1 ENABLE_SELECT_DEVICE_BY_GPIO_BUTTON
-	rtnbit1 ENABLE_SELECT_DEVICE_BY_SWITCH
-ifdef G24	
-p_mouse_start_24g_mode:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit0 MOUSE_ENABLE_24G	
-	call p_g24_factory_check
-	branch p_g24_auto_pair_start,user
-	branch p_g24_start_24g_mode
-endif
-	set0 mark_24g,mark	//disable 24g
+p_le_update_param:
+	call p_mouse_le_conn_param_check
+	branch le_update_param+8
+p_mouse_le_lpm_mult_reinit:
+	fetch 1,mem_lpm_mult_init
+	store 1,mem_lpm_mult
+p_mouse_le_conn_param_lpm_enable:
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
 	rtn
-
-p_g24_factory_check:
-	arg 2,loopcnt
-	arg mem_24g_addr,contr
-p_pdata_0xff_check:
-	call enable_user
-	setarg 0xffff
-p_pdata_0xff_check_loop:
-	ifetcht 2,contr
-	isub temp,null
-	ncall disable_user,zero
-	loop p_pdata_0xff_check_loop
+p_mouse_le_conn_param_lpm_disable:
+	jam LE_LPM_DISABLE,mem_mouse_le_conn_param_reject
 	rtn
+p_mouse_le_conn_param_check:
+	fetch 1,mem_le_new_conninterval
+	sub pdata,LE_INTERVAL_15MS,null
+	nbranch p_mouse_le_conn_param_lpm_disable,positive
+	fetch 1,mem_le_new_connslavelatency
+	fetcht 1,mem_lpm_mult_init
+	isub temp,null
+	branch p_mouse_le_lpm_mult_reinit,positive
+	fetch 1,mem_le_new_connslavelatency
+	store 1,mem_lpm_mult
+	branch p_mouse_le_conn_param_lpm_enable
 
-p_mouse_cb_fuction:
-ifdef G24
-	setarg p_mouse_g24_package_data
-	store 2,mem_cb_24g_data
-endif	
-ifdef BLE
-	setarg p_mouse_le
-	store 2,mem_cb_le_process
-	setarg p_le_mouse_bb_event_connect_complete
-	store 2,mem_cb_att_write
-endif
-ifdef CLASSIC_BT
-	setarg p_mouse_bt
-	store 2,mem_cb_bt_process
-endif	
-	setarg p_mouse_before_lpm
-	store 2,mem_cb_before_lpm
-	setarg p_mouse_priority_bb_event
-	store 2,mem_cb_bb_event_process
-	setarg p_mouse_idle
-	store 2,mem_cb_idle_process
-	setarg p_mouse_before_hibernate
-	store 2,mem_cb_before_hibernate
-	setarg p_mouse_bb_event_timer
-	store 2,mem_cb_event_timer
-	rtn
+p_le_update_channel_map:
+	fetch 1,mem_le_state
+	rtnbit0 lestate_update_map
+	call p_le_channel_map_overflow_check
+	nrtn user
+	branch le_update_channel_map+3
+p_le_channel_map_overflow_check:
+	enable user
+	fetch 1,mem_le_event_count+1
+	rshift4 pdata,pdata
+	rtnne 0x0f
+	fetch 1,mem_le_instant+1
+	rshift4 pdata,pdata
+	rtnne 0x00
+	branch disable_user
 
-ifdef G24
-p_mouse_g24_package_data:
-	call mouse_g24_package_data
-	fetch 2,mem_mouse_z
-	rtn blank
-	branch p_g24_transmit_by_interrupt_enable
-endif	
-	
-ifdef BLE
-p_mouse_le_txbuff_save:
-	arg mem_le_tx_buffer0,contr
-	arg mem_le_tx_buffer0_omemalloc,contw
-	call p_mouse_le_txbuff_copy
-	arg mem_le_tx_buffer1,contr
-	call p_mouse_le_txbuff_copy
-	arg mem_le_tx_buffer2,contr
-	call p_mouse_le_txbuff_copy
-	arg mem_le_tx_buffer3,contr
-p_mouse_le_txbuff_copy:	
-	arg 27,loopcnt
-	branch memcpy
+p_le_prepare_tx:
+	fetch 1,mem_le_arq
+	bbit1 wak,p_le_prepare_tx_wak
+	call power_ctrl_pac_succ_incrs	
+	fetch 1,mem_empty_count
+	nbranch p_le_send_empyt,blank
+	fetch 1,mem_le_state 
+	bbit0 lestate_encryption,p_le_tx_4
+	fetch 1,mem_le_rxbuf+1  
+	branch p_le_tx_4,blank  
+	branch le_send_empty      // send empty data when got non empty packet
+p_le_send_empyt:
+	fetch 1,mem_empty_count
+	increase -1,pdata
+	store 1,mem_empty_count
+	branch le_send_empty
+p_le_tx_4:	
+	fetch 1,mem_le_pairing_state
+	bne FLAG_LE_PAIRING_AFTER_AUTH,p_in_le_tx_4
+	jam 3,mem_empty_count
+p_in_le_tx_4:
+	call le_fifo_check_nearly_full
+	call p_mouse_data_pull,blank
+	branch le_prepare_tx+4
 
-p_mouse_le_txbuff_load:
-	arg mem_le_tx_buffer0_omemalloc,contr
-	arg mem_le_tx_buffer0,contw
-	call p_mouse_le_txbuff_copy
-	arg mem_le_tx_buffer1,contw
-	call p_mouse_le_txbuff_copy
-	arg mem_le_tx_buffer2,contw
-	call p_mouse_le_txbuff_copy
-	arg mem_le_tx_buffer3,contw
-	branch p_mouse_le_txbuff_copy
+p_le_prepare_tx_wak:
+	call p_le_check_tx_retransmit_setmd
+	branch p_le_power_ctrl_pac_succ_decrs
 
-p_mouse_le:
-	call le_fifo_check_nearly_full
-	nrtn blank
-ifdef BLE_FAST_CONN_ENABLE
-	fetch 1,mem_mouse_fast_conn_flag
-	beq 0xff,p_mouse_le_next
-endif
+p_le_check_tx_retransmit_setmd:
 	fetch 1,mem_le_connect_status_flag
 	and pdata,0x03,pdata
 	rtnne 0x03
-p_mouse_le_next:
-	fetch 1,mem_mouse_clear_sensor_data_flag
-	call p_mouse_clear_sensor_data,blank
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_le_send_empty_packet
-	call mouse_motion
-	nrtn user
-	call p_mouse_wheel_trigger
-	branch p_mouse_data_push
-endif
-
-p_mouse_data_init:
-	jam 7,mem_mouse_data_queue	//data length
-	jam 4,mem_mouse_data_queue+1	//fifo depth
-	setarg mem_mouse_data_queue
-	store 2,mem_queue_ptr
-	branch queue_init
-
-p_mouse_data_push:
-	arg mem_mouse_key,rega
-	call queue_push
-	call p_mouse_queue_increase,user
-	
+	fetch 1,mem_mouse_data_queue_num
+	rtn blank
+	fetch 1,mem_le_txlen
+	rtn blank
+	fetch 1,mem_le_txheader
+	set1 md,pdata
+	store 1,mem_le_txheader
+	call le_set_md
 ifdef DEBUGLOG
 ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_LOST_MOUSEDATA
-	store 2,mem_debuglog_dataval
-	nbranch debuglog_push,user
-
-	setarg MISC_PUSH_MOUSEDATA
+	setarg MISC_LE_RETRANSMIT_MD
 	store 2,mem_debuglog_dataval
-	call debuglog_push
+	call debuglog_push	
 endif
 endif
 	rtn
-p_mouse_queue_increase:
-	fetch 1,mem_mouse_data_queue_num
-	increase 1,pdata
-	store 1, mem_mouse_data_queue_num
-	rtn
-	
-p_mouse_data_pull:
-	arg mem_mouse_key,rega
-	call queue_pop
-	branch p_mouse_fill_data_le,user
-	rtn
 
-p_mouse_fill_data_le:
+	
+	
+p_le_power_ctrl_pac_succ_decrs:
 ifdef DEBUGLOG
 ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_PULL_MOUSEDATA
+	setarg MISC_LE_RETRANSMIT
 	store 2,mem_debuglog_dataval
-	call debuglog_push
-
-	setarg DEBUGLOG_DTYPE_MISC
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_mouse_x
-	store 1,mem_debuglog_dataval
-	fetch 1,mem_mouse_y
-	store 1,mem_debuglog_dataval+1
 	call debuglog_push	
 endif
 endif
-	call le_clear_md
-	fetch 1,mem_mouse_data_queue_num
-	sub pdata,1,null
-	ncall le_set_md,positive
-	fetch 1,mem_mouse_data_queue_num
-	rtn blank
-	increase -1,pdata
-	store 1, mem_mouse_data_queue_num
-	branch mouse_fill_data_le
-	
-endif
+	branch power_ctrl_pac_succ_decrs
 
-p_mouse_wheel_trigger:
-	fetch 2,mem_mouse_z
+p_mouse_le_reconn_write_enable_timer_reinit:
+	fetch 1,mem_mouse_le_reconnect_flag
 	rtn blank
-	jam 1,mem_mouse_wheel_trigger
-	jam 10,mem_mouse_wheel_trigger_timer
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtneq 0x03
+	jam 10,mem_le_start_encrypt_timer
 	rtn
 
-ifdef CLASSIC_BT
-p_mouse_bt:
-	rtn attempt
-	fetch 1,mem_app_handshake_flag
-	rtn blank
-	call l2cap_malloc_is_fifo_nearly_full
+p_le_parse:
+	rtnmark1 mark_old_packet
+	call le_fifo_check_full
 	nrtn blank
-	fetch 1,mem_mouse_clear_sensor_data_flag
-	call p_mouse_clear_sensor_data,blank
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_send_empty_data
-	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,mouse_send_empty_data
-	call mouse_motion
-	nrtn user
-	call p_mouse_wheel_trigger
-	fetch 1,mem_mouse_bt_boot_mode
-	beq 1,p_mouse_send_data_boot_mode	//boot
-	fetch 1,mem_mouse_bt_send_first_package_flag
-	rtn blank
-	branch mouse_send_data	//report
-
-p_mouse_send_data_boot_mode:
-	fetch 1,mem_mouse_key
-	store 1,mem_mouse_bt_boot_data
-	fetch 1,mem_mouse_x
-	istore 1,contw
-	fetch 1,mem_mouse_y
-	istore 1,contw
-	fetch 2,mem_mouse_z
-	istore 2,contw
+	fetch 1,mem_le_rxbuf
+	and pdata,0x3,pdata
+	store 1,mem_le_packet_llid
+	ifetch 1,contr
+	and pdata,0x1f,pdata
+	store 1,mem_le_packet_size
+	rtn blank							//empty rtn
+	copy contr,pdata
+	store 2,mem_le_payload_ptr
+	fetch 1,mem_le_packet_llid
+	beq LLID_LE_LL,p_le_parse_ll
+	branch le_parse_l2cap
+p_le_parse_ll:
+	fetch 1,mem_le_rxbuf+2
+	beq LL_CHANNEL_MAP_REQ,p_le_parse_channel_map_req
+	branch le_parse_ll+1
+p_le_parse_channel_map_req:
+	ifetch 5,contr
+	store 5,mem_le_new_map
+	ifetch 2,contr
+	store 2,mem_le_instant
+	branch le_parse_channel_map_req+7	
+	
+p_le_parse_l2cap:
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,p_le_parse_att
+	beq LE_L2CAP_CID_SMP,p_le_parse_smp
+	branch le_parse_l2cap+11
+p_le_parse_att:
+	call store_contr
+	call p_mouse_le_reconn_write_enable_timer_reinit
+	call get_contr
+	ifetch 3,contr
+	store 3,mem_le_att_opcode
+	beq ATTOP_READ_BY_GROUP_TYPE_REQUEST,p_le_parse_att_read_by_group_type_request	
+	rshift8 pdata,temp
+	sub temp,0x24,null
+	branch p_le_parse_att1,positive
+	arg mem_mouse_le_uuid_sup,temp
+	storet 2,mem_ui_le_uuid_table
+	call le_parse_att+2
+	setarg 0x8e7a
+	store 2,mem_ui_le_uuid_table
+	rtn
 
-	arg 7,rega
-	call hid_malloc_tx_buff
-	fetch 2,mem_hid_int_remote_cid
-	istore 2,contw
-	setarg 0x02a1
-	istore 2,contw
-	fetch 5,mem_mouse_bt_boot_data
-	istore 5,contw
+p_le_parse_att_read_by_group_type_request:
+	call le_parse_att_read_by_group_type_request
+	call le_fifo_get_last_tx_ptr
+	increase 7,contr
+	ifetch 1,contr
+	rtnne ATTOP_READ_BY_GROUP_TYPE_RESPONSE
+	increase 5,contr
+	ifetch 2,contr
+	arg UUID_SERVICE_HIDS,temp
+	isub temp,null
+	nrtn zero
+	increase -4,contr
+	setarg 0x2b
+	istore 2,contr
 	rtn
-endif
-	
-p_mouse_clear_sensor_data:
-	call le_set_config_more_data
-	jam 1,mem_mouse_clear_sensor_data_flag
-	branch p_mouse_init_sensor_reset
 
-p_mouse_idle:
-	call ui_check_paring_button
-	call mouse_dpi_cheak
-	branch mouse_wheel_check
+p_le_parse_att1:
+	beq ATTOP_READ_REQUEST,p_le_parse_att_read_request
+	branch le_parse_att+2
+p_le_parse_att_read_request:
+	fetcht 2,mem_le_att_handle
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_READ_AUTH,p_le_send_att_read_response_check_auth
+p_le_send_att_read_response:
+	call le_att_get_handle_ptr
+	branch le_send_att_error_response_notfound,blank
+	increase -2,contr
+	ifetch 2,contr
+	arg UUID_CHRCTR_PNP_ID,temp
+	isub temp,null
+	branch p_le_send_att_pnp_id,zero
+	
+	fetch 2,mem_le_att_handle
+	beq 0x13,le_send_att_error_response_notfound
 
-p_mouse_priority_bb_event:
-	copy regc,pdata
-ifdef BLE	
-	beq BT_EVT_LE_CONNECTED,p_mouse_le_bb_event_connected
-	beq BT_EVT_LE_DISCONNECTED,p_mouse_le_bb_disconnected
-	beq BT_EVT_LE_ENC_INFO,p_mouse_le_enc_info
-	beq BT_EVT_LE_START_ENC,p_mouse_le_ll_start_encryt
-	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,p_mouse_le_conn_param_update_rsp_recieved
-endif
-ifdef CLASSIC_BT
-	beq BT_EVT_RECONN_FAILED,p_mouse_bb_event_reconn_failed
-	beq BT_EVT_RECONN_PAGE_TIMEOUT,p_mouse_bb_event_reconn_timeout
-	beq BT_EVT_VIRTUAL_CABLE_UNPLUG,p_mouse_irtual_cable_unplug
-	beq BT_EVT_SWITCH_NOT_ACCEPT,app_bt_role_switch	
-	beq BT_EVT_SNIFF_NOT_ACCEPT,p_mouse_sniff_not_accept
-	beq BT_EVT_BB_CONNECTED,p_mouse_bb_event_connected
-	beq BT_EVT_BB_DISCONNECTED,p_mouse_bb_event_disconnected
-	beq BT_EVT_SWITCH_SUCCESS_MASTER,p_mouse_enter_sniff_check
-endif
-ifdef G24
-	beq BT_EVT_24G_PAIRING_COMPLETE,p_mouse_24g_pairing_complete
-	beq BT_EVT_24G_ATTEMPT_FAIL,p_mouse_24g_attempt_fail
-	beq BT_EVT_24G_ATTEMPT_SUCCESS,p_mouse_24g_attempt_success
-endif
-	branch mouse_priority_bb_event+1
+	fetcht 2,mem_le_att_handle
+	branch le_send_att_read_response
+p_le_send_att_pnp_id:
+	call store_contr
+	fetch 1,mem_le_att_pnp_id_len
+	add pdata,1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_att_pnp_id_len
+	copy pdata,loopcnt
+	arg mem_le_att_pnp_id,contr
+	branch memcpy
 
-ifdef BLE
-p_mouse_le_bb_event_connected:
-	jam 1,mem_mouse_le_bb_connected_flag
-	fetch 1,mem_mouse_le_reconnect_flag
-	nbranch p_mouse_le_bb_event_connected_next,blank
-	jam 0x14,mem_mouse_send_secutiry_request_timer
-p_mouse_le_bb_event_connected_next:
-	call p_mouse_init_sensor_reset
-	call p_mouse_data_init
-	branch mouse_le_bb_event_connected
+p_le_send_att_read_response_check_auth:
+	fetch 2,mem_le_pairing_handle
+	isub temp,null
+	nbranch p_le_send_att_read_response,zero
+//le_send_att_read_response_error_insufficient_auth:
+	call le_check_encrypt_state
+	nbranch p_le_send_att_read_response,user
+	jam ATT_ERR_INSUFFICIENT_AUTHENTICATION,mem_le_err_code
+	branch le_send_att_error_response	
 
-p_mouse_le_bb_disconnected:
-	jam 0,mem_mouse_le_bb_connected_flag
-	call p_mouse_sensor_powerdown_check
-	setarg LE_INTERVAL_8_75MS
-	store 2,mem_le_interval_min
-	store 2,mem_le_interval_min+2
-	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
-	jam 0,mem_mouse_clear_sensor_data_flag
-	call p_mouse_data_init
-	call le_clr_config_more_data
-	branch mouse_bb_disconnected
+p_le_parse_smp:
+	ifetch 1,contr
+	beq SMP_PAIRING_REQUEST,p_le_parse_smp_pairing_request
+	beq SMP_PAIRING_FAILED,p_le_parse_smp_pairing_failed
+	branch le_parse_smp+1
 
-p_mouse_le_enc_info:
-p_app_updata_le_param:
-	jam BT_CMD_LE_UPDATE_CONN,mem_fifo_temp
-	branch ui_ipc_send_cmd
+p_le_parse_smp_pairing_request:
+	jam 1,mem_le_send_security_request_flag
+	branch le_parse_smp_pairing_request
+	
+p_le_parse_smp_pairing_failed:
+	call le_parse_smp_pairing_failed
+	fetch 1,mem_le_state	//disable update conn param
+	set0 lestate_update_param,pdata
+	store 1,mem_le_state
+	branch le_parse_terminate_ind
 
-p_mouse_le_ll_start_encryt:
-	fetch 1,mem_mouse_le_reconnect_flag
-	beq 1,p_mouse_le_ll_reconn_start_encryt
-	branch p_mouse_le_ll_enable_start_enc_flag
+p_le_adv_not_match:
+	fetch 1,mem_le_ch_mapped
+	bne 39,le_adv_loop
+	call p_le_adv_random_delay
+	arg le_adv_interval_timer,queue
+	fetch 2,mem_le_adv_interval
+	branch timer_init
+p_le_adv_random_delay:
+	random pdata
+	arg 0x1ff,temp
+	iand temp,pdata
+	add pdata,250,pdata
+	branch delay
 
-p_mouse_le_ll_reconn_start_encryt:
-	call p_app_updata_le_param
-	jam 20,mem_le_start_encrypt_timer
-p_mouse_le_ll_enable_start_enc_flag:
-	arg LL_START_ENC_FLAG,queue
-	branch mouse_le_enable_connect_flag
+p_le_lpm_setmult:
+	disable wake
+	branch p_le_lpm_set_mult_attempt,attempt
+	nbranch le_lpm_lost,match
+p_le_lpm_set_mult_attempt:
+	call lpm_match
+	fetch 2,mem_rx_window_sniff
+	store 2,mem_le_receive_window
+	fetch 1,mem_le_connect_status_flag
+	compare 3,pdata,3
+	nbranch lpm_mult_short,true
+	branch le_lpm_set_mult_attempt+3
 
-p_mouse_le_conn_param_update_rsp_recieved:
-	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
-	rtneq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
-	fetch 1,mem_le_tsniff
-	rshift2 pdata,pdata
-	sub pdata,LE_INTERVAL_15MS,null
-	branch p_mouse_le_conn_param_update_rsp_not_accepted,positive
-	setarg LE_INTERVAL_11_25MS
-	store 2,mem_le_interval_min
-	store 2,mem_le_interval_min+2
-	call p_app_updata_le_param
-p_mouse_le_conn_param_lpm_disable:
-	jam LE_LPM_DISABLE,mem_mouse_le_conn_param_reject
+p_le_mouse_bb_event_connect_complete:
+	fetch 1,mem_mouse_le_reconnect_flag
+	nrtn blank
+	fetch 1,mem_le_att_handle
+	sub pdata,26,pdata
+	nrtn zero
+	branch mouse_le_write_enable
+endif
+
+p_twspi_reset:
+	hfetch 1,core_gpio_out3
+	and_into 0xfd,pdata
+	hstore 1,core_gpio_out3
+	hfetcht 1,core_gpio_oe3
+	or_into 0x2,temp
+	hstoret 1,core_gpio_oe3
+	call twspi_disable
+	and_into 0xfd,temp
+	nop 13
+	call twspi_enable
+	hstoret 1,core_gpio_oe3
 	rtn
 
-//ipad not accepted updata, need reinit mem_lpm_mult.   mem_lpm_mult = CONNECT_IND latency = 0
-p_mouse_le_conn_param_update_rsp_not_accepted:
-	jam 1,mem_mouse_le_updata_not_accepted_flag
-	branch p_mouse_le_conn_param_update_rsp_not_accepted_mult_reset
-endif
+p_check_51cmd_once_continue:
+	call lmo_fifo_check
+	nbranch check_51cmd_restore,blank  //process this cmd next time while lmo fifo is full
+	fetch 1,mem_fifo_temp
+	bmark0 mark_context,check_51cmd_check_idle
+	beq BT_CMD_LE_UPDATE_CONN,p_check_51cmd_ble_update_connect_param
+	branch check_51cmd_once_continue+2
 
+p_check_51cmd_ble_update_connect_param:
+	call le_fifo_check_full
+	nrtn blank
+	branch le_l2cap_tx_update_req
 
 ifdef CLASSIC_BT
-p_mouse_bb_event_reconn_timeout:
-p_mouse_bb_event_reconn_failed:
-	fetch 2,mem_ui_state_map
-	rtnbit1 UI_STATE_BTN_DOWN
-	rtnbit1 UI_STATE_BT_DISCOVERY
-	rtnbit1 UI_STATE_BLE_ADV
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
-	branch app_bb_hibernate
-
-p_mouse_irtual_cable_unplug:
-	call mouse_irtual_cable_unplug
-	branch app_bb_hibernate
 
-p_mouse_sniff_not_accept:
-	fetch 1,mem_mouse_enter_sniff_count
-	rtneq 2
+p_page_wait_fhs_reply_ok:
+ 	fetch 1, mem_page_rcv_fhs
 	increase 1,pdata
-	store 1,mem_mouse_enter_sniff_count
-	jam CLASSIC_INTERVAL_11_25MS,mem_sniff_param_interval	//89Hz
-	branch app_bt_enter_sniff
-
-p_mouse_bb_event_connected:
-	jam 0,mem_mouse_send_switch_req_timer
-	call p_mouse_init_sensor_reset
-	branch mouse_stop_discovery
-
-p_mouse_bb_event_disconnected:
-	jam 0,mem_bt_rcvd_switch_req_accept
-	jam 0,mem_bt_send_lmp_setup_complete
-	jam 0,mem_mouse_bt_send_first_package_flag
-	call p_mouse_sensor_powerdown_check
-	branch mouse_bb_disconnected
+	store 1, mem_page_rcv_fhs
+	call prepare_newconn
+p_master_newconn_loop:
+ 	set1 mark_first_packet,mark
+	call master_newconn_once
+	branch p_newconn_poll_responded,sync
+	set0 mark_first_packet,mark
+	call new_conn_timeout
+	nbranch p_master_newconn_loop,blank
+	branch page_restart	
 
-p_mouse_enter_sniff_check:
-	fetch 1,mem_mouse_enter_sniff_count
-	rtnne 2
-	jam 0,mem_mouse_enter_sniff_count
-	jam 0x0e,mem_sniff_param_interval	//89Hz
-	branch app_bt_enter_sniff
-	
-endif
+p_newconn_poll_responded:
+	set0 mark_first_packet,mark
+	branch newconn_poll_responded
 
-ifdef G24
-p_mouse_24g_pairing_complete:
-	call p_mouse_init_sensor_reset
+p_process_dmh:
+	bmark1 mark_first_packet,end_of_packet			
+	branch process_dmh+1
 
-	jam 1,mem_mouse_24g_enter_lpm_enable
-	arg MOSUE_24G_PAIRING_FLAG,queue
-	call mouse_disable_function_flag
-	setarg 0
-	store 2,mem_24g_pairing_timer_count
-	jam 0,mem_mouse_move_flag
-	
-	call mouse_read_sensor_common
+p_quit_connection_cont:
+	call app_disconn_reason_collect_bt
+	call sniff_exit
+	jam BT_EVT_BB_DISCONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+	call init_lmp_work
+	call l2cap_init_work
+	branch quit_connection_cont+8
 
-	call p_mouse_tx_power_init
-	call p_mouse_set_24g_addr_eeprom	//store rx dongle addr to eeprom
-	branch iicd_write_protect_eep_data
+p_prepare_tx:
+	fetch 1,mem_state
+	isolate1 state_inconn,pdata
+	call p_bt_power_ctrl,true
+	branch prepare_tx+1
+p_bt_power_ctrl:
+	fetch 1,mem_arq
+	isolate1 wack,pdata
+	call power_ctrl_pac_succ_decrs,true
+	ncall power_ctrl_pac_succ_incrs,true
+	branch power_ctrl_start
 
-p_mouse_set_24g_addr_eeprom:
-	arg mem_24g_addr,rega
-	arg MOUSE_G24_ADDR_EEPROM_OFFECT,regb
-	arg 4,temp
-	rtn
+p_slave_conn_recv_packet:
+	call slave_receive_master_slot
+	nbranch shutdown_radio,sync
+	call save_rssi
+	call p_rssi_signal
+	branch slave_conn_recv_packet+4
 
-p_mouse_24g_attempt_fail:
-	call p_mouse_sensor_powerdown_check
-	jam G24_TX_TIMER_INT_DISABLE,mem_24g_transmit_by_interrupt
-	call p_mouse_tx_power_init
-	call p_g24_check_51cmd_stop_24g
-	jam 0,mem_link_key_exists
-	call mouse_eeprom_load_recon_info
-	arg 3,loopcnt
-	arg mem_device1_addr,contr
-	call p_pdata_0xff_check
-	branch p_mouse_null_enter_hibernate_enable,user
-	branch p_mouse_check_reconn_target
+p_lpm_dispatch:
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	rtn blank
+	fetch 1,mem_lpm_mode
+	rtn blank
+	fetch 1,mem_ssp_enable
+	branch p_lpm_dispatch_next,blank
+	fetch 1,mem_sp_local_key_invalid	// simple pairing is not ready
+	rtn blank
+p_lpm_dispatch_next:
+	fetch 1,mem_le_sc_calc
+	nrtn blank
+	call lpm_check_wake_lock
+	nrtn blank
+	fetch 1,mem_context
+	compare 3,pdata,0x7							//sco won't sleep 
+	nbranch lpm_dispatch_unconn,true
+	fetch 2,mem_context + coffset_tsniff	//role switch 
+	arg 0xffff,temp
+	isub temp,null
+	rtn zero
+	branch lpm_dispatch_next+9
 
-p_mouse_24g_attempt_success:
-	call p_mouse_init_sensor_reset
-	branch mouse_no_data_timer_init	
-endif
+p_app_bt_start_reconnect:
+	branch app_bt_start_reconnect+3
 
+p_send_lmp:
+	disable user
+	call lmo_fifo_process
 
-p_mouse_before_hibernate:
-	enable user
-	hfetch 4,0x8138
-	setflag user,26,pdata
-	hstore 4,core_lpm_reg
-	call lpm_write_ctrl
-	call p_mouse_sensor_powerdown_check
-	call disable_authrom
-	call mouse_devce_led_off
-	call mouse_before_hibernate_wheel_gpio_set
-	call p_mouse_setgpio_lpm_before
-	fetcht 1,mem_sensor_data_gpio
-	branch gpio_clr_wake
+ifdef DEBUGLOG
+ifdef DEBUGLOG_SEND_LMP
+	setarg DEBUGLOG_DTYPE_SEND_LMP
+	store 2,mem_debuglog_datatype
+//	fetch 1,mem_lmi_opcode
+//	store 1,mem_debuglog_dataval+1
+//	fetch 1,mem_lmp_to_send
+//	store 1,mem_debuglog_dataval
+	fetch 1,mem_lmp_to_send
+	store 2,mem_debuglog_dataval
+	ncall debuglog_push,blank
+endif
+endif
 	
-p_mouse_sensor_powerdown_check:
-	fetch 1,mem_mouse_init_sensor_reset_flag
+	fetch 1,mem_lmp_to_send
 	rtn blank
-	jam 0,mem_mouse_init_sensor_reset_flag
-	branch p_mouse_sensor_powerdown
+	bbit1 7,p_send_lmp_escape
+	beq LMP_ACCEPTED,p_send_lmp_accepted
+	branch send_lmp0
+p_send_lmp_escape:
+	beq LMP_EXT_FEATURES_RES,p_send_lmpext_features_res
+	beq LMP_EXT_FEATURES_REQ,p_send_lmpext_features_req	
+	branch send_lmp_escape
+p_send_lmpext_features_res:
+	call p_check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	branch send_lmpext_features_res
+p_send_lmpext_features_req:
+	call p_check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	branch send_lmpext_features_req
+p_check_ssp_enable:
+	fetch 1,mem_ssp_enable 
+	branch ssp_disable,blank
+	branch ssp_enable
 
+p_sdp_process:
+	call enable_authrom
+	branch sdp_process+1
 
-p_mouse_bb_event_timer:
-ifdef ADC_ENABLE	
-	call p_mouse_adc_read
-	call p_mouse_low_voltage_led_timer
+p_send_lmp_accepted:
+	force 2,pdata
+	call msg_send_lmp
+	fetch 1,mem_lmi_opcode
+	istore 1,contw
+	store 1,mem_lmi_opcode_temp
+	call send_lmp_follow
+ifdef DEBUGLOG
+ifdef DEBUGLOG_MISC
+	setarg DEBUGLOG_DTYPE_MISC
+	store 2,mem_debuglog_datatype
+	fetch 1,mem_lmi_opcode_temp
+	store 1,mem_debuglog_dataval
+	call debuglog_push	
 endif
-	call p_mouse_wheel_trigger_timer
-	call p_mouse_null_enter_hibernate_timer
-	call p_mouse_dpi_led_blink_delay_timer
-	call p_mouse_bt_discovery_check
-	call mouse_check_discovery_timeout_timer
-ifdef BLE	
-	call mouse_check_direct_timeout_timer
-	call p_mouse_le_enable_att_list_timer
-	call p_mouse_le_send_smp_security_request_timer
 endif
-ifdef CLASSIC_BT
-	call p_mouse_send_switch_req_timer
-	call mouse_check_hid_handshake_timer
-	call p_mouse_bt_check_sniff_req_timeout_timer
+	fetch 1,mem_lmi_opcode_temp
+	branch send_lmp_accepted+7
+ifdef DEBUGLOG
+p_parse_lmp_opcode:
+ifdef DEBUGLOG
+ifdef DEBUGLOG_PARSE_LMP
+	setarg DEBUGLOG_DTYPE_PARSE_LMP
+	store 2,mem_debuglog_datatype
+//	fetch 1,mem_rxbuf+1
+//	store 1,mem_debuglog_dataval+1 
+//	fetch 1,mem_lmi_opcode2
+//	store 1,mem_debuglog_dataval
+	fetch 1,mem_lmi_opcode2
+	store 2,mem_debuglog_dataval
+	call debuglog_push 
 endif
-	branch mouse_check_no_data_timeout_timer
-
-ifdef CLASSIC_BT
-p_mouse_send_switch_req_timer:
-	arg mem_mouse_send_switch_req_timer,regc
-	arg host_create_conn_resend,regb
-	branch timer_single_step
-
-p_mouse_bt_check_sniff_req_timeout_timer:
-	arg mem_mouse_bt_send_first_package_timer,regc
-	arg p_mouse_bt_send_first_package,regb
-	branch timer_single_step
-p_mouse_bt_send_first_package:
-	jam 1,mem_mouse_bt_send_first_package_flag
-	rtn
 endif
+	branch parse_lmp+21
 
+p_process_conn_sm:
+	//nrtn master
+	call lmo_fifo_check
+	nrtn blank
+p_process_conn_sm_continue:
+	fetch 1,mem_conn_sm
+	rtn blank
+ifdef DEBUGLOG
+ifdef DEBUGLOG_CONN_SM
+	call pdata_push
+	setarg DEBUGLOG_DTYPE_CONN_SM
+	store 2,mem_debuglog_datatype
+	fetch 1,mem_conn_sm
+	store 2,mem_debuglog_dataval
+	call pdata_pull
+	call debuglog_push	
+endif
+endif
+	beq CONN_SM_SEND_CONN_REQ, p_host_create_conn_send_conn_req
+	branch process_conn_sm_continue+2
 
-ifdef BLE
-p_mouse_le_enable_att_list_timer:
-	arg mem_le_start_encrypt_timer,regc
-	arg mouse_le_write_enable,regb
-	branch timer_single_step
+p_host_create_conn_send_conn_req:
+	jam 20,mem_mouse_send_switch_req_timer
+	branch host_create_conn_send_conn_req	
 
-p_mouse_le_send_smp_security_request_timer:
-	fetch 1,mem_mouse_le_bb_connected_flag
+p_process_upper_sm_reconn:
+	fetch 1,mem_upper_sm_reconn
 	rtn blank
-	arg mem_mouse_send_secutiry_request_timer,regc
-	arg p_mouse_le_pairing_sm_start_check,regb
-	branch timer_single_step
-p_mouse_le_pairing_sm_start_check:
-	fetch 1,mem_le_send_security_request_flag
-	nrtn blank
-	branch le_pairing_sm_start
-
+ifdef DEBUGLOG
+ifdef DEBUGLOG_UPPER_SM
+	call pdata_push
+	setarg DEBUGLOG_DTYPE_UPPER_SM
+	store 2,mem_debuglog_datatype
+	fetch 1,mem_upper_sm_reconn
+	store 2,mem_debuglog_dataval
+	call pdata_pull
+	call debuglog_push	
 endif
+endif
+	branch process_upper_sm_reconn+3
 
-p_mouse_wheel_trigger_timer:
-	arg mem_mouse_wheel_trigger_timer,regc
-	arg p_mouse_wheel_trigger_disable,regb
-	branch timer_single_step
-p_mouse_wheel_trigger_disable:
-	jam 0,mem_mouse_wheel_trigger
-	rtn
-
-p_mouse_bt_discovery_check:
-	fetch 1,mem_config_function_enable
-	bbit1 ENABLE_BT_BUTTON,mouse_bt_discovery_by_button
-p_mouse_bt_discovery_commbination_key:
-	call mouse_check_key_gpio
-	beq MOUSE_RM_BUTTON,p_mouse_bt_discovery_commbination_key_down
-p_mouse_bt_discovery_commbination_key_up:
-	fetch 1,mem_ui_button_timeout
-	store 1,mem_combination_ui_button_count	//combination key timer init 
-	fetch 1,mem_bt_discovey_button_statue
-	rtneq DPI_BUTTON_STATE_UP
-	jam DPI_BUTTON_STATE_UP,mem_bt_discovey_button_statue
-	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
-	call mouse_disable_function_flag
-	branch mouse_bt_discovery_button_down_disable
-p_mouse_bt_discovery_commbination_key_down:
-	jam 40,mem_mouse_null_enter_hibernate_timer
-	call p_mouse_bt_discovery_timer
-	branch mouse_bt_discovery_commbination_key_down+1
+endif	
 
-p_mouse_bt_discovery_timer:
-	arg mem_combination_ui_button_count,regc
-	arg p_mouse_long_button_bt_discovery,regb
-	branch timer_single_step
+endif
 	
-p_mouse_long_button_bt_discovery:
-	fetch 2,mem_ui_state_map
-	isolate1 UI_STATE_BLE_ADV,pdata
-	call mouse_stop_le_adv,true		//reconnect adv
-	fetch 2,mem_ui_state_map
-	isolate1 UI_STATE_BT_RECONNECT,pdata
-	call mouse_cancel_reconnect,true
-	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
-	call mouse_enable_function_flag
-	branch mouse_long_button_bt_discovry
-
-p_mouse_null_enter_hibernate_timer:
-	fetch 1,mem_mouse_null_enter_hibernate_flag
-	rtn blank
-	fetch 1,mem_mouse_null_enter_hibernate_timer
-	branch p_mouse_null_enter_hibernate,blank
-	increase -1,pdata
-	store 1,mem_mouse_null_enter_hibernate_timer
-	rtn
-p_mouse_null_enter_hibernate:
-	jam 0,mem_mouse_null_enter_hibernate_flag
-	branch app_enter_hibernate
-p_mouse_null_enter_hibernate_enable:	//ble never connected
-	jam 1,mem_mouse_null_enter_hibernate_flag
-	jam 40,mem_mouse_null_enter_hibernate_timer	//lmr 3s
-	rtn	
+ifdef DEBUGLOG
+p_ui_ipc_send_event:
+ifdef DEBUGLOG
+ifdef DEBUGLOG_EVENT
+	call pdata_push
+	setarg DEBUGLOG_DTYPE_EVENT
+	store 2,mem_debuglog_datatype
+	fetch 1,mem_fifo_temp
+	store 2,mem_debuglog_dataval
+	call pdata_pull
+	call debuglog_push	
+endif
+endif
+	branch ui_ipc_send_event+1
 
+p_ui_ipc_send_cmd:
+ifdef DEBUGLOG
+ifdef DEBUGLOG_CMD
+	call pdata_push
+	setarg DEBUGLOG_DTYPE_CMD
+	store 2,mem_debuglog_datatype
+	fetch 1,mem_fifo_temp
+	store 2,mem_debuglog_dataval
+	call pdata_pull
+	call debuglog_push
+endif
+endif
+	branch ui_ipc_send_cmd+1
+endif
 	
-ifdef ADC_ENABLE
-p_mouse_adc_read:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit0 MOUSE_ENABLE_ADC
-	fetch 1,mem_adc_read_timer
-	increase 1,pdata
-	store 1,mem_adc_read_timer
-	sub pdata,10,null              //1s read adc
-	rtn positive
-	jam 0,mem_adc_read_timer
-	call p_adc_set_mode
-	call vdd_calculate_by_mode
-	store 2,mem_mouse_vdd_now_vol
-	arg mem_mouse_vdd_calculate_set,rega
-	call p_adc_bat_percent_lowpower_out
-	fetch 1,mem_adc_power_flag
-	bbit1 1,app_enter_hibernate
-	bbit0 0,p_mouse_adc_no_low_voltage
-	jam 1,mem_mouse_adc_last_low_voltage_flag
-	branch mouse_adc_low_voltage
-p_mouse_adc_no_low_voltage:
-	call mouse_adc_no_low_voltage
-	fetch 1,mem_mouse_adc_last_low_voltage_flag
-	rtn blank
-	jam 0,mem_mouse_adc_last_low_voltage_flag
-	branch mouse_devce1_led_off
-	
-p_adc_set_mode:
-	fetch 1,mem_adc_config_flag
-	beq ADC_CONFIG_GPIO,p_adc_check_gpio
-	branch adc_set_mode+1
-p_adc_check_gpio:
-	hfetch 1,core_gpio_pu0	//gpio5 pull up disable
-	set0 5,pdata
-	hstore 1,core_gpio_pu0
-	call adc_check_gpio
-	hfetch 1,core_gpio_pu0	//gpio5 pull up enable
-	set1 5,pdata
-	hstore 1,core_gpio_pu0
+p_g24_set_device_addr:
+	call adc_init_data
+//	fetch 4,mem_0_5_adc_io_data	//adc data from otp
+//	store 4,mem_24g_device_addr	
+//	nrtn blank
+	fetch 4,mem_lap
+	store 4,mem_24g_device_addr
 	rtn
 
-p_adc_bat_percent_lowpower_out:
-	ifetch 8,rega
-	store 8,mem_pdatatemp
-	fetcht 2,mem_pdatatemp+2	//shutdown voltage 0.9v
-	fetch 2,mem_pdatatemp+6		//now voltage
-	lshift pdata,pdata			//partial pressure, now voltage*2
-	pincrease 8
-	isub temp,null
-	nbranch adc_set_no_power_flag,positive
-	fetcht 2,mem_pdatatemp+4	//low voltage 1.0v
-	isub temp,null
-	nbranch adc_set_low_power_flag,positive
-p_adc_clear_low_power_flag:
-	fetch 1,mem_adc_power_flag
-	set0 0,pdata
-	store 1,mem_adc_power_flag
+
+p_g24_transmit_rf_sta_init:
+	jam 1,mem_24g_rf_last_sta
+	jam 0,mem_24g_sync_cnt
+p_g24_transmit_rf_ctrl_clear:	
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_data_type
+	rtn
+	
+p_g24_hop_ch_enable:
+	fetch 1,mem_24g_data_type
+	set1 bit_hop,pdata
+	store 1,mem_24g_data_type
+	//update txpayload
+	store 1,mem_24g_txpayload
+	rtn
+p_g24_hop_ch_disable:
+	fetch 1,mem_24g_data_type
+	set0 bit_hop,pdata
+	store 1,mem_24g_data_type
 	rtn	
 
-p_mouse_low_voltage_led_timer:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
-	fetch 2,mem_ui_state_map
-	rtnbit1 UI_STATE_BLE_ADV
-	rtnbit1 UI_STATE_BT_DISCOVERY
-	fetch 1,mem_adc_low_volatage_led_timer_count
-	pincrease 1
-	store 1,mem_adc_low_volatage_led_timer_count
-	beq 3,mouse_devce1_led_off
-	sub pdata,20,null
-	nbranch p_mouse_device1_led_on,positive
+p_g24_transmit_hop_pac_fail:
+	call power_ctrl_pac_succ_decrs
+	fetch 1,mem_24g_rf_work_stage
+	beq 1,p_g24_transmit_hop_pac_fail_wo_hop
+	beq 2,p_g24_transmit_hop_pac_fail_hop_stage2
 	rtn
-p_mouse_device1_led_on:
-	jam 1,mem_adc_low_volatage_led_timer_count
-	branch mouse_device1_led_on
+p_g24_transmit_hop_pac_fail_wo_hop:
+	jam 2,mem_24g_sync_cnt
+p_g24_transmit_hop_pac_fail_stage1:	
+	jam 0,mem_24g_hop_pac_retry
+	jam 0,mem_24g_rf_last_sta
+	branch p_g24_transmit_rf_ctrl_clear
 
-endif
+p_g24_transmit_hop_pac_fail_hop_stage2:
+	jam 0,mem_24g_rf_hop_ch
+	branch p_g24_transmit_hop_pac_fail_stage1
 
-p_mouse_dpi_led_blink_delay_timer:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit0 MOUSE_ENABLE_DPI_LED_BLINK
-	arg mem_mouse_dpi_led_delay_count,regc
-	arg p_mouse_dpi_led_setting,regb
-	branch timer_single_step	
+	
+p_g24_transmit_pac_fail_hop_stage3:
+	fetch 2,mem_24g_txfail_cnt
+	increase 1,pdata
+	store 2,mem_24g_txfail_cnt
+	bbit1 10,p_g24_tx_attempt_fail	//1024ms * 8
+	fetch 1,mem_24g_rf_hop_ch
+	beq 1,p_g24_rf_hop_fastly
+	jam 1,mem_24g_rf_hop_ch
+p_g24_rf_hop_attemp_again:
+	fetch 1,mem_24g_rf_hop_ch
+	bne 1,p_g24_transmit_rf_ctrl_clear
+p_g24_rf_hop_fastly:
+	fetch 1,mem_24g_hop_fastly_cnt
+	increase 1,pdata
+	store 1,mem_24g_hop_fastly_cnt
+	beq 4,p_g24_rf_hop_fastly_exit
+	call p_g24_ch
+	jam 2,mem_24g_max_retry
+	branch p_g24_transmit_packet
 
-p_mouse_dpi_led_setting:
-	fetch 1,mem_dpi_led_gpio
-	store 1,mem_mouse_struct_led_gpio
-	setarg LED_DPI_BLINK_FIXED
-	store 2,mem_mouse_on_time
-	store 2,mem_mouse_off_time
-	arg 0,rega
-	fetcht 1,mem_mouse_dpi
-	//increase 1,temp
-	storet 1,mem_mouse_blink_count
-	jam UI_LED_STATE_BLINK_START,mem_mouse_led_type
+p_g24_rf_hop_fastly_exit:
+	call power_ctrl_pac_succ_decrs
+	jam 0,mem_24g_hop_fastly_cnt
+	branch p_g24_transmit_rf_ctrl_clear
+
+p_g24_transmit_hop_pac_succ_wo_hop:
+	jam 2,mem_24g_sync_cnt
+p_g24_transmit_hop_pac_succ:
+	jam 1,mem_24g_rf_last_sta
+	jam 0,mem_24g_rf_hop_ch
+	branch p_g24_transmit_rf_ctrl_clear
+
+p_g24_transmit_succ_rf_config:
+	fetch 1,mem_24g_rf_work_stage
+	beq 3,p_g24_transmit_hop_pac_succ
+	fetch 1,mem_24g_data_type
+	isolate0 bit_hop,pdata
+	branch p_g24_transmit_rf_sta_init,true
+	fetch 1,mem_24g_rf_work_stage
+	beq 1,p_g24_transmit_hop_pac_succ_wo_hop
+	beq 2,p_g24_transmit_hop_pac_succ
 	rtn
 
-p_mouse_seting_dpi:
-	call p_mosue_dpi_led_blink_init
-p_mouse_seting_sensor_type:
-	fetch 1,mem_config_sensor_type
-	beq P3212,p_mouse_seting_3212_dpi
-	beq P3065_XY,p_mouse_seting_3065XY_dpi
-	beq MX8650,p_mouse_seting_3065XY_dpi
-	beq KA8,p_mouse_seting_ka8_dpi
-p_mouse_seting_3205_dpi:
-	fetch 1,mem_mouse_dpi
-	sub pdata,MOUSE_DPI_LEVEL2,null
-	call p_mouse_3205_dpi_recount,zero
-	fetch 1,mem_mouse_dpi
-	beq MOUSE_DPI_LEVEL1,mouse_set_cpi1
-	beq MOUSE_DPI_LEVEL4,mouse_set_cpi4
-	branch mouse_set_cpi3
-p_mouse_3205_dpi_recount:
-	jam MOUSE_DPI_LEVEL3,mem_mouse_dpi
+p_g24_rf_sta_check:
+	fetch 1,mem_24g_pairing_sm
+	rtnne STATE_24G_PAIRING_SUCCESS
+	call p_g24_rf_laststa_synccnt_check
+	ncall p_g24_rf_sync_cnt_check,user2
 	rtn
 
-p_mouse_seting_3065XY_dpi:
-	fetch 1,mem_mouse_dpi
-	sub pdata,MOUSE_DPI_LEVEL2,null
-	call p_mouse_3205_dpi_recount,zero
-	fetch 1,mem_mouse_dpi
-	beq MOUSE_DPI_LEVEL1,p_mouse_3065xy_set_cpi1
-	beq MOUSE_DPI_LEVEL4,p_mouse_3065xy_set_cpi4
-p_mouse_3065xy_set_cpi3:
-	fetch 1,mem_320x_dpi_3
-	increase -1,pdata
-p_mouse_dpi_store:
-	store 1,mem_mouse_cpi_count
-	branch mouse_p3205_dpi+3
-p_mouse_3065xy_set_cpi1:
-	fetch 1,mem_320x_dpi_1
-	increase -1,pdata
-	branch p_mouse_dpi_store
-p_mouse_3065xy_set_cpi4:
-	fetch 1,mem_320x_dpi_4
+p_g24_rf_laststa_synccnt_check:
+	disable user2
+	fetch 1,mem_24g_rf_last_sta
+	rtnne 1
+	fetch 1,mem_24g_sync_cnt
+	rtnne 0
+	jam 1,mem_24g_rf_work_stage
+	jam 4,mem_24g_max_retry
+	branch enable_user2
+
+p_g24_rf_sync_cnt_check:
+	fetch 1,mem_24g_sync_cnt
+	branch p_g24_rf_hop_attemp,blank
 	increase -1,pdata
-	branch p_mouse_dpi_store
+	store 1,mem_24g_sync_cnt
+	jam 2,mem_24g_rf_work_stage
+	call p_g24_ch
+	jam 4,mem_24g_max_retry
+	rtn
 
-p_mouse_seting_3212_dpi:
-	fetch 1,mem_mouse_dpi
-	sub pdata,MOUSE_DPI_LEVEL2,null
-	call p_mouse_3205_dpi_recount,zero
-	fetch 1,mem_mouse_dpi
-	beq MOUSE_DPI_LEVEL1,mouse_set_p3212_cpi1
-	beq MOUSE_DPI_LEVEL4,mouse_set_p3212_cpi4
-	branch mouse_set_p3212_cpi3
+p_g24_rf_hop_attemp:
+	jam 3,mem_24g_rf_work_stage
+	fetch 1,mem_24g_rf_hop_ch
+	nbranch p_g24_rf_hop_attemp_again,blank
+	call p_g24_ch
+	jam 2,mem_24g_max_retry
+	rtn
 
-p_mouse_seting_ka8_dpi:
-	fetch 1,mem_mouse_dpi
-	call p_mouse_3205_dpi_recount,blank
-	fetch 1,mem_mouse_dpi
-	beq MOUSE_DPI_LEVEL2,mouse_set_cpi2			//800
-	beq MOUSE_DPI_LEVEL4,p_mouse_ka8_set_cpi3		//1600
-	branch mouse_set_cpi4							//1200
-p_mouse_ka8_set_cpi3:	
-	setarg 5
-	branch mouse_p3205_dpi
+p_g24_txdata_prep:
+	fetch 1,mem_24g_pairing_sm
+	bne STATE_24G_PAIRING_SUCCESS,p_g24_pairing_sm	
+p_g24_txdata_prep_packeage_data:
+	call p_g24_package_data
+	call p_g24_transmit_prep
+p_g24_txdata_enable_tx:
+	jam ENSURE_ON_24G,mem_24g_ensure
+	rtn
 
-p_mosue_dpi_led_blink_init:
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	rtnbit0 MOUSE_ENABLE_DPI_LED_BLINK
-	jam 1,mem_mouse_dpi_led_delay_count  //delay 1s led blink
-	fetch 1,mem_dpi_led_gpio
-	store 1,mem_mouse_struct_led_gpio
+p_g24_package_data:
+	fetch 2,mem_cb_24g_data
+	call callback_func
+	branch p_g24_accumulate_mouse_data,user
+	fetch 7,mem_24g_txbuf+1	//mouse data
+	rtn blank
+	branch enable_user	// retransmit
+p_g24_accumulate_mouse_data:
+	jam 0,mem_24g_abort_pac
+	add rega,1,pdata
+	store 1,mem_24g_datalen
+	call p_g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	ifetcht 1,contw
+	ifetch 1,regb
+	ior temp,pdata
+	istore 1,contw
+	increase 1,regb
+	arg 2,loopcnt
+p_g24_accumulation_loop:
+	ifetch 2,regb
+//	ifetcht 2,contw
+//	iadd temp,pdata
+	istore 2,contw
+	increase 2,regb
+	loop p_g24_accumulation_loop
+	arg mem_24g_txbuf+6,contw
+	arg 2,loopcnt
+p_g24_accumulation_loop2:
+	ifetch 1,regb
+	ifetcht 1,contw
+	iadd temp,pdata
+	istore 1,contw
+	increase 1,regb
+	loop p_g24_accumulation_loop2
 	rtn
 
-p_mouse_motion:
-	disable user
+p_g24_transmit_packet:
+	jam 0,mem_24g_retry
+p_g24_transmit_loop:
+	arg param_rx_setup,timeup
+	until clkn_rt,meet
+	call p_g24_transmit_receive_ack
+	fetch 1,mem_24g_no_ack	//tx noack
+	rtneq no_ack_24g
+	nbranch p_g24_retransmit,sync
+	nbranch p_g24_retransmit,user3
+	call p_g24_txbuf_clear
+	call p_g24_ackpayload_parse
+	call power_ctrl_pac_succ_incrs
+p_g24_transmit_next_packet:
+	fetch 1,mem_24g_pid
+	increase 1,pdata
+	store 1,mem_24g_pid
+	fetch 1,mem_24g_pairing_sm
+	bne STATE_24G_PAIRING_SUCCESS,p_g24_paring_mode_start
+	call p_g24_transmit_succ_rf_config
+p_g24_transmit_abandon:
 	setarg 0
-	store 6,mem_mouse_x
-	call mouse_cheak_sensor_data
-	call mouse_zwheel
-	call mouse_t_zwheel
-	call mouse_key
-ifdef MOUSE_SMOOTHER	
-	nbranch p_drawing_optima_init,user
-	call p_drawing_optima
-else
-	nrtn user
-endif
-	branch mouse_motion+9
-
-p_mouse_bb_event_discovery_btn:
-	jam 0,mem_mouse_null_enter_hibernate_flag
-	jam 0,mem_mouse_null_enter_hibernate_timer
-ifdef G24	
-	isolate1 mark_24g,mark
-	call p_g24_check_51cmd_stop_24g,true
-endif
-	branch mouse_bb_event_discovery_btn+1
+	store 2,mem_24g_txfail_cnt
+	store 1,mem_24g_get_ack_fail
+	store 1,mem_24g_hop_pac_retry
+	jam ENSURE_OFF_24G,mem_24g_ensure
+	rtn
 
-ifdef BLE
-p_le_addr_random_config:
-	call load_adc_init
-	fetch 2,mem_0_5_adc_io_data	//adc data from otp
-	branch p_le_otp_adc_empty,blank
-	store 2,mem_random_addr_increase_count
-p_le_addr_random_store:
-	branch p_mouse_store_eerpom_random_addr_increase_count
-p_le_otp_adc_empty:
-	setarg 0x1122
-	store 2,mem_random_addr_increase_count
-	branch p_le_addr_random_store
+p_g24_txbuf_clear:
+	arg 4,loopcnt
+	arg mem_24g_txbuf,contw
+	branch memset0
 
-p_mouse_store_eerpom_random_addr_increase_count:
-	arg 2,temp
-	arg mem_random_addr_increase_count,rega
-	arg MOUSE_RANDOM_ADDR_COUNT_EEPROM_OFFSET,regb
-	branch iicd_write_protect_eep_data
-p_mouse_load_eeprom_random_addr_increase_count:
-	arg 2,temp
-	arg mem_random_addr_increase_count,rega
-	arg MOUSE_RANDOM_ADDR_COUNT_EEPROM_OFFSET,regb
-	branch iicd_read_eep_data
+p_g24_paring_mode_start:
+	call power_ctrl_pac_succ_cnt_init
+	branch p_g24_paring_mode
 
+p_g24_transmit_receive_ack:
+	disable user3
+	call p_g24_transmit
+	
+ifdef RF_DEBUG
+	call test_gpio_low
 endif
 
-p_mouse_start_discovery:
-	jam 0,mem_le_send_security_request_flag
-	jam 0,mem_mouse_clear_sensor_data_flag
-	call p_mouse_tx_power_init	
-	fetch 2,mem_ui_state_map
-	bbit1 UI_STATE_BLE_ADV,p_mouse_start_discovery_norandom
-	fetch MOUSE_FLAG_LEN,mem_mouse_flag
-	bbit0 MOUSE_ENABLE_BLE_RANDOM_ADDRE,p_mouse_start_discovery_norandom
-ifdef BLE
-	call p_mouse_load_eeprom_random_addr_increase_count
-	fetcht 2,mem_random_addr_increase_count
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,p_g24_transmit_no_ack	//tx no ack
+	force 0,radio_ctrl
+	fetch 4,mem_24g_addr
+	iforce access
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	call p_g24_receive_rxon
+	call p_g24_end_of_packet,user3
+	rtn
+p_g24_transmit_no_ack:
+	call p_g24_end_of_packet
+	branch p_g24_transmit_next_packet
+
+p_g24_retransmit:
+	fetch 1,mem_24g_get_ack_fail
+	increase 1,pdata
+	store 1,mem_24g_get_ack_fail
+	fetch 1,mem_24g_pairing_sm
+	bne STATE_24G_PAIRING_SUCCESS,p_g24_tx_paring_retry
+	fetcht 1,mem_24g_retry
 	increase 1,temp
-	storet 2,mem_random_addr_increase_count
-	storet 2,mem_le_lap+1
-	call p_mouse_store_eerpom_random_addr_increase_count
-	random pdata
-	store 1,mem_le_lap
-endif
-p_mouse_start_discovery_norandom:
-ifdef BLE_FAST_CONN_ENABLE
-	call app_ble_disconnect
-	setarg 0xed8e0e
-	store 3,mem_le_lap+3
-	jam 0x5a,mem_mouse_fast_conn_flag
-	call p_mouse_store_fast_conn_flag
-endif
-	call app_lpm_mult_disable
-	fetch 2,mem_discovery_timeout
-	store 2,mem_mouse_discovery_timer
-	jam 6,mem_connection_options
-	setarg 0
-	store 2,mem_mouse_no_data_timer
-	store 2,mem_mouse_direct_timer
-	arg MOUSE_STORE_EEPROM_FLAG,queue
-	call mouse_enable_function_flag
-	call mouse_bt_discovery_button_down_disable
-	fetch 1,mem_device_option
-	isolate1 MODE_4_MOUSE,pdata
-	call p_check_51cmd_adv,true
-	branch mouse_start_discovery_norandom+13
+	storet 1,mem_24g_retry
+	fetch 1,mem_24g_max_retry
+	isub temp,pdata
+	nbranch p_g24_transmit_loop,blank
+	fetch 1,mem_24g_rf_work_stage
+	beq 3,p_g24_transmit_pac_fail_hop_stage3
+	fetch 1,mem_24g_hop_pac_retry
+	increase 1,pdata
+	store 1,mem_24g_hop_pac_retry
+	beq 2,p_g24_transmit_hop_pac_fail
+	call p_g24_hop_ch_enable
+	jam 1,mem_24g_max_retry
+	branch p_g24_transmit_packet
 
-p_check_51cmd_adv:
-	jam 0,mem_mouse_le_reconnect_flag
-	call p_le_check_adv_flag
-	setarg ADV_FLAG_BREDR_NOT_SUPPORTED |ADV_FLAG_LIMITED_DISCOVERABLE
-	istore 1,contr
-	branch check_51cmd_adv
+p_g24_tx_paring_retry:
+	fetch 1,mem_24g_get_ack_fail
+	rtnne 0xff
+	jam 0,mem_24g_get_ack_fail
+	branch p_g24_stop_g24_mode
 
-p_mouse_stop_discovery:
+p_g24_tx_attempt_fail:
 	setarg 0
-	store 2,mem_mouse_discovery_timer
-	jam 1,mem_mouse_init_sensor_reset_flag
-	call p_mouse_sensor_poweron		//clear sensor data,confirm the motion pin high
-	branch mouse_stop_discovery+1
+	store 2,mem_24g_txfail_cnt
+p_g24_stop_g24_mode:
+	jam BT_EVT_24G_ATTEMPT_FAIL,mem_fifo_temp
+	branch ui_ipc_send_event
 
-ifdef BLE
-p_le_slave_match:
-	fetch 1,mem_le_md_count
-	pincrease 1
-	store 1,mem_le_md_count
-	beq LE_MD_MAX_COUNT,le_slave_cont
-	call le_acknowledge
-	call le_prepare_tx
-	call power_ctrl_start
-	branch le_slave_match+7
+p_g24_ackpayload_parse:
+	call p_g24_read_len_pid_crc
+	fetch 1,mem_24g_rxdata_length	//ack payload length 
+	rtn blank
+	iforce loopcnt
+	arg mem_24g_rxbuf+2,contr
+	arg mem_24g_rxpayload,contw	//ack payload buffer 
+	branch memcpy
 
-p_le_next_adv_channel:
-	fetch 1,mem_le_ch_mapped
+power_ctrl_pac_succ_cnt_init:
+	jam 1,mem_power_ctrl_level
+	jam 0,mem_power_ctrl_pac_succ_cnt
+	rtn
+power_ctrl_pac_succ_incrs:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
 	increase 1,pdata
-	store 1,mem_le_ch_mapped
-	rtnne 40
-	jam 37,mem_le_ch_mapped
+	store 1,mem_power_ctrl_pac_succ_cnt
 	rtn
-
-p_le_receive_skip:
-	call save_rssi
-	call p_rssi_signal
-	branch le_receive_skip+2
-
-p_le_update_param:
-	call p_mouse_le_conn_param_check
-	branch le_update_param+8
-p_mouse_le_lpm_mult_reinit:
-	fetch 1,mem_lpm_mult_init
-	store 1,mem_lpm_mult
-p_mouse_le_conn_param_lpm_enable:
-	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+power_ctrl_pac_succ_decrs:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	sub pdata,2,null
+	ncall power_ctrl_pac_succ_cnt_reinit,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	rtneq 0
+	increase -1,pdata
+	store 1,mem_power_ctrl_pac_succ_cnt
+	rtn
+power_ctrl_pac_succ_cnt_reinit:
+	jam 3,mem_power_ctrl_pac_succ_cnt
 	rtn
 
-p_mouse_le_conn_param_check:
-	fetch 1,mem_le_new_conninterval
-	sub pdata,LE_INTERVAL_15MS,null
-	nbranch p_mouse_le_conn_param_lpm_disable,positive
-	fetch 1,mem_le_new_connslavelatency
-	fetcht 1,mem_lpm_mult_init
-	isub temp,null
-	branch p_mouse_le_lpm_mult_reinit,positive
-	fetch 1,mem_le_new_connslavelatency
-	store 1,mem_lpm_mult
-	branch p_mouse_le_conn_param_lpm_enable
-
-p_le_update_channel_map:
-	fetch 1,mem_le_state
-	rtnbit0 lestate_update_map
-	call p_le_channel_map_overflow_check
-	nrtn user
-	branch le_update_channel_map+3
-p_le_channel_map_overflow_check:
-	enable user
-	fetch 1,mem_le_event_count+1
-	rshift4 pdata,pdata
-	rtnne 0x0f
-	fetch 1,mem_le_instant+1
-	rshift4 pdata,pdata
-	rtnne 0x00
-	branch disable_user
-
-p_le_prepare_tx:
-	fetch 1,mem_le_arq
-	bbit1 wak,p_le_prepare_tx_wak
-	call power_ctrl_pac_succ_incrs	
-	fetch 1,mem_empty_count
-	nbranch p_le_send_empyt,blank
-	fetch 1,mem_le_state 
-	bbit0 lestate_encryption,p_le_tx_4
-	fetch 1,mem_le_rxbuf+1  
-	branch p_le_tx_4,blank  
-	branch le_send_empty      // send empty data when got non empty packet
-p_le_send_empyt:
-	fetch 1,mem_empty_count
-	increase -1,pdata
-	store 1,mem_empty_count
-	branch le_send_empty
-p_le_tx_4:	
-	fetch 1,mem_le_pairing_state
-	bne FLAG_LE_PAIRING_AFTER_AUTH,p_in_le_tx_4
-	jam 3,mem_empty_count
-p_in_le_tx_4:
-	call le_fifo_check_nearly_full
-	call p_mouse_data_pull,blank
-	branch le_prepare_tx+4
+power_ctrl_start:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
 
-p_le_prepare_tx_wak:
-	call p_le_check_tx_retransmit_setmd
-	branch p_le_power_ctrl_pac_succ_decrs
+	arg mem_rssi_signal_buf,rega
+	call p_rssi_average
+	storet 1,mem_rssi_avg_received
 
-p_le_check_tx_retransmit_setmd:
-	fetch 1,mem_le_connect_status_flag
-	and pdata,0x03,pdata
-	rtnne 0x03
-	fetch 1,mem_mouse_data_queue_num
-	rtn blank
-	fetch 1,mem_le_txlen
-	rtn blank
-	fetch 1,mem_le_txheader
-	set1 md,pdata
-	store 1,mem_le_txheader
-	call le_set_md
 ifdef DEBUGLOG
 ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_LE_RETRANSMIT_MD
-	store 2,mem_debuglog_dataval
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	store 1,mem_debuglog_dataval
+	fetch 1,mem_rssi_avg_received
+	store 1,mem_debuglog_dataval+1
 	call debuglog_push	
 endif
 endif
+	
+	isolate1 mark_24g,mark
+	call power_ctrl_24g_dis_max,true
+	ncall power_ctrl_le_dis_max,true
+	isub temp,null
+	nbranch power_ctrl_txpower_incrs_force,positive
+
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	sub pdata,2,null
+	nbranch power_ctrl_txpower_decrs_check,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	beq 0,power_ctrl_txpower_incrs
 	rtn
 
-p_le_power_ctrl_pac_succ_decrs:
+power_ctrl_24g_dis_max:
+	setarg RSSI_DIS_MAX_24G
+	rtn
+power_ctrl_24g_dis_min:
+	setarg RSSI_DIS_MIN_24G
+	rtn	
+power_ctrl_le_dis_max:
+	setarg RSSI_DIS_MAX_BLE
+	rtn
+power_ctrl_le_dis_min:
+	setarg RSSI_DIS_MIN_BLE
+	rtn
+	
+power_ctrl_txpower_decrs_check:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	rtnne 32
+	jam 0,mem_power_ctrl_pac_succ_cnt
+power_ctrl_txpower_decrs:
+	fetcht 1,mem_rssi_avg_received
+	isolate1 mark_24g,mark
+	call power_ctrl_24g_dis_min,true
+	ncall power_ctrl_le_dis_min,true
+	isub temp,null
+	nrtn positive
+	fetch 1,mem_power_ctrl_level
+	beq 0,power_ctrl_decrs_level0
+	increase -1,pdata
+	store 1,mem_power_ctrl_level
+	beq 0,power_ctrl_decrs_level0
+power_ctrl_decrs_level1:
+power_ctrl_incrs_level1:	//0dBm
 ifdef DEBUGLOG
 ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_LE_RETRANSMIT
+	setarg MISC_TXPOWER_1
 	store 2,mem_debuglog_dataval
-	call debuglog_push	
+	call debuglog_push
 endif
 endif
-	branch power_ctrl_pac_succ_decrs
+	jam TX_POWER_0DB,mem_tx_power
+	rtn
 
-p_mouse_le_reconn_write_enable_timer_reinit:
-	fetch 1,mem_mouse_le_reconnect_flag
-	rtn blank
-	fetch 1,mem_le_connect_status_flag
-	and pdata,0x03,pdata
-	rtneq 0x03
-	jam 10,mem_le_start_encrypt_timer
+power_ctrl_txpower_incrs_force:
+	jam 0,mem_power_ctrl_pac_succ_cnt
+power_ctrl_txpower_incrs:
+	fetch 1,mem_power_ctrl_level
+	beq 2,power_ctrl_incrs_level2
+	increase 1,pdata
+	store 1,mem_power_ctrl_level
+	beq 1,power_ctrl_incrs_level1
+power_ctrl_incrs_level2:	//+6dBm
+ifdef DEBUGLOG
+ifdef DEBUGLOG_MISC
+	setarg DEBUGLOG_DTYPE_MISC
+	store 2,mem_debuglog_datatype
+	setarg MISC_TXPOWER_2
+	store 2,mem_debuglog_dataval
+	call debuglog_push
+endif
+endif
+
+	jam TX_POWER_5DB,mem_tx_power
 	rtn
+	
+power_ctrl_decrs_level0: //-5dBm
+ifdef DEBUGLOG
+ifdef DEBUGLOG_MISC
+	setarg DEBUGLOG_DTYPE_MISC
+	store 2,mem_debuglog_datatype
+	setarg MISC_TXPOWER_0
+	store 2,mem_debuglog_dataval
+	call debuglog_push
+endif
+endif
 
-p_le_parse:
-	rtnmark1 mark_old_packet
-	call le_fifo_check_full
-	nrtn blank
-	fetch 1,mem_le_rxbuf
-	and pdata,0x3,pdata
-	store 1,mem_le_packet_llid
-	ifetch 1,contr
-	and pdata,0x1f,pdata
-	store 1,mem_le_packet_size
-	rtn blank							//empty rtn
-	copy contr,pdata
-	store 2,mem_le_payload_ptr
-	fetch 1,mem_le_packet_llid
-	beq LLID_LE_LL,p_le_parse_ll
-	branch le_parse_l2cap
-p_le_parse_ll:
-	fetch 1,mem_le_rxbuf+2
-	beq LL_CONNECTION_UPDATE_REQ,p_le_parse_connection_update_req	
-	beq LL_CHANNEL_MAP_REQ,p_le_parse_channel_map_req
-	branch le_parse_ll+1
-p_le_parse_connection_update_req:
-	call le_parse_connection_update_req
-	fetch 1,mem_mouse_le_updata_not_accepted_flag
-	rtn blank
-//ipad not accepted updata, need reinit mem_lpm_mult.   mem_lpm_mult = LL_CONNECTION_UPDATE_REQ latency = 04	
-p_mouse_le_conn_param_update_rsp_not_accepted_mult_reset:	
-	fetch 1,mem_le_new_connslavelatency
-	store 1,mem_lpm_mult
-	store 1,mem_lpm_mult_init
-	rtn	
-p_le_parse_channel_map_req:
-	ifetch 5,contr
-	store 5,mem_le_new_map
-	ifetch 2,contr
-	store 2,mem_le_instant
-	branch le_parse_channel_map_req+7	
+	jam TX_POWER_f5DB,mem_tx_power
+	rtn
 	
-p_le_parse_l2cap:
-	ifetch 2,contr
-	beq LE_L2CAP_CID_ATT,p_le_parse_att
-	beq LE_L2CAP_CID_SMP,p_le_parse_smp
-	branch le_parse_l2cap+11
-p_le_parse_att:
-	call store_contr
-	call p_mouse_le_reconn_write_enable_timer_reinit
-	call get_contr
-	ifetch 3,contr
-	store 3,mem_le_att_opcode
-	beq ATTOP_READ_BY_GROUP_TYPE_REQUEST,p_le_parse_att_read_by_group_type_request
-	rshift8 pdata,temp
-	sub temp,0x24,null
-	branch p_le_parse_att1,positive
-	arg mem_mouse_le_uuid_sup,temp
-	storet 2,mem_ui_le_uuid_table
-	call le_parse_att+2
-	setarg 0x8e7a
-	store 2,mem_ui_le_uuid_table
+p_g24_start_pairing_sm1:
+	set1 mark_24g,mark
+	call p_g24_pair_init
+p_g24_set_pairing_sm_1:
+	jam STATE_24G_PAIRING_1,mem_24g_pairing_sm
 	rtn
 
-p_le_parse_att_read_by_group_type_request:
-	call le_parse_att_read_by_group_type_request
-	call le_fifo_get_last_tx_ptr
-	increase 7,contr
-	ifetch 1,contr
-	rtnne ATTOP_READ_BY_GROUP_TYPE_RESPONSE
-	increase 5,contr
-	ifetch 2,contr
-	arg UUID_SERVICE_HIDS,temp
-	isub temp,null
-	nrtn zero
-	increase -4,contr
-	setarg 0x2b
-	istore 2,contr
+p_g24_pair_init:
+	jam TX_POWER_PAIR,mem_tx_power
+	jam 0,mem_24g_pid
+	jam G24_PAIR_CH,mem_24g_ch
+	fetch 4,mem_24g_paring_addr
+	branch p_g24_update_addr_and_synccrc8
+
+p_g24_pairing_sm:
+	fetch 1,mem_24g_ensure
+	beq ENSURE_ON_24G,enable_user
+	fetch 1,mem_24g_pairing_sm
+	beq STATE_24G_PAIRING_1,p_g24_pairing_sm_1
+	beq STATE_24G_PAIRING_2,p_g24_pairing_sm_2
+	beq STATE_24G_PAIRING_3,p_g24_pairing_sm_3
+	branch assert
+
+p_g24_pairing_sm_1:
+	jam STATE_24G_PAIRING_1_WAITING_ACK,mem_24g_pairing_sm
+	jam 0xaa,mem_24g_common_temp
+	branch p_g24_pairing_sm_common
+p_g24_pairing_sm_2:
+	jam STATE_24G_PAIRING_2_WAITING_ACK,mem_24g_pairing_sm
+	jam 0x55,mem_24g_common_temp
+	branch p_g24_pairing_sm_common
+p_g24_pairing_sm_3:
+	jam STATE_24G_PAIRING_3_WAITING_ACK,mem_24g_pairing_sm
+	jam 0x22,mem_24g_common_temp
+p_g24_pairing_sm_common:
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_common_temp+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_common_temp+2
+p_g24_put_pairing_data_in_buff:
+	jam 0,mem_24g_common_temp+6
+	arg mem_24g_common_temp,rega
+	arg 7,temp
+	call p_g24_put_data_in_buff
+	call p_g24_transmit_prep
+	call p_g24_txdata_enable_tx
+	branch enable_user
+
+p_g24_paring_mode:
+	fetch 1,mem_24g_pairing_sm
+	rtneq STATE_24G_PAIRING_SUCCESS
+	beq STATE_24G_PAIRING_1_WAITING_ACK,p_g24_pairing_sm_1_waiting_ack
+	beq STATE_24G_PAIRING_2_WAITING_ACK,p_g24_pairing_sm_2_waiting_ack
+	beq STATE_24G_PAIRING_3_WAITING_ACK,p_g24_pairing_sm_3_waiting_ack
 	rtn
 
-p_le_parse_att1:
-	beq ATTOP_READ_REQUEST,p_le_parse_att_read_request
-	branch le_parse_att+2
-p_le_parse_att_read_request:
-	fetcht 2,mem_le_att_handle
-	fetch 1,mem_le_configuration
-	bbit1 BIT_BLE_READ_AUTH,p_le_send_att_read_response_check_auth
-p_le_send_att_read_response:
-	call le_att_get_handle_ptr
-	branch le_send_att_error_response_notfound,blank
-	increase -2,contr
-	ifetch 2,contr
-	arg UUID_CHRCTR_PNP_ID,temp
-	isub temp,null
-	branch p_le_send_att_pnp_id,zero
-	
-	fetch 2,mem_le_att_handle
-	beq 0x13,le_send_att_error_response_notfound
 
-	fetcht 2,mem_le_att_handle
-	branch le_send_att_read_response
-p_le_send_att_pnp_id:
-	call store_contr
-	fetch 1,mem_le_att_pnp_id_len
-	add pdata,1,rega
-	call le_fifo_malloc_tx_l2cap_gatt
-	setarg ATTOP_READ_RESPONSE
-	istore 1,contw
-	fetch 1,mem_le_att_pnp_id_len
-	copy pdata,loopcnt
-	arg mem_le_att_pnp_id,contr
-	branch memcpy
+p_g24_pairing_sm_1_waiting_ack:
+	jam STATE_24G_PAIRING_2,mem_24g_pairing_sm
+	branch p_g24_transmit_abandon
+p_g24_pairing_sm_2_waiting_ack:
+	jam STATE_24G_PAIRING_3,mem_24g_pairing_sm
+	branch p_g24_transmit_abandon
+p_g24_pairing_sm_3_waiting_ack:
+	jam STATE_24G_PAIRING_SUCCESS,mem_24g_pairing_sm
+	jam BT_EVT_24G_PAIRING_COMPLETE,mem_fifo_temp
+	call ui_ipc_send_event	
+	fetch 4,mem_24g_rxpayload+2
+	call p_g24_update_addr_and_synccrc8
+	branch p_g24_transmit_abandon
 
-p_le_send_att_read_response_check_auth:
-	fetch 2,mem_le_pairing_handle
-	isub temp,null
-	nbranch p_le_send_att_read_response,zero
-	call le_check_encrypt_state
-	nbranch p_le_send_att_read_response,user
-	jam ATT_ERR_INSUFFICIENT_AUTHENTICATION,mem_le_err_code
-	branch le_send_att_error_response	
+p_g24_start_24g_mode:
+	rtn
+//	set0 mark_24g,mark
+//	call p_g24_ch_syncword_crc8_init
+//	fetch 1,mem_24g_pairing_sm
+//	rtnne STATE_24G_PAIRING_SUCCESS
+//	call p_g24_tx_attemp_data_prep
+//p_g24_tx_attemp_dongle:
+//	setarg 0
+//	store 2,mem_24g_check_dongle_times
+//p_g24_tx_attemp_dongle_loop:
+//	call lpo_calibration
+//	nop 2000
+//	fetch 1,mem_24g_check_dongle_times
+//	beq 0xff,p_g24_stop_g24_mode
+//	call p_g24_transmit_receive_ack
+//	nbranch p_g24_attemp_txdata_retry,sync
+//	nbranch p_g24_attemp_txdata_retry,user3
+//p_g24_tx_attemp_dongle_succ:
+//	set1 mark_24g,mark
+//	setarg 0
+//	store 2,mem_24g_check_dongle_times
+//	jam BT_EVT_24G_ATTEMPT_SUCCESS,mem_fifo_temp
+//	call ui_ipc_send_event
+//	call p_g24_txbuf_clear
+//	branch p_g24_transmit_by_interrupt_enable
+
+//p_g24_tx_attemp_data_prep:
+//	jam 0xff,mem_24g_common_temp
+//	fetch 1,mem_24g_data_type
+//	store 1,mem_24g_common_temp+1
+//	fetch 4,mem_24g_device_addr
+//	store 4,mem_24g_common_temp+2
+//	arg 6,temp
+//	arg mem_24g_common_temp,rega
+//	call p_g24_put_data_in_buff
+//	branch p_g24_transmit_prep
+//	
+//p_g24_attemp_txdata_retry:
+//	fetch 2,mem_24g_check_dongle_times
+//	increase 1,pdata
+//	store 2,mem_24g_check_dongle_times
+//	call p_g24_ch
+//	branch p_g24_tx_attemp_dongle_loop
 
-p_le_parse_smp:
-	ifetch 1,contr
-	beq SMP_PAIRING_REQUEST,p_le_parse_smp_pairing_request
-	beq SMP_PAIRING_FAILED,p_le_parse_smp_pairing_failed
-	branch le_parse_smp+2
-	
-p_le_parse_smp_pairing_request:
-	jam 1,mem_le_send_security_request_flag
-	branch le_parse_smp_pairing_request
+p_g24_auto_pair_start:
+	rtn
+//	set0 mark_24g,mark
+//	call p_g24_auto_pair_all_powerful
+//	call p_g24_tx_attemp_data_prep
+//p_g24_auto_pair_restart:
+//	jam 0,mem_24g_check_dongle_times
+//p_g24_auto_pair_start_loop:
+//	call lpo_calibration
+//	nop 2000
+//	fetch 1,mem_24g_check_dongle_times
+//	beq 0xff,p_g24_stop_g24_mode
+//	call p_g24_transmit_receive_ack
+//	nbranch p_g24_auto_pair_retry,sync
+//	nbranch p_g24_auto_pair_retry,user3
+//	call p_g24_ackpayload_parse
+//	fetch 1,mem_tx_power_temp
+//	store 1,mem_tx_power
+//	fetch 4,mem_24g_addr
+//	fetcht 4,mem_24g_paring_addr
+//	isub temp,null
+//	branch p_g24_start_pairing_sm1,zero
+//	branch p_g24_tx_attemp_dongle_succ
+
+//p_g24_auto_pair_retry:
+//	fetch 1,mem_24g_check_dongle_times
+//	increase 1,pdata
+//	store 1,mem_24g_check_dongle_times
+//	fetch 1,mem_24g_auto_paring_switch
+//	increase 1,pdata
+//	and_into 1,pdata
+//	store 1,mem_24g_auto_paring_switch
+//	beq 0,p_g24_auto_pair_device_attemp
+//	beq 1,p_g24_auto_pair_pair_attemp
+//	rtn
+//	
+//p_g24_auto_pair_all_powerful:
+//	jam TX_POWER_PAIR,mem_tx_power
+//	setarg 0x0f0f
+//	store 2,mem_24g_addr
+//	istore 2,contw
+//p_g24_ch_syncword_crc8_init:	
+//	call p_g24_syncword_crc8
+//	branch p_g24_ch
+
+//p_g24_auto_pair_device_attemp:
+//	call p_g24_auto_pair_all_powerful
+//	branch p_g24_auto_pair_start_loop
+
+//p_g24_auto_pair_pair_attemp:
+//	call p_g24_pair_init
+//	branch p_g24_auto_pair_start_loop
 
-p_le_parse_smp_pairing_failed:
-	call le_parse_smp_pairing_failed
-	fetch 1,mem_le_state	//disable update conn param
-	set0 lestate_update_param,pdata
-	store 1,mem_le_state
-	branch le_parse_terminate_ind
+p_g24_check_51cmd_stop_24g:
+	set0 mark_24g,mark
+	call le_disable
+p_mouse_disable_g24_pairing_flag:
+	arg MOSUE_24G_PAIRING_FLAG,queue
+	branch mouse_disable_function_flag
 
-p_le_adv_not_match:
-	fetch 1,mem_le_ch_mapped
-	bne 39,le_adv_loop
-	call p_le_adv_random_delay
-	arg le_adv_interval_timer,queue
-	fetch 2,mem_le_adv_interval
-	branch timer_init
-p_le_adv_random_delay:
-	random pdata
-	arg 0x1ff,temp
-	iand temp,pdata
-	add pdata,250,pdata
-	branch delay
+p_g24_put_data_in_buff:
+	storet 1,mem_24g_datalen
+	copy temp,loopcnt
+	arg mem_24g_txbuf,contw
+	copy rega,contr
+	branch memcpy
 
-p_le_lpm_setmult:
-	disable wake
-	branch p_le_lpm_set_mult_attempt,attempt
-	nbranch le_lpm_lost,match
-p_le_lpm_set_mult_attempt:
-	call lpm_match
-	fetch 2,mem_rx_window_sniff
-	store 2,mem_le_receive_window
-	fetch 1,mem_le_connect_status_flag
-	compare 3,pdata,3
-	nbranch lpm_mult_short,true
-	branch le_lpm_set_mult_attempt+3
+p_g24_read_len_pid_crc:
+//read control
+	fetch 1,mem_24g_rxbuf+1
+	rshift3 pdata,pdata
+	store 1,mem_24g_rxdata_length
+//get crc
+	increase 1,pdata
+	arg mem_24g_rxbuf+1,contr
+	iadd contr,contr
+	ifetch 3,contr
+	store 3,mem_24g_sta_crc
+//read pid
+	fetch 1,mem_24g_rxbuf+1
+	rshift pdata,pdata
+	and pdata,0x03,pdata
+	store 1,mem_24g_sta_pid
+	rtn
 
-p_le_mouse_bb_event_connect_complete:
-	fetch 1,mem_mouse_le_reconnect_flag
-	nrtn blank
-	fetch 1,mem_le_att_handle
-	sub pdata,26,pdata
-	nrtn zero
-	branch mouse_le_write_enable
 endif
 
-p_twspi_reset:
-	hfetch 1,core_gpio_out3
-	and_into 0xfd,pdata
-	hstore 1,core_gpio_out3
-	hfetcht 1,core_gpio_oe3
-	or_into 0x2,temp
-	hstoret 1,core_gpio_oe3
-	call twspi_disable
-	and_into 0xfd,temp
-	nop 13
-	call twspi_enable
-	hstoret 1,core_gpio_oe3
-	rtn
+p_set_freq_tx:
+	storet 1,mem_last_freq
+	add temp,0,rega			/* index to frequency */
+	call rf_write_freq
+	setarg param_pll_setup	//128us
+	call sleep
+p_rf_tx_enable:
+	jam 0x1,rfen_adc
+	jam 0x3c,rfen_rx
+	jam 0xe0,rfen_tx
+	nop 10 /* wait LDOs to turn ON*/
+	jam 0x01, rfen_mdm
+	jam 0x3d, rfen_mdm
+	nop 10 /* wait tx blocks to turn ON*/
+	jam 0xb7,rfen_sn
+	nop 10 /* wait tx lo buffer to turn ON*/
+	jam 0x7d, rfen_mdm
+	fetch 1,mem_tx_power
+	beq TX_POWER_0DB,p_set_tx_power_0db
+	beq TX_POWER_3DB,p_set_tx_power_3db	
+	beq TX_POWER_5DB,p_set_tx_power_5db
+//	beq TX_POWER_f3DB,p_set_tx_power_f3db	
+	beq TX_POWER_f5DB,p_set_tx_power_f5db
+	beq TX_POWER_PAIR,p_set_tx_power_pair
+	branch p_set_tx_power_0db
 
-p_check_51cmd_once_continue:
-	call lmo_fifo_check
-	nbranch check_51cmd_restore,blank  //process this cmd next time while lmo fifo is full
-	fetch 1,mem_fifo_temp
-	bmark0 mark_context,check_51cmd_check_idle
-	beq BT_CMD_LE_UPDATE_CONN,p_check_51cmd_ble_update_connect_param
-	branch check_51cmd_once_continue+2
+p_set_tx_power_0db:
+	call p_rx_low_sens
+	jam 0xba,0x894b
+	jam 0xd0,0x8955
+	jam 0xe0,0x8956
+	jam 0x88,0x8957
+	jam 0x6c,0x8958
+	jam 0x10,0x8959
+	branch set_tx_power_0db	
 
-p_check_51cmd_ble_update_connect_param:
-	call le_fifo_check_full
-	nrtn blank
-	branch le_l2cap_tx_update_req
+p_set_tx_power_3db:
+	call p_rx_high_sens
+	jam 0xba,0x894b
+	jam 0xd0,0x8955
+	jam 0xe0,0x8956
+	jam 0x88,0x8957
+	jam 0x3c,0x8958
+	jam 0x10,0x8959
+	branch set_tx_power_3db
+	
+p_set_tx_power_5db:
+	call p_rx_high_sens
+	jam 0xba,0x894b
+	jam 0xd0,0x8955
+	jam 0xe0,0x8956
+	jam 0x88,0x8957
+	jam 0x3c,0x8958
+	jam 0x10,0x8959
+	branch set_tx_power_5db
+/*
+p_set_tx_power_f3db:
+	call p_rx_low_sens
+	jam 0xba,0x894b
+	jam 0xd0,0x8955
+	jam 0xc0,0x8956
+	jam 0x88,0x8957
+	jam 0x6c,0x8958
+	jam 0x10,0x8959
+	branch set_tx_power_f3db
+*/	
+p_set_tx_power_f5db:
+	call p_rx_low_sens
+	jam 0xba,0x894b
+	jam 0xd0,0x8955
+	jam 0xc0,0x8956
+	jam 0x88,0x8957
+	jam 0x6c,0x8958
+	jam 0x10,0x8959
+	branch set_tx_power_f5db
 
-ifdef CLASSIC_BT
-p_page_wait_fhs_reply_ok:
- 	fetch 1, mem_page_rcv_fhs
-	increase 1,pdata
-	store 1, mem_page_rcv_fhs
-	call prepare_newconn
-p_master_newconn_loop:
- 	set1 mark_first_packet,mark
-	call master_newconn_once
-	branch p_newconn_poll_responded,sync
-	set0 mark_first_packet,mark
-	call new_conn_timeout
-	nbranch p_master_newconn_loop,blank
-	branch page_restart	
+p_rx_low_sens:
+	jam 0x5b,0x894c
+	jam 0x96,0x894d
+	jam 0x2c,0x894e 
+	jam 0x46,0x894f
+	rtn
 
-p_newconn_poll_responded:
-	set0 mark_first_packet,mark
-	branch newconn_poll_responded
+p_rx_high_sens:
+	jam 0xfb,0x894c 
+	jam 0xef,0x894d
+	jam 0xec,0x894e 
+	jam 0x5e,0x894f
+	rtn
+		
+p_set_tx_power_pair:	//50-100cm distance
+	jam 0xba,0x894b
+ 	jam 0xc2,0x8956
+ 	jam 0xd0,0x8955
+	rtn	
 
-p_role_switch_master:
-	call role_switch_check
-	nrtn user
-p_wait_role_switch_anchor:
-	disable user
-	jam param_newconnto,mem_newconnto_counter
-	set0 mark_fhs_already_good,mark
-	set0 mark_role_switch_receive_fhs,mark
-p_roles_waitfhs_loop:
-	call rf_setup_time_master_slot
-	call master_recv_packet
-	bmark1 mark_fhs_already_good,p_roles_replyto_fhs
-	call new_conn_timeout
-	nbranch p_roles_waitfhs_loop,blank
-	bmark1 mark_role_switch_receive_fhs,p_roles_replyto_fhs1
-	branch role_switch_fail_master
-	
-p_roles_replyto_fhs:
-	call rf_setup_time_slave_slot
-	arg type_id,type
-	call master_send_packet
-	set1 mark_role_switch_receive_fhs,mark
-	set0 mark_fhs_already_good,mark
-	force 1,am_addr	/* process_fhs will update am_addr, so slave will not receive fhs succeffully sometimes */
-	jam 2,mem_newconnto_counter
-	branch p_roles_waitfhs_loop
-
-p_roles_replyto_fhs1:
-	fetch 4,mem_clke_bt		//wait for 2 fhs,need 2.5ms
-	pincrease 8
-	store 4,mem_clke_bt
-	branch roles_replyto_fhs+4
+p_shutdown_radio:
+	force 8,radio_ctrl
+	branch shutdown_radio+1
+
+/* ================================== 24g common functions ============================= */
+p_g24_timer_check:
+	call disable_user
+	fetcht 4,mem_24g_tx_btclk
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall g24_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_24g_tx_btclk
+	fetcht 1,mem_24g_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_24g_tx_btclk
+	branch enable_user
+
+p_rssi_noise:
+	call save_rssi
+	rtn blank
+	fetcht 1,mem_rssi_noise_index
+	arg mem_rssi_noise_buffer,rega
+	call p_rssi_store
+	storet 1,mem_rssi_noise_index
+	rtn
+	
+p_rssi_store:
+	copy rega,pdata
+	iadd temp,contw
+	fetch 1,mem_rssi
+	istore 1,contw
+	increase 1,temp
+ifdef DONGLE
+	and_into RSSI_BUF_LEN_NOISE,temp
+endif
+ifdef MOUSE
+	and_into RSSI_BUF_LEN_SIGNAL,temp
+endif
+	rtn
+p_rssi_average:
+	arg 0,temp
+ifdef DONGLE
+	arg RSSI_BUF_LEN_NOISE+1,loopcnt
+endif
+ifdef MOUSE
+	arg RSSI_BUF_LEN_SIGNAL+1,loopcnt
+endif
+	copy rega,contr
+ifdef DONGLE
+	branch rssi_average_loop
+endif
+ifdef MOUSE
+p_rssi_average_loop:
+	ifetch 1,contr
+	iadd temp,temp
+	loop p_rssi_average_loop
+	rshift3 temp,pdata
+	copy pdata,temp
+	rtnmark0 mark_24g
+	//2BCD
+	div pdata,10
+	call wait_div_end
+	quotient pdata
+	lshift4 pdata,pdata
+	remainder temp
+	ior temp,temp
+	rtn
+endif
+	rtn
 
-p_process_dmh:
-	bmark1 mark_first_packet,end_of_packet
-	branch process_dmh+1
+p_g24_update_addr_and_synccrc8:	
+	store 4,mem_24g_addr
 
-p_quit_connection_cont:
-	call app_disconn_reason_collect_bt
-	call sniff_exit
-	jam BT_EVT_BB_DISCONNECTED,mem_fifo_temp
-	call ui_ipc_send_event
-	call init_lmp_work
-	call l2cap_init_work
-	branch quit_connection_cont+8
+//output: 1BYTE crc8
+p_g24_syncword_crc8:
+	arg 0,rega
+	arg 4,loopcnt
+	arg mem_24g_addr,contr
+p_g24_syncword_crc8_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop p_g24_syncword_crc8_loop
+	copy rega,pdata
+	store 2,mem_24g_syncword
+	fetch 1,mem_24g_syncword
+	fetcht 1,mem_24g_syncword+1
+	iadd temp,pdata
+	store 1,mem_24g_syncword_crc8
+	rtn
 
-p_prepare_tx:
-	fetch 1,mem_state
-	isolate1 state_inconn,pdata
-	call p_bt_power_ctrl,true
-	branch prepare_tx+1
-p_bt_power_ctrl:
-	fetch 1,mem_arq
-	isolate1 wack,pdata
-	call power_ctrl_pac_succ_decrs,true
-	ncall power_ctrl_pac_succ_incrs,true
-	branch power_ctrl_start
 
-p_slave_conn_recv_packet:
-	call slave_receive_master_slot
-	nbranch shutdown_radio,sync
-	call save_rssi
-	call p_rssi_signal
-	branch slave_conn_recv_packet+4
+p_g24_transmit_prep:
+ifdef P24G_LOG
+	fetch 1,mem_24g_paccnt
+	increase 1,pdata
+	store 1,mem_24g_paccnt
+endif
 
-p_lpm_dispatch:
-	rtnmark1 mark_24g
-	call lpo_calibration
-	fetch 3,mem_clks_per_lpo
-	rtn blank
-	fetch 1,mem_lpm_mode
-	rtn blank
-	fetch 1,mem_ssp_enable
-	branch p_lpm_dispatch_next,blank
-	fetch 1,mem_sp_local_key_invalid	// simple pairing is not ready
-	rtn blank
-p_lpm_dispatch_next:
-	fetch 1,mem_le_sc_calc
-	nrtn blank
-	call lpm_check_wake_lock
-	nrtn blank
-	fetch 1,mem_context
-	compare 3,pdata,0x7							//sco won't sleep 
-	nbranch lpm_dispatch_unconn,true
-	fetch 2,mem_context + coffset_tsniff	//role switch 
-	arg 0xffff,temp
-	isub temp,null
-	rtn zero
-	branch lpm_dispatch_next+9
+// total length
+	fetch 1,mem_24g_datalen
+	increase 2,pdata
+	store 1,mem_24g_txlen
+// data type
+	fetch 1,mem_24g_data_type
+	store 1,mem_24g_txpayload
+//prepare 5bit payload length, 2bit PID, 1bit NO_ACK
+	fetch 1,mem_24g_datalen
+	lshift3 pdata,pdata
+	fetcht 1,mem_24g_pid
+	and temp,0x03,temp
+	lshift temp,temp
+	ior temp,pdata
+	fetcht 1,mem_24g_no_ack
+	iadd temp,pdata
+	istore 1,contw
+//prepare payload data
+	fetch 1,mem_24g_datalen
+	iforce loopcnt
+	arg mem_24g_txbuf,contr
+	branch memcpy
 
-p_lpm_set_mult:
-	disable wake
-	fetch 1,mem_state
-	rtnbit0 state_insniff
-	nbranch lpm_not_match,match
-	call lpm_match
-	fetch 2,mem_rx_window_sniff
-	store 2,mem_rx_window
-	fetch 1,mem_arq
-	bbit1 wack,lpm_mult_short
-	bmark0 mark_lpm_mult_enable,lpm_mult_short
-	call l2cap_malloc_is_fifo_empty
-	nbranch lpm_mult_short,blank
-	call p_lpm_set_attemp_timeout,blank	//fixed bt3.0 connected high current
-	branch lpm_set_mult+13	
-p_lpm_set_attemp_timeout:
-	jam 1,mem_current_sniff_attempt
-	jam 0,mem_current_sniff_timeout
-	rtn	
+p_g24_ch:
+	fetcht 1,mem_24g_current_ch_number
+	call p_g24_ch_map_size
+	storet 1,mem_24g_current_ch_number
+	rtn
 
-p_mouse_bb_disconnected:
-	jam 0,mem_mouse_enter_sniff_count
-	jam 0x0e,mem_sniff_param_interval	//115Hz
-	call mouse_bb_discon_clear_stack
-	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
-	bbit1 APP_DISC_BLE,mouse4_0_event_bb_disconn
-	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
-	bbit1 APP_DISC_AFTER_PAIRING,p_mouse_event_light_state_pairing
-	bbit1 APP_DISC_AFTER_RECONN,p_mouse_event_light_state_hibernate
-	bbit1 APP_DISC_AFTER_SNIFF,p_mouse_event_light_state_hibernate
-	branch mouse_start_discovery
+p_g24_ch_map_size:
+	call p_g24_ch_calc
+	increase 1,temp
+	and_into 3,temp //map size =4
+	rtn
 	
-p_mouse_event_light_state_pairing:
-	bbit1 APP_DISC_AFTER_HANDSHAKE,p_mouse_event_light_state_hibernate
-	bbit1 APP_DISC_AFTER_SNIFF,p_mouse_event_light_state_hibernate
-	branch mouse_start_discovery
-p_mouse_event_light_state_hibernate:
-	fetch 2,mem_ui_state_map
-	bbit1 UI_STATE_BTN_DOWN,mouse_start_discovery
-	call app_disconn_reason_clear
-	call mouse_check_key_gpio
-	beq MOUSE_RM_BUTTON,p_mouse_null_enter_hibernate_enable
-	branch app_bb_hibernate
-
-p_hid_rx_process:
-	fetch 2,mem_l2cap_payload_ptr
-	copy pdata,contr
+p_g24_ch_calc:
+	fetch 1,mem_24g_addr	
+	and_into 0x03,pdata
+	mul32 pdata,4,rega			//24addr low bit0 bit1 ,00-map1,01-map2,10-map3,11-map4
+	setarg mem_24g_ch_map1
+	iadd rega,pdata
+	iadd temp,contr
 	ifetch 1,contr
-	store 1,mem_l2cap_rcv
-	and pdata,0x0f,temp
-	rshift4 pdata,pdata //hidtype
-	beq hid_type_set_protocol,p_hid_rx_set_protocol
-	branch hid_rx_process+6
-p_hid_rx_set_protocol:
-	call hid_rx_process_handshake
-	jam 0,mem_mouse_bt_boot_mode
-	fetch 1,mem_l2cap_rcv
-	isolate1 0,pdata
-	rtn true
-	jam 1,mem_mouse_bt_boot_mode	//boot mode
-	rtn
-
-p_parse_lmp_accepted:
-	fetch 1,mem_rxbuf+1
-	store 1,mem_lmi_accepted_opcode
-	beq LMP_SWITCH_REQ,p_parse_lmp_accepted_switch
-	branch parse_lmp_accepted+3
-p_parse_lmp_accepted_switch:
-	call parse_lmp_accepted_switch
-	jam 1,mem_bt_rcvd_switch_req_accept
-	fetch 1,mem_bt_send_lmp_setup_complete
-	rtn blank
-	jam 2,mem_bt_send_lmp_setup_complete
+	store 1,mem_24g_ch
 	rtn
 
+p_g24_prep:
+	disable enable_crc
+	disable enable_white
+	setarg 0x555555
+	iforce crc24_init
+	fetch 1,mem_24g_ch
+	reverse pdata,temp
+	set1 1,temp
+	rshift temp,white_init
+	rtn
 
-p_send_lmp:
-	disable user
-	call lmo_fifo_process
+p_g24_receive_packet:
+	call le_enable
+	fetch 4,mem_24g_addr
+	iforce access
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call set_freq_rx
+	setarg param_pll_setup
+	call sleep
+	call rf_rx_enable
+p_g24_receive_rxon:
 
-ifdef DEBUGLOG
-ifdef DEBUGLOG_SEND_LMP
-	setarg DEBUGLOG_DTYPE_SEND_LMP
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_lmi_opcode
-	store 1,mem_debuglog_dataval+1
-	fetch 1,mem_lmp_to_send
-	store 1,mem_debuglog_dataval
-	fetch 1,mem_lmp_to_send
-	store 2,mem_debuglog_dataval
-	ncall debuglog_push,blank
-endif
+ifdef RF_DEBUG
+	call test_h_l_h
 endif
-	
-	fetch 1,mem_lmp_to_send
-	rtn blank
-	bbit1 7,p_send_lmp_escape
-	beq LMP_ACCEPTED,p_send_lmp_accepted
-	beq LMP_SETUP_COMPLETE,p_send_lmp_setup_complete
-	beq LMP_SNIFF_REQ, p_send_lmp_sniff_req
-	branch send_lmp0
-p_send_lmp_escape:
-	beq LMP_EXT_FEATURES_RES,p_send_lmpext_features_res
-	beq LMP_EXT_FEATURES_REQ,p_send_lmpext_features_req	
-	branch send_lmp_escape
-p_send_lmpext_features_res:
-	call p_check_ssp_enable
-	fetch 1,mem_lmp_to_send
-	branch send_lmpext_features_res
-p_send_lmpext_features_req:
-	call p_check_ssp_enable
-	fetch 1,mem_lmp_to_send
-	branch send_lmpext_features_req
-p_check_ssp_enable:
-	fetch 1,mem_ssp_enable 
-	branch ssp_disable,blank
-	branch ssp_enable
 
-p_send_lmp_setup_complete:
-	jam 1,mem_bt_send_lmp_setup_complete
-	branch send_lmp_setup_complete
-
-p_send_lmp_sniff_req:
-	jam 4,mem_mouse_bt_send_first_package_timer
-	branch send_lmp_sniff_req
-	
+	call p_g24_prep
+	disable user3
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch p_g24_sync_timeout,sync
 
-p_send_lmp_accepted:
-	force 2,pdata
-	call msg_send_lmp
-	fetch 1,mem_lmi_opcode
-	istore 1,contw
-	store 1,mem_lmi_opcode_temp
-	call send_lmp_follow
-ifdef DEBUGLOG
-ifdef DEBUGLOG_MISC
-	setarg DEBUGLOG_DTYPE_MISC
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_lmi_opcode_temp
-	store 1,mem_debuglog_dataval
-	call debuglog_push	
+ifdef RF_DEBUG
+	call test_gpio_low
+	call test_gpio_high
 endif
+
+	disable decode_fec0
+	enable decode_fec1
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_24g_get_syncword_crc8
+	fetcht 1,mem_24g_syncword_crc8
+	isub temp,null
+	nbranch p_g24_end_of_packet,zero
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_24g_rxbuf	//device id
+	fetch 1,mem_24g_mode
+	sub pdata,rx_24g,null
+	branch p_g24_receive_skip,zero
+	fetch 1,mem_24g_rxbuf
+	fetcht 1,mem_24g_data_type
+	icompare bits_data,temp
+	nbranch p_g24_end_of_packet,true
+p_g24_receive_skip:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	rshift3 pdata,pdata
+	and pdata,0x1f,loopcnt	//max payload: 32bytes
+	branch p_g24rx_nopayload,zero
+p_g24rx_loop:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	loop p_g24rx_loop
+p_g24rx_nopayload:
+ifdef MOUSE
+	//receive rssi hex
+	copy contw,rega
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_rssi_hex_received
+	copy rega,contw
 endif
-	fetch 1,mem_lmi_opcode_temp
-	beq LMP_MAX_SLOT_REQ,p_send_lmp_accepted_max_slot_req	//sumsung a5100 patch
-	branch send_lmp_accepted+7
+	parse demod,bucket,24
+	enable swfine
+	arg param_sifs,stop_watch	
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	disable decode_fec1
+ifdef DONGLE
+	call save_rssi
+endif	
+	branch p_g24_end_of_packet,crc_failed
 
+ifdef RF_DEBUG
+	call test_gpio_low
+	call test_gpio_high
+endif
 
-p_send_lmp_accepted_max_slot_req:
-	fetch 1,mem_bt_rcvd_switch_req_accept
-	rtn blank
-	jam 0,mem_bt_rcvd_switch_req_accept
-	fetch 1,mem_bt_send_lmp_setup_complete
-	rtnne 2
-	jam 1,mem_bt_send_max_slot_req_accept_after_switch
-	copy clkn_bt,pdata
-	store 4,mem_aurand_send_delay_time
+	enable user3
+	fetch 1,mem_last_freq
+	add pdata,0,rega
+	call rf_write_freq
+	disable decode_fec0
+	call set_sync_on
+ifdef DONGLE
 	rtn
-
-p_process_conn_sm:
-	call lmo_fifo_check
-	nrtn blank
-p_process_conn_sm_continue:
-	fetch 1,mem_conn_sm
-	rtn blank
-ifdef DEBUGLOG
-ifdef DEBUGLOG_CONN_SM
-	call pdata_push
-	setarg DEBUGLOG_DTYPE_CONN_SM
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_conn_sm
-	store 2,mem_debuglog_dataval
-	call pdata_pull
-	call debuglog_push	
 endif
+ifdef MOUSE
+	fetch 1,mem_rssi_hex_received
+	call p_rssi_signal
 endif
-	beq CONN_SM_SEND_CONN_REQ, p_host_create_conn_send_conn_req
-	beq CONN_SM_WAIT_SWITCH_AFTER_HOST_CONNECTION,p_host_creat_conn_wait_switch
-	branch process_conn_sm_continue+2
-
-
-p_host_creat_conn_wait_switch:
-	fetch 1,mem_switch_flag
-	rtneq SWITCH_FLAG_INIT
-	beq SWITCH_FLAG_ACCEPT,p_host_create_conn_switch_accept
-	branch host_creat_conn_wait_switch+3
-p_host_create_conn_switch_accept:
-	rtn master
-p_host_create_conn_auth_pair:
-	/* checking whether or not to do m/s switch */
-	fetch 1,mem_connection_options
-	bbit1 CONNECTION_AUTH,p_host_create_conn_auth_pair_true
-	branch host_create_conn_auth_pair+1
-p_host_create_conn_auth_pair_true:
-	fetch 1,mem_bt_send_lmp_setup_complete
-	beq 1,host_create_conn_auth_pair_true
-	//sumsung a5100 patch
-	fetch 1,mem_link_key_exists
-	branch host_create_conn_auth_pair_nokey,blank
-	fetch 1,mem_lmp_conn_state
-	rtnbit0 SENT_SETUP_COMPLETE
-	rtnbit0 RECEIVED_SETUP_COMPLETE
-	fetch 1,mem_bt_send_max_slot_req_accept_after_switch
-	rtn blank
-	jam 0,mem_bt_send_max_slot_req_accept_after_switch	
-	fetch 4,mem_aurand_send_delay_time
-	arg 20,temp
-	iadd temp,temp
-	copy clkn_bt,pdata
-	isub temp,null
-	nbranch p_bt_send_max_slot_req_accept_after_switch_wait,positive
-	branch host_create_conn_auth
-
-p_bt_send_max_slot_req_accept_after_switch_wait:
-	jam 1,mem_bt_send_max_slot_req_accept_after_switch
 	rtn
-
-p_host_create_conn_send_conn_req:
-	jam 20,mem_mouse_send_switch_req_timer
-	branch host_create_conn_send_conn_req
-
 	
-ifdef DEBUGLOG
-p_parse_lmp_opcode:
-ifdef DEBUGLOG
-ifdef DEBUGLOG_PARSE_LMP
-	setarg DEBUGLOG_DTYPE_PARSE_LMP
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_rxbuf+1
-	store 1,mem_debuglog_dataval+1 
-	fetch 1,mem_lmi_opcode2
-	store 1,mem_debuglog_dataval
-	fetch 1,mem_lmi_opcode2
-	store 2,mem_debuglog_dataval
-	call debuglog_push 
-endif
+p_g24_end_of_packet:
+	disable encode_fec1
+	disable decode_fec1
+	call end_of_packet
+ifdef RF_DEBUG
+	call test_gpio_low
 endif
-	branch parse_lmp+21
+	rtn
 
-p_process_upper_sm_reconn:
-	fetch 1,mem_upper_sm_reconn
-	rtn blank
-ifdef DEBUGLOG
-ifdef DEBUGLOG_UPPER_SM
-	call pdata_push
-	setarg DEBUGLOG_DTYPE_UPPER_SM
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_upper_sm_reconn
-	store 2,mem_debuglog_dataval
-	call pdata_pull
-	call debuglog_push	
-endif
+p_g24_sync_timeout:
+ifdef DONGLE
+	call p_rssi_noise
 endif
-	branch process_upper_sm_reconn+3
+	branch p_g24_end_of_packet
 
-endif	
+p_g24_set_freq_tx:
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	branch set_freq_tx
+
+p_g24_transmit:
+	call le_enable
+	fetch 4,mem_24g_addr
+	iforce access
+	call p_g24_prep
+	call p_g24_set_freq_tx
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
 
+ifdef RF_DEBUG
+	call test_gpio_high
 endif
 	
-ifdef DEBUGLOG
-p_ui_ipc_send_event:
-ifdef DEBUGLOG
-ifdef DEBUGLOG_EVENT
-	call pdata_push
-	setarg DEBUGLOG_DTYPE_EVENT
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_fifo_temp
-	store 2,mem_debuglog_dataval
-	call pdata_pull
-	call debuglog_push	
-endif
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+	disable encode_fec0
+	enable encode_fec1
+	enable enable_white
+	enable enable_crc
+	fetch 1,mem_24g_syncword_crc8
+	inject mod,8
+	fetch 1,mem_24g_txlen
+	iforce loopcnt
+	arg mem_24g_txpayload,contr
+p_g24tr_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop p_g24tr_loop
+ifdef DONGLE
+	fetch 1,mem_rssi_hex
+	inject mod,8
 endif
-	branch ui_ipc_send_event+1
 
-p_ui_ipc_send_cmd:
-ifdef DEBUGLOG
-ifdef DEBUGLOG_CMD
-	call pdata_push
-	setarg DEBUGLOG_DTYPE_CMD
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_fifo_temp
-	store 2,mem_debuglog_dataval
-	call pdata_pull
-	call debuglog_push
-endif
-endif
-	branch ui_ipc_send_cmd+1
+ifdef P24G_LOG	
+	fetch 1,mem_tx_power
+	inject mod,8
+	fetch 1,mem_rssi_avg_received
+	inject mod,8
+	fetch 1,mem_24g_paccnt
+	inject mod,8
 endif
 
-power_ctrl_pac_succ_cnt_init:
-	jam 1,mem_power_ctrl_level
-	jam 0,mem_power_ctrl_pac_succ_cnt
-	rtn
-power_ctrl_pac_succ_incrs:
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	increase 1,pdata
-	store 1,mem_power_ctrl_pac_succ_cnt
-	rtn
-power_ctrl_pac_succ_decrs:
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	sub pdata,2,null
-	ncall power_ctrl_pac_succ_cnt_reinit,positive
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	rtneq 0
-	increase -1,pdata
-	store 1,mem_power_ctrl_pac_succ_cnt
-	rtn
-power_ctrl_pac_succ_cnt_reinit:
-	jam 3,mem_power_ctrl_pac_succ_cnt
+	enable enable_parity
+	inject mod,24	//crc
+	disable enable_parity
+	until null,tx_clear
+	nop 100
+	disable encode_fec0
+	disable encode_fec1
 	rtn
 
-power_ctrl_start:
-	fetch 2,mem_ui_state_map
-	rtnbit1 UI_STATE_BLE_ADV
-	rtnbit1 UI_STATE_BT_RECONNECT
-	rtnbit1 UI_STATE_BT_DISCOVERY
-	
-	arg mem_rssi_signal_buf,rega
-	call p_rssi_average
-	storet 1,mem_rssi_avg_received
 
-ifdef DEBUGLOG
-ifdef DEBUGLOG_MISC
-	setarg DEBUGLOG_DTYPE_MISC
-	store 2,mem_debuglog_datatype
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	store 1,mem_debuglog_dataval
-	fetch 1,mem_rssi_avg_received
-	store 1,mem_debuglog_dataval+1
-	call debuglog_push	
-endif
+ifdef RF_DEBUG
+test_gpio_init:
+	arg TEST_GPIO,temp
+	call gpio_config_output
+test_gpio_low:
+	arg TEST_GPIO,temp
+	call gpio_out_active
+	nop 10
+	rtn
+test_gpio_high:
+	arg TEST_GPIO,temp
+	call gpio_out_inactive
+	nop 10
+	rtn
+
+test_h_l:
+	call test_gpio_high
+	branch test_gpio_low
+test_h_l_h:
+	call test_gpio_high
+	call test_gpio_low	
+	branch test_gpio_high
 endif
-	setarg RSSI_DIS_MAX_24G
-	bmark1 mark_24g,power_ctrl_start_next
-	setarg RSSI_DIS_MAX_BLE
-power_ctrl_start_next:	
-	isub temp,null
-	nbranch power_ctrl_txpower_incrs_force,positive
 
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	sub pdata,2,null
-	nbranch power_ctrl_txpower_decrs_check,positive
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	beq 0,power_ctrl_txpower_incrs
-	rtn
+p_mouse_data_init:
+	jam 7,mem_mouse_data_queue	//data length
+	jam 4,mem_mouse_data_queue+1	//fifo depth
+	setarg mem_mouse_data_queue
+	store 2,mem_queue_ptr
+	branch queue_init
 
-power_ctrl_txpower_decrs_check:
-	fetch 1,mem_power_ctrl_pac_succ_cnt
-	rtnne 32
-	jam 0,mem_power_ctrl_pac_succ_cnt
-power_ctrl_txpower_decrs:
-	fetcht 1,mem_rssi_avg_received
-	setarg RSSI_DIS_MIN_24G
-	bmark1 mark_24g,power_ctrl_txpower_decrs_next
-	setarg RSSI_DIS_MIN_BLE	
-power_ctrl_txpower_decrs_next:	
-	isub temp,null
-	nrtn positive
-	fetch 1,mem_power_ctrl_level
-	beq 0,power_ctrl_decrs_level0
-	increase -1,pdata
-	store 1,mem_power_ctrl_level
-	beq 0,power_ctrl_decrs_level0
-power_ctrl_decrs_level1:
-power_ctrl_incrs_level1:	//0dBm
+p_mouse_data_push:
+	arg mem_mouse_key,rega
+	call queue_push
+	call p_mouse_queue_increase,user
+	
 ifdef DEBUGLOG
 ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_TXPOWER_1
+	setarg MISC_LOST_MOUSEDATA
+	store 2,mem_debuglog_dataval
+	nbranch debuglog_push,user
+
+	setarg MISC_PUSH_MOUSEDATA
 	store 2,mem_debuglog_dataval
 	call debuglog_push
 endif
 endif
-	jam TX_POWER_0DB,mem_tx_power
 	rtn
-
-power_ctrl_txpower_incrs_force:
-	jam 0,mem_power_ctrl_pac_succ_cnt
-power_ctrl_txpower_incrs:
-	fetch 1,mem_power_ctrl_level
-	beq 2,power_ctrl_incrs_level2
+p_mouse_queue_increase:
+	fetch 1,mem_mouse_data_queue_num
 	increase 1,pdata
-	store 1,mem_power_ctrl_level
-	beq 1,power_ctrl_incrs_level1
-power_ctrl_incrs_level2:	//+6dBm
+	store 1, mem_mouse_data_queue_num
+	rtn
+	
+p_mouse_data_pull:
+	arg mem_mouse_key,rega
+	call queue_pop
+	branch p_mouse_fill_data_le,user
+	rtn
+
+p_mouse_fill_data_le:
 ifdef DEBUGLOG
 ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_TXPOWER_2
+	setarg MISC_PULL_MOUSEDATA
 	store 2,mem_debuglog_dataval
 	call debuglog_push
-endif
-endif
 
-	jam TX_POWER_5DB,mem_tx_power
-	rtn
-	
-power_ctrl_decrs_level0: //-5dBm
-ifdef DEBUGLOG
-ifdef DEBUGLOG_MISC
 	setarg DEBUGLOG_DTYPE_MISC
 	store 2,mem_debuglog_datatype
-	setarg MISC_TXPOWER_0
-	store 2,mem_debuglog_dataval
-	call debuglog_push
+	fetch 1,mem_mouse_x
+	store 1,mem_debuglog_dataval
+	fetch 1,mem_mouse_y
+	store 1,mem_debuglog_dataval+1
+	call debuglog_push	
 endif
 endif
-	jam TX_POWER_f5DB,mem_tx_power
-	rtn
-
-p_set_freq_tx:
-	storet 1,mem_last_freq
-	add temp,0,rega			/* index to frequency */
-	call rf_write_freq
-	setarg param_pll_setup	//128us
-	call sleep
-p_rf_tx_enable:
-	jam 0x1,rfen_adc
-	jam 0x3c,rfen_rx
-	jam 0xe0,rfen_tx
-	nop 10 /* wait LDOs to turn ON*/
-	jam 0x01, rfen_mdm
-	jam 0x3d, rfen_mdm
-	nop 10 /* wait tx blocks to turn ON*/
-	jam 0xb7,rfen_sn
-	nop 10 /* wait tx lo buffer to turn ON*/
-	jam 0x7d, rfen_mdm
-	fetch 1,mem_tx_power
-//	beq TX_POWER_0DB,p_set_tx_power_0db
-//	beq TX_POWER_3DB,p_set_tx_power_3db	
-	beq TX_POWER_5DB,p_set_tx_power_5db
-//	beq TX_POWER_f3DB,p_set_tx_power_f3db	
-	beq TX_POWER_f5DB,p_set_tx_power_f5db
-	beq TX_POWER_PAIR,p_set_tx_power_pair
-//	branch p_set_tx_power_0db
-p_set_tx_power_0db:
-	call p_rx_low_sens
-//	jam 0xba,0x894b
-	jam 0xd0,0x8955
-	jam 0xe0,0x8956
-//	jam 0x88,0x8957
-	jam 0x6c,0x8958
-//	jam 0x10,0x8959
-	branch set_tx_power_0db	
-
-//p_set_tx_power_3db:
-//	call p_rx_high_sens
-//	jam 0xba,0x894b
-//	jam 0xd0,0x8955
-//	jam 0xe0,0x8956
-//	jam 0x88,0x8957
-//	jam 0x3c,0x8958
-//	jam 0x10,0x8959
-//	branch set_tx_power_3db
-	
-p_set_tx_power_5db:
-	call p_rx_high_sens
-//	jam 0xba,0x894b
-	jam 0xd0,0x8955
-	jam 0xe0,0x8956
-//	jam 0x88,0x8957
-	jam 0x3c,0x8958
-//	jam 0x10,0x8959
-	branch set_tx_power_5db
-
-//p_set_tx_power_f3db:
-//	call p_rx_low_sens
-//	jam 0xba,0x894b
-//	jam 0xd0,0x8955
-//	jam 0xc0,0x8956
-//	jam 0x88,0x8957
-//	jam 0x6c,0x8958
-//	jam 0x10,0x8959
-//	branch set_tx_power_f3db
-	
-p_set_tx_power_f5db:
-	call p_rx_low_sens
-//	jam 0xba,0x894b
-	jam 0xd0,0x8955
-	jam 0xc0,0x8956
-//	jam 0x88,0x8957
-	jam 0x6c,0x8958
-//	jam 0x10,0x8959
-	branch set_tx_power_f5db
-
-p_rx_low_sens:
-	jam 0x5b,0x894c
-	jam 0x96,0x894d
-	jam 0x2c,0x894e 
-	jam 0x46,0x894f
-	rtn
-
-p_rx_high_sens:
-	jam 0xfb,0x894c 
-	jam 0xef,0x894d
-	jam 0xec,0x894e 
-	jam 0x5e,0x894f
-	rtn
-		
-p_set_tx_power_pair:	//50-100cm distance
-//	jam 0xba,0x894b
- 	jam 0xc2,0x8956
- 	jam 0xd0,0x8955
-	rtn	
-
-p_shutdown_radio:
-	force 8,radio_ctrl
-	branch shutdown_radio+1
-
+	call le_clear_md
+	fetch 1,mem_mouse_data_queue_num
+	sub pdata,1,null
+	ncall le_set_md,positive
+	fetch 1,mem_mouse_data_queue_num
+	rtn blank
+	increase -1,pdata
+	store 1, mem_mouse_data_queue_num
+	branch mouse_fill_data_le
 
 ifdef DEBUGLOG 
 pdata_push:
@@ -3245,265 +4012,85 @@
 	istore 8,contwu
 	call uartd_send
 	branch pdata_pull 
-endif
-
-ifdef RF_DEBUG
-test_gpio_init:
-	arg TEST_GPIO,temp
-	call gpio_config_output
-test_gpio_low:
-	arg TEST_GPIO,temp
-	call gpio_out_active
-	nop 10
-	rtn
-test_gpio_high:
-	arg TEST_GPIO,temp
-	call gpio_out_inactive
-	nop 10
-	rtn
-
-test_h_l:
-	call test_gpio_high
-	branch test_gpio_low
-test_h_l_h:
-	call test_gpio_high
-	call test_gpio_low	
-	branch test_gpio_high
-endif
+endif	
+/*
+p_le_savelist:
+	fetch 1,mem_mouse_key
+	bbit0 0,p_le_savelist1
+	fetch 1,mem_lpm_mode
+	bbit1 1,p_le_savelist1
+	jam 0,mem_seqi
+p_le_savelist1:
+	fetch 4,mem_sync_clke
+	store 4,mem_pdatatemp
+	deposit auxcnt
+	istore 1,contw
+	fetch 1,mem_le_ch_mapped
+	istore 1,contw
+	fetch 2,mem_le_event_count
+	arg 0x0fff,contr
+	iand contr,pdata
+	setflag match,15,pdata
+	setflag wake,14,pdata
+	setflag sync,13,pdata
+	setflag attempt,12,pdata
+	istore 2,contw
 
-ifdef MOUSE_SMOOTHER
-//notice: need to call p_mouse_drawing_optima_init when waked from mult
-p_drawing_optima_init:
-	arg 5,loopcnt
-	arg mem_mouse_asm_flag,contw
-	branch clear_mem
 
-p_drawing_optima:
-	fetch 4,mem_mouse_x
+p_save1:
+	call p_savelist1
+	fetch 1,mem_context
+	rtnbit0 state_inconn
+	fetch 1,mem_lpm_mode
+	rtnbit1 1
+	fetch 1,mem_mouse_z
 	rtn blank
-	call p_data_abs_check
-	setarg 0x06	//asm_flag enable condition
-	call p_data_greater_than_check
-	setarg 0x03	//asm_flag disable condition
-	call p_data_less_than_check
-	fetch 1,mem_mouse_asm_flag
-	beq 1,p_drawing_optima_modify
-	branch p_drawing_optima_init
-
-p_drawing_optima_modify:
-	fetch 2,mem_mouse_x_pre
-	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 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
-
-/**********
-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_data_pre
-	store 2,mem_data_current
-	rtn
-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_data_sum_n:
-	fetch 1,mem_data_sum	//sum negetive
-	call p_pdata_get_half
-	store 1,mem_data_pre
-	store 1,mem_data_current
-	branch p_data_zero,blank
-	setarg 0xff
-p_data_set_direction:	
-	store 1,mem_data_pre+1
-	store 1,mem_data_current+1
-	rtn
-p_data_zero:
-	setarg 0
-	branch p_data_set_direction
-
-p_pdata_get_half:
-	sub pdata,0,pdata
-	store 1,mem_rega
-	fetch 1,mem_rega
-	rshift pdata,pdata
-	store 1,mem_rega
-	fetch 1,mem_rega
-	sub pdata,0,pdata
-	rtn
-
-//rega mouse_x, regb mouse_y, pdata refer
-p_data_greater_than_check:
-	isub rega,null
-	nbranch p_enable_asm,positive
-	isub regb,null
-	nbranch p_enable_asm,positive
-p_disable_asm:
-	jam 0,mem_mouse_asm_flag
-	rtn
-p_data_less_than_check:
-	isub rega,null
-	nrtn positive
-	isub regb,null
-	nrtn positive
-	branch p_disable_asm
-p_enable_asm:
-	jam 1,mem_mouse_asm_flag
+	jam 3,mem_lpm_mode
+	jam 0,mem_seqi
 	rtn
 
-p_data_abs_check:
-	fetch 2,mem_mouse_x
-	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_data_abs_store
-
-endif
 
-ifdef TESTDATA
-//1 mem_m_key
-//2 mem_m_x
-//2 mem_m_y
-//1 mem_m_z
-//1 mem_m_tz
-//1 mem_24g_test
-p_g24_test_data:
-	fetch 1,mem_24g_test
+p_savelist:
+	store 8,mem_pdatatemp
+p_savelist1:
+	fetch 1,mem_seqi
+	rtneq 0x7f
+	and_into 0x7f,pdata
+	lshift3 pdata,pdata
+	arg 0x4c00,contw
+	iadd contw,contw
+	fetch 8,mem_pdatatemp
+	istore 8,contw
+	fetch 1,mem_seqi
+	isolate1 7,pdata
 	increase 1,pdata
-	store 1,mem_24g_test
-	sub pdata,50,null
-	branch p_ms_x_right,positive
-	sub pdata,100,null
-	branch p_ms_y_up,positive
-	sub pdata,150,null
-	branch p_ms_x_left,positive
-	sub pdata,200,null
-	branch p_ms_y_down,positive
-	rtn
-p_ms_x_right:
-	setarg 0x05
-	store 2,mem_m_x
-	setarg 0
-	store 2,mem_m_y
-	store 1,mem_m_z
-	store 1,mem_m_key
-	store 1,mem_m_tz
-p_data:	
-	enable user
-	fetch 7,mem_m_key
-	store 7,mem_mouse_key
-	rtn
-p_ms_y_up:
-	setarg 0x05
-	store 2,mem_m_y
-	setarg 0
-	store 2,mem_m_x
-	store 1,mem_m_z
-	store 1,mem_m_key
-	store 1,mem_m_tz
-	branch p_data
-p_ms_x_left:
-	setarg 0xfffb
-	store 2,mem_m_x
-	setarg 0
-	store 2,mem_m_y
-	store 1,mem_m_z
-	store 1,mem_m_key
-	store 1,mem_m_tz
-	branch p_data
-p_ms_y_down:
-	fetch 1,mem_24g_test
-	beq 200,p_mem_usb_data_square_cnt_set0
-	setarg 0xfffb
-	store 2,mem_m_y
-	setarg 0
-	store 2,mem_m_x
-	store 1,mem_m_z
-	store 1,mem_m_key
-	store 1,mem_m_tz
-	branch p_data
-p_mem_usb_data_square_cnt_set0:
-	jam 0,mem_24g_test
-	branch p_ms_y_down+2
-endif
+	and_into 0x7f,pdata
+	setflag true,7,pdata
+	store 1,mem_seqi
+	fetch 8,mem_pdatatemp
+	rtn	
+
 
-ifdef MEMLOG
 p_hci_log:
-	fetch 1,0x4d00
+	fetch 1,0x4c00
 	increase 1,pdata
 	sub pdata,50,null
 	branch p_hci_log_calc_ptr,positive
 	setarg 0
 p_hci_log_calc_ptr:
-	store 1,0x4d00
+	store 1,0x4c00
 	arg 8,temp
 	imul32 temp,pdata
-	arg 0x4d08,contw
+	arg 0x4c08,contw
 	iadd contw,contw
 p_hci_log_write_content:
-	fetch 1,0x4d00
+	fetch 1,0x4c00
 	istore 1,contw//counter
-	fetch 4,mem_le_supervision_timer
+	fetch 4,mem_24g_txbuf+2
 	istore 4,contw
-	fetch 2,mem_le_superto
-	istore 2,contw	
 	rtn
-endif	
+*/
+
 
 endif
 
Index: sched/109x.dat
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/sched/109x.dat	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/sched/109x.dat	(working copy)
@@ -3,8 +3,8 @@
 mem_lpm_xtalcnt:00 0a 0b ef 07
 mem_lpm_hibernate_switch:00
 mem_gpio_wakeup_low:00 00 00 00 00 00 00 00
-#mem_fcomp_mul:02
-#mem_fcomp_div:24
+mem_fcomp_mul:02
+mem_fcomp_div:24
 mem_iscan_window:12 00
 mem_iscan_interval:00 02
 mem_pscan_window:12 00
Index: sched/mouse.dat
===================================================================
--- /branch/mouse_project/LeXiang/1068OnlyBLE/sched/mouse.dat	(revision 1385)
+++ /branch/mouse_project/LeXiang/1068OnlyBLE/sched/mouse.dat	(working copy)
@@ -1,19 +1,17 @@
 mem_patch00:06
-mem_patch03:08
-mem_patch04:40
-mem_patch09:05
-mem_patch0a:02
-mem_patch0b:02
+mem_patch03:00
+mem_patch09:00
+mem_patch0a:00
+mem_patch0b:00
 mem_patch10:20
 mem_patch11:02
-mem_patch14:82
-mem_patch15:20
-mem_patch16:02
+mem_patch14:02
+mem_patch15:01
+mem_patch16:06
 mem_patch18:10
-mem_patch19:0e
-mem_patch1c:48
+mem_patch19:06
+mem_patch1c:08
 mem_patch1d:1e
-mem_patch20:20
 mem_patch27:02
 mem_patch28:08
 mem_patch29:04
@@ -22,21 +20,23 @@
 mem_patch2c:c8
 mem_patch2d:04
 mem_patch2e:80
-mem_patch30:05
-mem_patch31:11
+mem_patch30:00
+mem_patch31:10
+mem_patch39:00
 mem_patch3f:04
 
 #debug
+#mem_patch31:11
 #mem_patch2f:40
 #mem_patch37:40
 #mem_patch3e:c0
 
 
-mem_device_option:43
+mem_device_option:42
 mem_lpm_mode:01
 mem_lpm_mult:20
 mem_lpm_mult_init:20
-#mem_lpm_interval:00 00
+mem_lpm_interval:00 00
 
 mem_mouse_function_enable:
 #bit0 MOUSE_ENABLE_USB
@@ -61,7 +61,7 @@
 mem_app_connection_options:06
 mem_lap:26 10 19 20 18 10
 mem_local_name_length:
-'Bluetooth MS3.0
+'BT 3.0 Mouse
 mem_sniff_param_interval:
 0e 00 
 01 00 ##mem_sniff_param_attempt:01 00
@@ -95,17 +95,17 @@
 03 03 12 18
 
 #name
-'\09Bluetooth MS5.0
+'\09Bluetooth Mouse
 
 mem_le_scan_data_len:1f
 mem_le_scan_data:
 #name
-'\09Bluetooth MS5.0
+'\09Bluetooth Mouse
 
 
 #max 20bytes, att list data rom limits
 mem_le_name_len:
-'Bluetooth MS5.0
+'Bluetooth Mouse
 
 
 mem_le_interval_min:
@@ -169,15 +169,15 @@
 04 #mem_config_function_enable:04
 00 #mem_config_sensor_angle:00
 ff #mem_select_sensor_angle_gpio:ff
-ff #mem_select_adc_gpio:ff
+05 #mem_select_adc_gpio:ff
 
 mem_eeprom_wp_gpio:ff
 mem_sensor_reset_gpio:ff
 mem_sensor_squal_reg:07# 07:3205         	06:3610
 mem_usb_offline_check_gpio:ff
-#mem_wire_usb_interval:19 #128
+mem_wire_usb_interval:19 #128
 
-#mem_config_function_enable:
+mem_config_function_enable:
 #bit0 ENABLE_BT_DISCOVERY_BY_GPIO_LED
 #bit1 ENABLE_MODE_LED
 #bit2 ENABLE_LOW_VOLTAGE_LED
@@ -185,24 +185,23 @@
 #bit4 ENABLE_BT_BUTTON
 #bit5 ENABLE_SELECT_DEVICE_BY_GPIO_BUTTON
 #bit6 ENABLE_SELECT_DEVICE_BY_SWITCH
-#00
+04
 
 mem_mouse_dpi_seting:
-01##mem_320x_dpi_1
-02##mem_320x_dpi_2
-03##mem_320x_dpi_3
-04##mem_320x_dpi_4
-
-#unit:38
-15##mem_3212_dpi_1#800
-1a##mem_3212_dpi_2#1000
-22##mem_3212_dpi_3#1300
-2a##mem_3212_dpi_4#1600
-
-#04##mem_3610_dpi_1
-#05##mem_3610_dpi_2
-#07##mem_3610_dpi_3
-#08##mem_3610_dpi_4
+00##mem_320x_dpi_1
+01##mem_320x_dpi_2
+02##mem_320x_dpi_3
+03##mem_320x_dpi_4
+
+15##mem_3212_dpi_1
+1a##mem_3212_dpi_2
+22##mem_3212_dpi_3
+2a##mem_3212_dpi_4
+
+04##mem_3610_dpi_1
+05##mem_3610_dpi_2
+07##mem_3610_dpi_3
+08##mem_3610_dpi_4
 
 
 mem_ui_led_struct_ptr:mem_mouse_led_type
@@ -243,22 +242,22 @@
 mem_24g_pairing_sm:ff
 mem_24g_paring_addr:20 15 10 05
 mem_24g_common_temp:00 00 00 00 00 00 00 00 00 00
-mem_24g_enter_hibernate:00 48 60
+mem_24g_enter_hibernate:00 48 60 00 00 00 00 00#10 min
 
 mem_device_flag:
 01
 ff
 ff ff ff ff ff ff
-#mem_device2_type:
-#34
-#11 22 33 44 55 66
-#mem_device3_type:
-#34
-#11 22 33 44 55 66
+mem_device2_type:
+34
+11 22 33 44 55 66
+mem_device3_type:
+34
+11 22 33 44 55 66
 
 
-#mem_flash_base:00 70 00
-mem_eeprom_base:90 1f
+mem_flash_base:00 70 00
+mem_eeprom_base:80 1f
 mem_eeprom_block_size:80
 mem_reconn_times_init:00
 mem_bt_discovey_button_statue:01#default: button up
