Index: format/app_mouse.format
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/format/app_mouse.format	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/format/app_mouse.format	(working copy)
@@ -254,6 +254,12 @@
 1 mem_mouse_le_send_conn_param_update
 1 mem_mouse_le_send_conn_param_update_timer
 
+1 mem_le_conn_rcv_new
+1 mem_le_conn_first_rcv
+1 mem_le_check_retransmit_flag
+1 mem_le_retransmit_cnt
+1 mem_le_check_retransmit_discon_flag
+
 )
 
 
Index: output/eeprom.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/eeprom.dat	(revision 3897)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/eeprom.dat	(working copy)
@@ -1,2520 +1,2520 @@
 00
 02
+8f
+ab
+f1
+00
+3c
+ae
+c6
+03
+78
+5c
+8d
+07
+e0
+71
+35
+1e
 aa
 55
-3e
-03
-c2
-84
-00
-0b
-c0
-3e
-80
-0f
-c0
-3f
-00
-12
-c0
-44
-80
-1f
-c0
-4b
-80
-96
-c0
-47
-80
-2c
-c0
-48
-00
-52
-c0
-49
-80
-27
-c0
-4c
-80
-7d
-c0
-75
-00
-1c
-20
-20
+90
+04
+4e
+06
+a3
+35
+a2
+a9
+18
+b1
 23
-3e
-c0
-5f
-80
-64
-c0
+29
+a9
+a0
+50
+d5
+3b
+ad
+04
 64
-80
-6f
-c1
-7f
-80
-00
-20
-20
-23
-3e
-20
-40
-73
-88
-20
-40
-4e
-42
-20
-20
-4e
-3f
-20
-40
-53
-ab
-20
-40
-7d
-e6
-20
-40
-4f
-c9
-6f
-e0
-c8
-94
-20
-40
-52
-54
-68
-48
 c6
-65
-20
-40
+63
+27
+4a
+46
+76
+53
+fe
+aa
+dd
+ae
+08
+7a
+df
+5f
+51
+4e
+9b
+41
 4f
-02
 d8
-40
+e6
+32
+af
+bc
 00
-15
-20
-40
-4f
-0a
-20
-20
-4e
-4a
-20
-40
-6b
-28
-20
-40
-6b
-63
-20
-20
-6b
+42
+b2
+f9
+c1
+21
+52
+d4
 26
-1a
-62
+b4
+60
+af
+1b
+9e
+bb
+84
+2c
+6f
+f4
+b9
+a5
+04
+3e
+af
+c8
+35
+09
+57
+b9
+fa
+b8
+70
+ed
+81
 7e
-00
+dd
+22
+2a
+99
 67
-e0
-ca
-10
-1f
-e3
-fe
-00
-1f
-e2
+50
+17
+c1
+e7
+f5
+2a
+ec
+1c
+4d
+16
+fd
+34
+22
+ed
+db
+c5
+e7
+b0
+81
+4c
+11
+8f
+32
 24
-00
-18
-42
-26
-00
-20
-40
-6e
-f1
+ea
+13
+0d
+51
+ab
+84
+f4
 1a
-62
-04
-00
-20
-20
-52
-48
-20
-40
-00
-29
-20
-20
-54
-95
-da
-60
-4a
-c7
-da
-40
-54
-08
-20
-20
-37
-55
-1a
-62
-7e
-00
-c0
-1d
-00
-42
-c0
-20
-00
-39
-c0
+31
+7d
+8c
+05
+a6
+c2
+d7
 0a
-80
-3e
-c0
-19
-00
-32
-20
-20
 53
-dc
-6f
-e0
+6b
+0b
 c7
-54
-c0
-00
-80
-36
-70
-48
-83
-14
-20
-20
-54
-0f
-20
-40
-54
-08
-70
-48
+f4
 83
-05
-20
-20
-54
-0f
-6f
-e0
-ca
-c6
-24
-7a
-00
-00
-70
-4a
-c6
+d1
+1d
+21
+99
+d6
+5b
 01
-70
-4a
-c7
-1e
-20
-60
-00
-00
-58
-00
-00
-00
-67
-e0
-ca
+c8
+44
+23
 c6
-67
-e0
+5c
 ca
-c7
-20
-20
-53
-f9
-20
+0c
+ce
+a1
+1f
+f1
+d6
+4d
+2a
+6d
+0c
+99
+10
+b4
 40
-59
+fe
 2b
-20
-40
-59
-33
-6f
-e0
-c6
-17
-24
-3a
-59
+b2
+54
+19
+bb
+04
+1d
+66
 0a
-6f
-e0
-c5
-f9
-c0
-02
-d9
+f2
+24
+5f
+9f
+6d
+43
+bd
+18
+52
+ef
+85
+cc
+ed
+75
+d7
+bb
+e2
+be
+7f
+ab
+0c
+e4
+e4
+90
+18
+5e
+e9
+1c
+fc
+04
+c3
+9e
+b6
+db
+79
+7d
+25
+33
+e7
 8c
-c0
-00
 80
-4a
-20
+3e
+c6
+ed
 20
-59
-75
-6f
+c2
+2f
 e4
+a7
+f4
+54
+7d
+2f
+57
+7b
+a5
+ab
+9b
+0f
+82
+1c
+75
+4d
 47
-0e
-c2
-9f
-00
-4e
-c2
-98
-00
-4e
-20
-20
-59
-83
-6f
-e1
-45
-ed
-67
-e1
-45
-f5
-70
-45
-f9
-05
-20
-20
-35
-0a
-20
-40
-2a
-06
-24
-7a
-00
-00
-6f
-e0
-c7
+16
+68
+1d
+11
+08
+64
+79
+d5
+e5
+e9
+5f
+af
+92
+eb
+16
+5d
 4f
-c0
-7f
-80
-59
-6f
-e0
-c8
-82
-1f
-e1
-7e
+60
+ce
+fe
 03
-c1
-81
-80
-00
-6f
-e0
-c9
+54
+17
+f2
+0c
+b6
+b3
+fe
+62
 f9
-20
-5a
-53
-8b
+27
+1b
+03
+9d
 6f
-e4
-47
-0e
-c2
-80
-80
-61
-c2
-80
-00
-61
-c2
-82
-80
-61
-c2
-83
-00
-61
-20
-20
-54
-47
-58
-00
-00
-00
+86
+e7
+04
+0f
+16
+43
+41
+81
+35
+af
+44
+98
+40
+db
+ba
+5d
+bd
 67
-e3
-c6
-5c
-20
-20
-68
-3e
-6f
-e0
-c5
+46
+7c
 fa
-20
-3a
-32
 01
-6f
-e1
+af
+ca
+ab
+af
+a1
+fa
+27
+ac
+90
+55
+cc
+ba
+91
+33
+7d
+89
+0a
+8f
+30
+76
+98
+41
+bc
+54
+b5
+16
+2f
+9e
+98
 45
-f7
-1f
-e0
-fe
-01
-67
 e1
-45
-f7
-2f
-ef
-fe
-09
-6f
-e0
-c5
-f9
-c0
-02
-80
-6d
-20
-20
-35
-65
-20
-20
-b5
-1f
-20
-20
-32
-7a
-6f
-e0
-c3
-cf
-c0
-04
-00
+64
+4a
 72
-20
-20
-36
-3b
-6f
-e0
-c7
+d3
+03
+c9
+28
+ea
 52
-24
-7a
-00
-00
-20
+a0
+cd
 40
-00
-78
-6f
-e4
-47
-0e
-c3
-80
-80
-00
-20
-20
+e2
+08
 36
-3b
-d8
-e0
-00
-0c
-20
-40
-7c
+34
+a6
 f1
-24
-7a
-00
-00
-20
-40
-54
-d7
-20
-20
+96
+4d
+03
+cb
+68
+fb
+b9
+36
+81
+ea
+c6
+38
+ae
+2e
+bf
 59
-e6
-6f
-e4
-47
-0e
-2f
-ef
-fe
-12
-20
-40
-d6
-99
-20
-40
-80
-82
-20
-20
-56
-8d
-6f
-e0
+ba
+31
+4f
+eb
+fd
+b4
+55
+a5
+c2
+3a
+0a
+8a
+5f
+e5
+b2
+24
+88
+86
+69
+ff
+bd
+ae
+3c
+1f
+68
+4b
+93
+f4
 c6
-78
-c1
-00
-00
-00
-c0
-00
-80
 87
+c8
+ec
+cc
+c2
+13
+c9
+ad
+3c
+0f
+b7
+f0
+65
+7d
 c0
-01
-00
-8e
-20
-60
-00
-00
-6f
-e3
-46
-80
-68
-4b
-46
-f8
-98
-46
-7c
-00
-24
-62
-80
-00
-6f
-e3
+13
+16
+e7
+77
+cf
+65
+63
+d1
+38
+08
+e4
+0c
+c7
+d1
+8c
+11
+55
+ae
+58
+a8
+11
 42
-dd
-67
-e3
-46
-80
-20
-60
-00
-00
-6f
-e3
-46
-8d
-68
-4b
-46
+8a
+55
+10
+f9
+61
+90
+a4
+69
+14
+72
+36
 f8
-98
-46
-7c
-00
-24
-62
-80
-00
-6f
-e3
-42
-dd
-1f
-e0
-ff
-00
-67
-e3
+87
+fd
+8a
+f3
+0c
+f3
+b9
+d1
+30
+19
+d1
+53
+15
+0f
+c7
+1a
+3e
 46
-8d
-20
-60
-00
-00
-6f
-e4
-47
 0e
-c2
-88
+da
 d5
-80
+4b
+8d
+90
+4d
+17
+6f
+56
 c2
-89
-00
-9a
-20
-60
-00
-00
-20
-40
-00
-9d
-20
-40
+e3
+e8
+a1
+7e
+52
+81
+f6
+52
+a2
+65
+d1
+b5
+91
+e9
+91
+5f
+59
+fa
+63
+fa
+b6
 00
-a4
-20
-20
-55
-8b
-20
-40
-56
-99
-6f
-e1
-46
-a0
+d4
+4a
+07
 d8
-40
-aa
-55
-98
-46
-7c
-00
-20
-62
-80
-00
-60
-49
-46
-a0
-20
+48
+71
+ff
+90
+19
+96
+e4
+f2
+2c
+8b
+f0
+fd
+72
 20
-56
-9d
-6f
-e0
-c6
-78
+a2
 c1
-00
-00
-00
-c0
-00
-80
+85
+2e
+63
+d4
+93
+b4
+c6
+15
+f0
+f5
+6c
+e2
 a9
-c0
-01
-00
-bd
-20
-60
-00
-00
-6a
-41
-4a
-8b
-1a
+f6
+4e
+f4
+f1
+31
+74
+c2
+ff
+c7
+b0
 42
+c6
+63
+1e
+90
+45
+3f
 26
-00
-20
-40
-56
-e5
-6f
-e3
-4a
-46
-20
-3a
-00
-b5
-67
-e3
-4a
-40
-1a
-60
-a6
-06
-6f
-e1
-4a
-8d
-9a
-66
-7c
-00
-24
 61
-00
-00
-1a
-62
-24
-00
-20
-20
-00
-ab
-6f
-e3
-4a
-40
-68
+18
+4f
+65
+1e
+27
+fd
+9c
+16
+7b
+72
+0b
+90
+bb
 4b
-46
-80
-98
-46
-7c
-00
-20
-62
-80
-00
-da
-20
-46
-80
-df
-20
-00
-06
-1a
-62
-24
-00
-20
-20
-6b
-33
-6a
-41
-4a
+82
+dc
+bf
+f7
+f6
+b6
+2b
+c2
+d4
+a3
+eb
+07
+39
+93
+a7
 77
-1a
-42
-26
-00
-20
-40
-57
+12
+9d
+83
+2e
+16
+c1
 0e
-6f
-e3
-4a
-5e
-20
 3a
-00
-c9
-67
-e3
-4a
-58
-1a
-60
-a6
-06
-6f
-e1
-4a
-79
-9a
-66
+5d
+3a
+13
+ae
+2a
+72
+e2
 7c
-00
-24
-61
-00
-00
+c5
+72
+d0
+42
 1a
-62
-24
-00
-20
-20
-00
-bf
-6f
-e3
-4a
-58
-68
-4b
-46
-8d
-98
-46
-7c
-00
-20
-62
-80
-00
-da
-20
-46
-8d
-20
-20
-00
-ba
+7b
+40
+59
+a2
+3e
+d0
+f2
+b1
+2d
 d5
-52
-aa
-55
+3c
+b5
+48
+e0
+d6
+14
+d1
+27
+57
+ce
+af
 40
-00
-00
-40
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-60
-00
-82
-89
-02
-00
-00
-00
-00
-00
-00
-00
-00
-00
-04
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-00
-80
-00
-02
-00
-00
-00
-00
-00
-00
+63
+20
+1d
+1c
+64
+26
+f8
+d9
+c1
+c3
+95
+a0
+cd
+cb
+99
 aa
-55
-08
-00
-0e
-47
-04
-e5
-04
-00
-02
-01
-29
+9c
+0f
+f3
+d7
+32
+d7
+13
+9f
+5c
 1b
-aa
-55
-05
-00
-65
-46
-ff
-05
-ff
-14
+e1
+e0
+cc
+5b
+ec
+f8
+19
+03
+15
+21
+2b
+37
+f8
+8a
+57
+ba
+75
+bd
+28
+c2
+c3
+58
+da
+0d
+69
+e1
+44
+1f
+98
+b2
+38
+b7
+22
+bd
+f3
 12
-aa
-55
-1a
-00
-8d
 48
+d6
+3f
+16
+f7
+6c
+1e
+4c
+3a
+bf
+e3
+2d
+5a
+eb
+68
+ab
+8f
+d3
+10
+6c
+1d
+59
+57
+ba
+e6
+17
+37
+97
 06
-07
-08
+1b
+7e
+d9
+95
+db
+43
+30
+d5
+b8
+b9
+1d
+27
+d8
+f5
+d6
+bb
+6f
+64
+64
+32
+16
+e9
+e1
+1b
+f7
 08
-07
-06
-0d
-0f
-ff
 01
-01
-01
-00
-ff
-ff
-0a
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-aa
-55
-02
-00
-ac
-48
-00
-14
-aa
-55
-03
-00
-af
-48
-05
-02
-05
+d9
+11
+0e
+83
+1f
+b1
+cb
+bf
+3e
+b6
+f8
+0e
+98
+9f
+68
+6c
+6f
+c6
+c8
+73
+47
+b2
+69
+4b
 aa
-55
-01
-00
-b4
-48
-14
-aa
-55
-01
-00
-b2
-48
-02
-aa
-55
-02
-00
+a3
+0f
+b7
 b6
-48
-02
+a9
+bd
+5f
+53
+b6
+69
+a7
+3b
+1f
+17
+86
+e8
+a0
+c2
+f8
+d4
+8d
+b1
+8d
+9c
+ad
+10
+09
+a5
+40
+0f
+cd
+1a
+32
 06
-aa
-55
-01
+4e
+6e
+c0
+43
+90
+c2
 00
+da
+82
+6c
+ee
+e9
+bc
+2a
+98
+9c
+ac
+c5
+1c
+27
+5d
+c1
+d4
 b9
-48
-0a
-aa
-55
-01
-00
-be
-48
-0a
-aa
-55
-02
-00
-bb
-48
-58
-02
-aa
-55
-02
-00
-51
-46
-58
+3d
+62
+ed
+4e
+6c
+6c
+0c
+36
+d4
+4b
+ea
+f4
+fb
 02
-aa
-55
-01
-00
+7e
+a3
+10
+bc
+38
 54
-46
-64
-aa
-55
-02
-00
-1a
-47
-05
-00
-aa
-55
-01
-00
-53
-46
+67
+97
+a2
+8f
+e5
+ab
+68
+ba
+a6
+f0
+57
+b5
+4a
+71
+bd
+db
+f6
+71
+57
+12
+b3
+cd
 64
-aa
-55
-02
-00
-4f
-46
-b0
-04
-aa
-55
-01
-00
-19
-47
-0a
-aa
-55
-02
-00
-1e
-47
-70
-17
-aa
-55
-01
-00
+dc
+08
+1d
+0f
+e8
+b5
+4b
 cf
+86
+e7
+dc
+46
+71
+b1
+99
+25
+9d
+fd
+f0
+68
+32
+69
+bb
+60
+b5
+36
+1d
+a2
+d0
+84
+3d
+13
+f1
+06
+d3
+20
+e8
+b2
+bb
+6b
+63
+c6
 43
-08
-aa
-55
-01
-00
-16
-47
-02
-aa
-55
-01
-00
-94
-40
-01
-aa
-55
-01
-00
-c0
-40
+72
+41
+6f
+46
+6f
+6f
 20
-aa
-55
-01
-00
-8b
 48
-20
-aa
-55
+41
+32
+bc
+a4
+b8
+ea
+ff
+99
+ac
+14
+5b
+c9
+7c
+ca
 03
+f7
+01
+48
+c4
+75
+83
+43
+23
+3a
+f7
+b1
+64
+81
+fb
+5c
+9a
+ad
+5a
+90
+72
+c8
+79
+51
+e7
+08
+4c
+f2
+35
+85
+9a
+1e
+a1
+4a
+ef
+e9
+7a
+fd
+b3
+be
+ad
+91
+f0
+4a
+7d
+9a
+12
+0b
+67
+09
+04
+da
+16
+e2
+dc
+19
+61
+94
+94
 00
-2e
-47
-00
-00
-00
+07
+58
+e3
+4d
+75
+39
+ac
+51
+5b
+5b
+b0
+ad
+4e
+d8
+4f
+0b
+51
+e6
+ff
+97
 aa
-55
 02
+56
+99
+ea
+73
+1e
+49
+3a
+cc
+12
+54
+96
+67
+32
+b1
+84
+b1
+35
+19
+e1
+f1
+2e
+c2
+e7
+b6
+17
+b6
+72
+31
 00
-78
-46
-00
-34
-aa
-55
+ba
+ab
+ec
 01
+7d
+0a
+45
+26
+e7
+f0
+14
+76
+53
+10
+32
+4e
+94
 00
-86
-46
+24
+dc
+4f
+4a
+ab
+c6
+95
+3b
+65
+25
+fd
+cc
+e1
+11
+e0
+71
+67
+0a
+be
+7f
+7e
+4b
+52
+ec
+90
+d7
+45
+88
+b1
+d1
+1e
+5c
+15
+ad
+b3
+94
+87
+d6
+a9
+35
+94
+a3
+25
+22
+bf
+03
+8e
+30
+3d
+ca
+e8
+2a
+04
+d2
+62
+52
+0c
+70
+62
+ed
+6e
+50
+40
+66
+b0
+3c
+6d
+cc
+f8
+2c
+2b
+74
+5a
+f7
 34
-aa
-55
+79
+29
+dc
+06
+4f
+2c
+7d
+10
 01
 00
-93
-46
-34
+ed
+e2
+c4
+a6
+a8
+e4
+9d
+59
+e0
+03
+b2
+f6
+42
+c1
+95
+c3
+cd
+ee
+83
+8c
+07
+fd
+e1
+3e
+c3
+7f
+8d
+73
+75
+7a
+1a
+e3
+7d
+e7
+33
+cc
+11
+a6
+0f
 aa
 55
-09
+40
 00
-fd
-49
 00
-08
+40
 00
-07
 00
+01
 00
 00
 00
 00
-aa
-55
-01
 00
-be
-4a
-03
-aa
-55
-01
 00
-bd
-4a
-07
-aa
-55
-04
 00
-bf
-4a
-ff
-ff
-1e
-1e
+00
+00
+00
+00
+00
+62
+00
+82
+8d
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+00
+02
+00
+00
+00
+00
+00
+00
 aa
 55
-01
+08
+00
+0e
+47
+04
+e5
+04
 00
 02
-45
-1e
+01
+29
+1b
 aa
 55
-06
+05
 00
-08
-45
-21
-32
-51
-21
-51
-61
+65
+46
+ff
+05
+ff
+14
+12
 aa
 55
-05
+1a
 00
-fa
-45
-01
-0f
-0f
-0f
+8d
+48
+06
+07
+08
+08
+07
+06
+0d
 0f
+ff
+01
+01
+01
+00
+ff
+ff
+0a
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
 aa
 55
-01
+02
 00
-d0
-45
+ac
+48
 00
+14
 aa
 55
-01
+03
 00
-38
-47
+af
+48
+05
 02
+05
 aa
 55
-02
+01
 00
-a2
-45
-c0
-12
+b4
+48
+14
 aa
 55
 01
 00
-bf
+b2
 48
-09
+02
 aa
 55
-04
+02
 00
-d0
+b6
 48
-c0
-5d
-00
-00
+02
+06
 aa
 55
-06
+01
 00
-c0
+b9
 48
-ee
-4d
-00
-80
-bb
-00
+0a
 aa
 55
-04
+01
 00
-d4
+be
 48
-80
-bb
-00
-00
+0a
 aa
 55
-06
+02
 00
-c6
+bb
 48
-70
-11
-01
-00
-77
-01
+58
+02
 aa
 55
-04
-00
-d8
-48
-00
-77
-01
+02
 00
+51
+46
+58
+02
 aa
 55
 01
 00
-55
+54
 46
-94
+64
 aa
 55
-03
+02
 00
-c6
-45
+1a
+47
+05
 00
-48
-60
 aa
 55
-02
+01
 00
-34
+53
 46
-14
-00
+64
 aa
 55
 02
 00
-32
+4f
 46
-50
+b0
+04
+aa
+55
+01
 00
+19
+47
+0a
 aa
 55
 02
 00
-1c
+1e
 47
-64
-00
+70
+17
 aa
 55
 01
 00
-06
-47
-01
+cf
+43
+08
 aa
 55
 01
 00
-3c
+16
 47
 02
 aa
 55
-06
+01
 00
-dd
-42
-41
-21
-f1
-51
-31
-41
+94
+40
+01
 aa
 55
 01
 00
-97
-43
-07
+c0
+40
+20
 aa
 55
-08
-00
-c4
-43
-fb
-00
-48
-08
-fb
+01
 00
+8b
 48
-08
+20
 aa
 55
-02
+03
 00
-7d
+2e
 47
-96
+00
+00
 00
 aa
 55
 02
 00
-74
-47
-15
+78
+46
 00
+34
 aa
 55
-02
+01
 00
-9f
-43
-19
+86
+46
+34
+aa
+55
+01
 00
+93
+46
+34
 aa
 55
-04
+09
+00
+fd
+49
+00
+08
+00
+07
+00
+00
 00
-76
-47
-1d
 00
-21
 00
 aa
 55
-02
-00
-34
-43
-2d
+01
 00
+be
+4a
+03
 aa
 55
-02
+01
 00
-7a
-47
-30
+bd
+4a
+07
+aa
+55
+04
 00
+bf
+4a
+ff
+ff
+1e
+1e
 aa
 55
-0c
+01
 00
-4c
-43
-1f
 02
-01
-05
-03
-03
-12
-18
-03
-19
-c2
-03
+45
+1e
 aa
 55
-14
-00
-5f
-47
-06
-ff
 06
 00
-03
-00
-80
-0c
-09
-42
-54
-35
-2e
+08
+45
+21
 32
-20
-4d
-6f
-75
-73
-65
+51
+21
+51
+61
 aa
 55
-0e
+05
 00
-6c
-43
-1f
-0c
-09
-42
-54
-35
-2e
-32
-20
-4d
-6f
-75
-73
-65
+fa
+45
+01
+0f
+0f
+0f
+0f
 aa
 55
-0c
+01
+00
+d0
+45
 00
-6d
-42
-0b
-42
-54
-35
-2e
-32
-20
-4d
-6f
-75
-73
-65
 aa
 55
-0c
+01
 00
-1e
-4a
-0b
-42
-54
-35
-2e
-32
-20
-4d
-6f
-75
-73
-65
+38
+47
+02
 aa
 55
-08
+02
 00
-d5
-42
-06
+a2
+45
+c0
+12
+aa
+55
+01
 00
+bf
+48
 09
-00
-20
-00
-2c
-01
 aa
 55
-06
+04
 00
-59
-47
-03
-12
-18
-ff
+d0
+48
+c0
+5d
 00
 00
 aa
 55
-03
+06
 00
-fe
-46
+c0
+48
+ee
+4d
 00
-50
+80
+bb
 00
 aa
 55
-02
+04
 00
-f4
-43
+d4
+48
 80
-1f
+bb
+00
+00
 aa
 55
+06
+00
+c6
+48
+70
+11
 01
 00
-fd
-43
-80
+77
+01
 aa
 55
-22
+04
 00
-73
-4a
-23
-1a
-d6
-1a
-d7
-1a
-8a
-1b
-8b
-1b
-52
-1c
-53
-1c
-1a
-1d
-1b
-1d
-92
-1d
-93
-1d
-46
-1e
-47
-1e
-fa
-1e
-fb
-1e
-ac
-1f
-ae
-1f
-aa
-55
-01
+d8
+48
 00
-4a
-08
-ff
-aa
-55
+77
 01
 00
-41
-41
-00
 aa
 55
 01
 00
-e9
-45
-07
-aa
 55
-02
-00
-07
 46
-43
-47
+94
 aa
 55
-02
+03
 00
-57
-46
-85
-90
+c6
+45
+00
+48
+60
 aa
 55
 02
 00
-5a
+34
 46
-75
-80
-aa
-55
-01
+14
 00
-59
-46
-63
 aa
 55
-01
+02
 00
-3e
+32
 46
-7d
-aa
-55
-01
+50
 00
-1d
-44
-01
 aa
 55
-01
+02
+00
+1c
+47
+64
 00
-1f
-44
-0a
 aa
 55
 01
 00
-1e
-44
-00
-aa
-55
 06
-00
-44
-46
-dc
-05
-84
-03
-e8
-03
+47
+01
 aa
 55
 01
 00
-48
-41
-0c
+3c
+47
+02
 aa
 55
 06
 00
-c3
-40
-35
-3f
-64
-db
-7b
-3b
+dd
+42
+41
+21
+f1
+51
+31
+41
 aa
 55
 01
 00
-a7
-40
-20
+97
+43
+07
 aa
 55
-03
+08
 00
-c9
-40
+c4
+43
+fb
 00
+48
 08
-b4
-aa
-55
-01
-00
-99
-40
-18
-aa
-55
-01
+fb
 00
-1c
-41
-3e
+48
+08
 aa
 55
-0c
-00
-16
-00
-00
-00
-20
-00
-00
-00
-00
-00
-00
-00
+02
 00
+7d
+47
+96
 00
 aa
 55
-05
-00
-60
-41
-08
-0e
-05
-03
+02
 00
-aa
-55
-01
+74
+47
+15
 00
-6a
-41
-20
 aa
 55
 02
 00
-9a
-40
+9f
+43
+19
 00
-0c
 aa
 55
-05
-00
-43
-41
-ff
 04
 00
+76
+47
+1d
+00
+21
 00
-08
 aa
 55
-01
+02
+00
+34
+43
+2d
 00
-fa
-01
-5a
 aa
 55
-01
+02
 00
-27
-44
+7a
+47
+30
 00
 aa
 55
-04
+0c
 00
-23
-44
+4c
+43
+1f
+02
+01
+05
+03
+03
+12
+18
+03
+19
+c2
+03
+aa
+55
+14
 00
-07
+5f
+47
+06
 ff
-07
+06
+00
+03
+00
+80
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0e
+00
+6c
+43
+1f
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+6d
+42
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+1e
+4a
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
 aa
 55
+08
+00
+d5
+42
+06
+00
+09
+00
+20
+00
+2c
 01
+aa
+55
+06
+00
+59
+47
+03
+12
+18
+ff
+00
 00
-4f
-44
-a0
 aa
 55
-02
+03
+00
+fe
+46
+00
+50
 00
-52
-44
-bc
-02
 aa
 55
 02
 00
-50
-44
-90
+f4
+43
+80
+1f
+aa
+55
 01
+00
+fd
+43
+80
 aa
 55
-02
+22
 00
-54
-44
-03
-09
+73
+4a
+23
+1a
+d6
+1a
+d7
+1a
+8a
+1b
+8b
+1b
+52
+1c
+53
+1c
+1a
+1d
+1b
+1d
+92
+1d
+93
+1d
+46
+1e
+47
+1e
+fa
+1e
+fb
+1e
+ac
+1f
+ae
+1f
 aa
 55
 01
 00
-49
-41
+4a
+08
 ff
 aa
 55
-02
+01
 00
-9c
-40
-49
 41
+41
+00
 aa
 55
-11
-00
-05
-49
-03
-04
 01
+00
+e9
+45
+07
+aa
+55
 02
-20
-2a
-3f
-15
-14
-1b
-0e
-11
-8a
-8b
-83
-84
-88
+00
+07
+46
+43
+47
 aa
 55
-74
+02
 00
-19
-49
-09
-5a
-26
-34
-19
-04
-09
+57
+46
+85
+90
+aa
+55
+02
 00
-ff
-ff
-09
 5a
-0d
-f0
-1d
-e3
-7d
-d2
-ff
-ff
-09
-5a
-0d
-10
-1d
-ed
-7d
-80
-ff
-ff
-1b
-35
-28
-b4
-29
 46
-2a
-96
-2b
-8c
-2c
-6e
-2d
-64
-38
-5f
-39
-0f
-3a
-32
-3b
-47
-42
-10
-ff
-ff
-54
-2e
-55
-f2
-61
-f4
-63
-70
 75
-52
-76
-41
-77
-ed
-78
-23
-79
-46
-7a
-e5
-7c
-48
-7e
-77
-7f
+80
+aa
+55
 01
-0b
 00
-7f
+59
+46
+63
+aa
+55
+01
 00
-09
+3e
+46
+7d
+aa
+55
+01
 00
-ff
-ff
-09
-5a
-ff
-27
-ab
-40
-be
-d1
-a0
-41
-a1
-12
-a7
-ff
-b6
+1d
+44
+01
+aa
+55
+01
 00
-b5
-c8
-a5
-af
-ff
+1f
+44
+0a
+aa
+55
+01
 00
-09
+1e
+44
 00
-ff
-ff
 aa
 55
-0c
+06
 00
-d1
-49
+44
+46
+dc
 05
-b9
-09
-5a
-0b
-72
+84
+03
+e8
+03
+aa
+55
+01
+00
+48
+41
 0c
-52
-09
+aa
+55
+06
 00
-ff
-ff
+c3
+40
+35
+3f
+64
+db
+7b
+3b
+aa
+55
+01
+00
+a7
+40
+20
 aa
 55
+03
+00
+c9
 40
 00
-91
-49
-09
-5a
-0d
-10
-0e
-c5
-5b
-9a
-10
-38
-11
-42
-28
-28
+08
+b4
+aa
+55
+01
+00
+99
+40
+18
+aa
+55
+01
+00
+1c
 41
-23
-49
-39
-4a
-b0
-4b
-a0
-4c
-90
-4d
-70
-09
+3e
+aa
+55
+0c
+00
+16
+00
 00
-ff
-ff
-09
-5a
-06
-02
-09
-69
-0d
-48
-0e
-9f
-0f
-ba
-09
 00
-ff
-ff
-09
-a5
-26
-34
-19
-04
-60
-07
-69
-04
-7d
 20
-7e
 00
-09
 00
-ff
-ff
+00
+00
+00
+00
+00
+00
+00
 aa
 55
-1c
+05
+00
+60
+41
+08
+0e
+05
+03
+00
+aa
+55
+01
 00
-dd
-49
-09
-a5
-46
-34
 6a
-c0
-69
-24
-09
+41
+20
+aa
+55
+02
 00
+9a
+40
+00
+0c
+aa
+55
+05
+00
+43
+41
 ff
-ff
-09
+04
+00
+00
+08
+aa
+55
+01
+00
+fa
+01
 5a
-0b
-f3
-09
+aa
+55
+01
 00
-ff
-ff
-09
-a5
-0b
-f3
-09
+27
+44
 00
+aa
+55
+04
+00
+23
+44
+00
+07
 ff
-ff
+07
+aa
 55
+01
+00
+4f
+44
+a0
 aa
+55
+02
+00
+52
+44
+bc
+02
 aa
 55
-a3
-6e
-46
-5d
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+02
+00
+50
+44
+90
+01
+aa
+55
+02
+00
+54
+44
+03
+09
+aa
+55
+01
+00
+49
+41
 ff
+aa
+55
+02
+00
+9c
+40
+49
+41
+aa
+55
+11
+00
+05
+49
+03
+04
+01
+02
+20
+2a
+3f
+15
+14
+1b
+0e
+11
+8a
+8b
+83
+84
+88
+aa
+55
+74
+00
+19
+49
+09
+5a
+26
+34
+19
+04
+09
+00
 ff
 ff
+09
+5a
+0d
+f0
+1d
+e3
+7d
+d2
 ff
 ff
+09
+5a
+0d
+10
+1d
+ed
+7d
+80
 ff
 ff
+1b
+35
+28
+b4
+29
+46
+2a
+96
+2b
+8c
+2c
+6e
+2d
+64
+38
+5f
+39
+0f
+3a
+32
+3b
+47
+42
+10
 ff
 ff
+54
+2e
+55
+f2
+61
+f4
+63
+70
+75
+52
+76
+41
+77
+ed
+78
+23
+79
+46
+7a
+e5
+7c
+48
+7e
+77
+7f
+01
+0b
+00
+7f
+00
+09
+00
 ff
 ff
+09
+5a
 ff
+27
+ab
+40
+be
+d1
+a0
+41
+a1
+12
+a7
 ff
+b6
+00
+b5
+c8
+a5
+af
 ff
+00
+09
+00
 ff
 ff
+aa
+55
+0c
+00
+d1
+49
+05
+b9
+09
+5a
+0b
+72
+0c
+52
+09
+00
 ff
 ff
+aa
+55
+40
+00
+91
+49
+09
+5a
+0d
+10
+0e
+c5
+5b
+9a
+10
+38
+11
+42
+28
+28
+41
+23
+49
+39
+4a
+b0
+4b
+a0
+4c
+90
+4d
+70
+09
+00
 ff
 ff
+09
+5a
+06
+02
+09
+69
+0d
+48
+0e
+9f
+0f
+ba
+09
+00
 ff
 ff
+09
+a5
+26
+34
+19
+04
+60
+07
+69
+04
+7d
+20
+7e
+00
+09
+00
 ff
 ff
+aa
+55
+1c
+00
+dd
+49
+09
+a5
+46
+34
+6a
+c0
+69
+24
+09
+00
 ff
 ff
+09
+5a
+0b
+f3
+09
+00
 ff
 ff
+09
+a5
+0b
+f3
+09
+00
 ff
 ff
+55
+aa
+aa
+55
+2c
+6f
+1d
+a5
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-ba
-2a
+b0
+ea
Index: output/memmap.format
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/memmap.format	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/memmap.format	(working copy)
@@ -1516,6 +1516,11 @@
 0x4ac5 mem_24g_matrix_cnt
 0x4ac6 mem_mouse_le_send_conn_param_update
 0x4ac7 mem_mouse_le_send_conn_param_update_timer
+0x4ac8 mem_le_conn_rcv_new
+0x4ac9 mem_le_conn_first_rcv
+0x4aca mem_le_check_retransmit_flag
+0x4acb mem_le_retransmit_cnt
+0x4acc mem_le_check_retransmit_discon_flag
 0x4644 mem_remote_lpm_gpio_config_flag
 0x4648 mem_remote_lpm_gpio_config_io_temp
 0x4649 mem_24g_tx_led_map
Index: output/otp.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/otp.dat	(revision 3897)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/otp.dat	(working copy)
@@ -9,840 +9,1194 @@
 00
 00
 00
+8f
+ab
+f1
+00
+3c
+ae
+c6
+03
+78
+5c
+8d
+07
+e0
+71
+35
+1e
 aa
 55
-3e
-03
-c2
-84
-00
-0b
-c0
-3e
-80
-0f
-c0
-3f
-00
-12
-c0
-44
-80
-1f
-c0
-4b
-80
-96
-c0
-47
-80
-2c
-c0
-48
-00
-52
-c0
-49
-80
-27
-c0
-4c
-80
-7d
-c0
-75
-00
-1c
-20
-20
+90
+04
+4e
+06
+a3
+35
+a2
+a9
+18
+b1
 23
-3e
-c0
-5f
-80
-64
-c0
+29
+a9
+a0
+50
+d5
+3b
+ad
+04
 64
-80
-6f
-c1
-7f
-80
-00
-20
-20
-23
-3e
-20
-40
-73
-88
-20
-40
-4e
-42
-20
-20
-4e
-3f
-20
-40
-53
-ab
-20
-40
-7d
-e6
-20
-40
-4f
-c9
-6f
-e0
-c8
-94
-20
-40
-52
-54
-68
-48
 c6
-65
-20
-40
+63
+27
+4a
+46
+76
+53
+fe
+aa
+dd
+ae
+08
+7a
+df
+5f
+51
+4e
+9b
+41
 4f
-02
 d8
-40
+e6
+32
+af
+bc
 00
-15
-20
-40
-4f
-0a
-20
-20
-4e
-4a
-20
-40
-6b
-28
-20
-40
-6b
-63
-20
-20
-6b
+42
+b2
+f9
+c1
+21
+52
+d4
 26
-1a
-62
+b4
+60
+af
+1b
+9e
+bb
+84
+2c
+6f
+f4
+b9
+a5
+04
+3e
+af
+c8
+35
+09
+57
+b9
+fa
+b8
+70
+ed
+81
 7e
-00
+dd
+22
+2a
+99
 67
-e0
-ca
-10
-1f
-e3
-fe
-00
-1f
-e2
+50
+17
+c1
+e7
+f5
+2a
+ec
+1c
+4d
+16
+fd
+34
+22
+ed
+db
+c5
+e7
+b0
+81
+4c
+11
+8f
+32
 24
-00
-18
-42
-26
-00
-20
-40
-6e
-f1
+ea
+13
+0d
+51
+ab
+84
+f4
 1a
-62
-04
-00
-20
-20
-52
-48
-20
-40
-00
-29
-20
-20
-54
-95
-da
-60
-4a
-c7
-da
-40
-54
-08
-20
-20
-37
-55
-1a
-62
-7e
-00
-c0
-1d
-00
-42
-c0
-20
-00
-39
-c0
+31
+7d
+8c
+05
+a6
+c2
+d7
 0a
-80
-3e
-c0
-19
-00
-32
-20
-20
 53
-dc
-6f
-e0
+6b
+0b
 c7
-54
-c0
-00
-80
-36
-70
-48
-83
-14
-20
-20
-54
-0f
-20
-40
-54
-08
-70
-48
+f4
 83
-05
-20
-20
-54
-0f
-6f
-e0
-ca
-c6
-24
-7a
-00
-00
-70
-4a
-c6
+d1
+1d
+21
+99
+d6
+5b
 01
-70
-4a
-c7
-1e
-20
-60
-00
-00
-58
-00
-00
-00
-67
-e0
-ca
+c8
+44
+23
 c6
-67
-e0
+5c
 ca
-c7
-20
-20
-53
-f9
-20
+0c
+ce
+a1
+1f
+f1
+d6
+4d
+2a
+6d
+0c
+99
+10
+b4
 40
-59
+fe
 2b
-20
-40
-59
-33
-6f
-e0
-c6
-17
-24
-3a
-59
+b2
+54
+19
+bb
+04
+1d
+66
 0a
-6f
-e0
-c5
-f9
-c0
-02
-d9
+f2
+24
+5f
+9f
+6d
+43
+bd
+18
+52
+ef
+85
+cc
+ed
+75
+d7
+bb
+e2
+be
+7f
+ab
+0c
+e4
+e4
+90
+18
+5e
+e9
+1c
+fc
+04
+c3
+9e
+b6
+db
+79
+7d
+25
+33
+e7
 8c
-c0
-00
 80
-4a
-20
+3e
+c6
+ed
 20
-59
-75
-6f
+c2
+2f
 e4
+a7
+f4
+54
+7d
+2f
+57
+7b
+a5
+ab
+9b
+0f
+82
+1c
+75
+4d
 47
-0e
-c2
-9f
-00
-4e
-c2
-98
-00
-4e
-20
-20
-59
-83
-6f
-e1
-45
-ed
-67
-e1
-45
-f5
-70
-45
-f9
-05
-20
-20
-35
-0a
-20
-40
-2a
-06
-24
-7a
-00
-00
-6f
-e0
-c7
+16
+68
+1d
+11
+08
+64
+79
+d5
+e5
+e9
+5f
+af
+92
+eb
+16
+5d
 4f
-c0
-7f
-80
-59
-6f
-e0
-c8
-82
-1f
-e1
-7e
+60
+ce
+fe
 03
-c1
-81
-80
-00
-6f
-e0
-c9
+54
+17
+f2
+0c
+b6
+b3
+fe
+62
 f9
-20
-5a
-53
-8b
+27
+1b
+03
+9d
 6f
-e4
-47
-0e
-c2
-80
-80
-61
-c2
-80
-00
-61
-c2
-82
-80
-61
-c2
-83
-00
-61
-20
-20
-54
-47
-58
-00
-00
-00
+86
+e7
+04
+0f
+16
+43
+41
+81
+35
+af
+44
+98
+40
+db
+ba
+5d
+bd
 67
-e3
-c6
-5c
-20
-20
-68
-3e
-6f
-e0
-c5
+46
+7c
 fa
-20
-3a
-32
 01
-6f
-e1
+af
+ca
+ab
+af
+a1
+fa
+27
+ac
+90
+55
+cc
+ba
+91
+33
+7d
+89
+0a
+8f
+30
+76
+98
+41
+bc
+54
+b5
+16
+2f
+9e
+98
 45
-f7
-1f
-e0
-fe
-01
-67
 e1
-45
-f7
-2f
-ef
-fe
-09
-6f
-e0
-c5
-f9
-c0
-02
-80
-6d
-20
-20
-35
-65
-20
-20
-b5
-1f
-20
-20
-32
-7a
-6f
-e0
-c3
-cf
-c0
-04
-00
+64
+4a
 72
-20
-20
-36
-3b
-6f
-e0
-c7
+d3
+03
+c9
+28
+ea
 52
-24
-7a
-00
-00
-20
+a0
+cd
 40
-00
-78
-6f
-e4
-47
-0e
-c3
-80
-80
-00
-20
-20
+e2
+08
 36
-3b
-d8
-e0
-00
-0c
-20
-40
-7c
+34
+a6
 f1
-24
-7a
-00
-00
-20
-40
-54
-d7
-20
-20
+96
+4d
+03
+cb
+68
+fb
+b9
+36
+81
+ea
+c6
+38
+ae
+2e
+bf
 59
-e6
-6f
-e4
-47
-0e
-2f
-ef
-fe
-12
-20
-40
-d6
-99
-20
-40
-80
-82
-20
-20
-56
-8d
-6f
-e0
+ba
+31
+4f
+eb
+fd
+b4
+55
+a5
+c2
+3a
+0a
+8a
+5f
+e5
+b2
+24
+88
+86
+69
+ff
+bd
+ae
+3c
+1f
+68
+4b
+93
+f4
 c6
-78
-c1
-00
-00
-00
-c0
-00
-80
 87
+c8
+ec
+cc
+c2
+13
+c9
+ad
+3c
+0f
+b7
+f0
+65
+7d
 c0
-01
-00
-8e
-20
-60
-00
-00
-6f
-e3
-46
-80
-68
-4b
-46
-f8
-98
-46
-7c
-00
-24
-62
-80
-00
-6f
-e3
+13
+16
+e7
+77
+cf
+65
+63
+d1
+38
+08
+e4
+0c
+c7
+d1
+8c
+11
+55
+ae
+58
+a8
+11
 42
-dd
-67
-e3
-46
-80
-20
-60
-00
-00
-6f
-e3
-46
-8d
-68
-4b
-46
+8a
+55
+10
+f9
+61
+90
+a4
+69
+14
+72
+36
 f8
-98
+87
+fd
+8a
+f3
+0c
+f3
+b9
+d1
+30
+19
+d1
+53
+15
+0f
+c7
+1a
+3e
 46
-7c
-00
-24
-62
-80
-00
+0e
+da
+d5
+4b
+8d
+90
+4d
+17
 6f
+56
+c2
 e3
-42
-dd
-1f
-e0
-ff
-00
-67
-e3
-46
-8d
-20
-60
-00
+e8
+a1
+7e
+52
+81
+f6
+52
+a2
+65
+d1
+b5
+91
+e9
+91
+5f
+59
+fa
+63
+fa
+b6
 00
-6f
+d4
+4a
+07
+d8
+48
+71
+ff
+90
+19
+96
 e4
-47
-0e
+f2
+2c
+8b
+f0
+fd
+72
+20
+a2
+c1
+85
+2e
+63
+d4
+93
+b4
+c6
+15
+f0
+f5
+6c
+e2
+a9
+f6
+4e
+f4
+f1
+31
+74
 c2
-88
-d5
-80
+ff
+c7
+b0
+42
+c6
+63
+1e
+90
+45
+3f
+26
+61
+18
+4f
+65
+1e
+27
+fd
+9c
+16
+7b
+72
+0b
+90
+bb
+4b
+82
+dc
+bf
+f7
+f6
+b6
+2b
 c2
-89
-00
-9a
-20
-60
-00
-00
-20
-40
-00
+d4
+a3
+eb
+07
+39
+93
+a7
+77
+12
 9d
-20
+83
+2e
+16
+c1
+0e
+3a
+5d
+3a
+13
+ae
+2a
+72
+e2
+7c
+c5
+72
+d0
+42
+1a
+7b
 40
-00
-a4
-20
-20
-55
-8b
-20
+59
+a2
+3e
+d0
+f2
+b1
+2d
+d5
+3c
+b5
+48
+e0
+d6
+14
+d1
+27
+57
+ce
+af
 40
-56
-99
-6f
-e1
-46
+63
+20
+1d
+1c
+64
+26
+f8
+d9
+c1
+c3
+95
 a0
-d8
-40
+cd
+cb
+99
 aa
-55
+9c
+0f
+f3
+d7
+32
+d7
+13
+9f
+5c
+1b
+e1
+e0
+cc
+5b
+ec
+f8
+19
+03
+15
+21
+2b
+37
+f8
+8a
+57
+ba
+75
+bd
+28
+c2
+c3
+58
+da
+0d
+69
+e1
+44
+1f
 98
-46
-7c
-00
-20
-62
-80
-00
-60
-49
-46
-a0
-20
-20
-56
-9d
+b2
+38
+b7
+22
+bd
+f3
+12
+48
+d6
+3f
+16
+f7
+6c
+1e
+4c
+3a
+bf
+e3
+2d
+5a
+eb
+68
+ab
+8f
+d3
+10
+6c
+1d
+59
+57
+ba
+e6
+17
+37
+97
+06
+1b
+7e
+d9
+95
+db
+43
+30
+d5
+b8
+b9
+1d
+27
+d8
+f5
+d6
+bb
+6f
+64
+64
+32
+16
+e9
+e1
+1b
+f7
+08
+01
+d9
+11
+0e
+83
+1f
+b1
+cb
+bf
+3e
+b6
+f8
+0e
+98
+9f
+68
+6c
 6f
-e0
 c6
-78
-c1
-00
-00
-00
-c0
-00
-80
+c8
+73
+47
+b2
+69
+4b
+aa
+a3
+0f
+b7
+b6
 a9
-c0
-01
-00
 bd
-20
-60
-00
-00
-6a
-41
-4a
-8b
-1a
-42
-26
-00
-20
-40
-56
-e5
-6f
-e3
-4a
-46
-20
-3a
-00
-b5
-67
-e3
-4a
+5f
+53
+b6
+69
+a7
+3b
+1f
+17
+86
+e8
+a0
+c2
+f8
+d4
+8d
+b1
+8d
+9c
+ad
+10
+09
+a5
 40
+0f
+cd
 1a
-60
-a6
+32
 06
-6f
-e1
-4a
-8d
-9a
-66
-7c
-00
-24
-61
-00
+4e
+6e
+c0
+43
+90
+c2
 00
-1a
+da
+82
+6c
+ee
+e9
+bc
+2a
+98
+9c
+ac
+c5
+1c
+27
+5d
+c1
+d4
+b9
+3d
 62
-24
-00
-20
-20
-00
+ed
+4e
+6c
+6c
+0c
+36
+d4
+4b
+ea
+f4
+fb
+02
+7e
+a3
+10
+bc
+38
+54
+67
+97
+a2
+8f
+e5
 ab
-6f
-e3
-4a
-40
 68
+ba
+a6
+f0
+57
+b5
+4a
+71
+bd
+db
+f6
+71
+57
+12
+b3
+cd
+64
+dc
+08
+1d
+0f
+e8
+b5
 4b
+cf
+86
+e7
+dc
 46
-80
-98
-46
-7c
-00
-20
-62
-80
-00
-da
-20
-46
-80
-df
-20
-00
+71
+b1
+99
+25
+9d
+fd
+f0
+68
+32
+69
+bb
+60
+b5
+36
+1d
+a2
+d0
+84
+3d
+13
+f1
 06
-1a
-62
-24
-00
-20
+d3
 20
+e8
+b2
+bb
 6b
-33
-6a
+63
+c6
+43
+72
+41
+6f
+46
+6f
+6f
+20
+48
 41
+32
+bc
+a4
+b8
+ea
+ff
+99
+ac
+14
+5b
+c9
+7c
+ca
+03
+f7
+01
+48
+c4
+75
+83
+43
+23
+3a
+f7
+b1
+64
+81
+fb
+5c
+9a
+ad
+5a
+90
+72
+c8
+79
+51
+e7
+08
+4c
+f2
+35
+85
+9a
+1e
+a1
 4a
-77
-1a
-42
-26
+ef
+e9
+7a
+fd
+b3
+be
+ad
+91
+f0
+4a
+7d
+9a
+12
+0b
+67
+09
+04
+da
+16
+e2
+dc
+19
+61
+94
+94
 00
-20
-40
-57
-0e
-6f
+07
+58
 e3
-4a
-5e
-20
+4d
+75
+39
+ac
+51
+5b
+5b
+b0
+ad
+4e
+d8
+4f
+0b
+51
+e6
+ff
+97
+aa
+02
+56
+99
+ea
+73
+1e
+49
 3a
-00
-c9
+cc
+12
+54
+96
 67
-e3
-4a
-58
-1a
-60
-a6
-06
-6f
+32
+b1
+84
+b1
+35
+19
 e1
-4a
-79
-9a
-66
-7c
-00
-24
-61
+f1
+2e
+c2
+e7
+b6
+17
+b6
+72
+31
 00
+ba
+ab
+ec
+01
+7d
+0a
+45
+26
+e7
+f0
+14
+76
+53
+10
+32
+4e
+94
 00
-1a
-62
 24
-00
-20
-20
-00
-bf
-6f
-e3
+dc
+4f
 4a
-58
-68
+ab
+c6
+95
+3b
+65
+25
+fd
+cc
+e1
+11
+e0
+71
+67
+0a
+be
+7f
+7e
 4b
-46
-8d
-98
-46
-7c
-00
-20
+52
+ec
+90
+d7
+45
+88
+b1
+d1
+1e
+5c
+15
+ad
+b3
+94
+87
+d6
+a9
+35
+94
+a3
+25
+22
+bf
+03
+8e
+30
+3d
+ca
+e8
+2a
+04
+d2
 62
-80
+52
+0c
+70
+62
+ed
+6e
+50
+40
+66
+b0
+3c
+6d
+cc
+f8
+2c
+2b
+74
+5a
+f7
+34
+79
+29
+dc
+06
+4f
+2c
+7d
+10
+01
 00
-da
-20
-46
+ed
+e2
+c4
+a6
+a8
+e4
+9d
+59
+e0
+03
+b2
+f6
+42
+c1
+95
+c3
+cd
+ee
+83
+8c
+07
+fd
+e1
+3e
+c3
+7f
 8d
-20
-20
-00
-ba
-d5
-52
+73
+75
+7a
+1a
+e3
+7d
+e7
+33
+cc
+11
+a6
+0f
 aa
 55
 40
@@ -851,6 +1205,7 @@
 40
 00
 00
+01
 00
 00
 00
@@ -863,11 +1218,10 @@
 00
 00
 00
-00
-60
+62
 00
 82
-89
+8d
 02
 00
 00
@@ -889,7 +1243,7 @@
 00
 00
 00
-00
+82
 00
 00
 00
@@ -2166,8 +2520,8 @@
 aa
 aa
 55
-a3
-6e
-46
-5d
+2c
+6f
+1d
+a5
 24
Index: output/program.lis
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/program.lis	(revision 3897)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/program.lis	(working copy)
@@ -1,288 +1,396 @@
               include "bt_format "
               org 0x0000
-0000 c284000b bbit1 8 ,pf_patch_ext 
-0001 c03e800f beq patch0f_5 ,p_mouse_before_hibernate 
-0002 c03f0012 beq patch0f_6 ,p_mouse_setgpio_hibernate 
-0003 c044801f beq patch11_1 ,p_mouse_3io6key_check 
-0004 c04b8096 beq patch12_7 ,p_mouse_store_device_info 
-0005 c047802c beq patch11_7 ,p_mouse_priority_bb_event 
-0006 c0480052 beq patch12_0 ,p_mouse_le 
-0007 c0498027 beq patch12_3 ,p_mouse_bb_event_timer 
-0008 c04c807d beq patch13_1 ,p_mouse_app_initflag_load_check 
-0009 c075001c beq patch1d_2 ,p_otp_read_data 
-000a 2020233e branch assert 
+0000 c284000e bbit1 8 ,pf_patch_ext 
+0001 c0080014 beq patch02_0 ,p_shutdown_radio 
+0002 c03e8016 beq patch0f_5 ,p_mouse_before_hibernate 
+0003 c03f0019 beq patch0f_6 ,p_mouse_setgpio_hibernate 
+0004 c03c811f beq patch0f_1 ,p_mouse_start_work 
+0005 c0448026 beq patch11_1 ,p_mouse_3io6key_check 
+0006 c0478033 beq patch11_7 ,p_mouse_priority_bb_event 
+0007 c049004f beq patch12_2 ,p_mouse_bb_disconnected 
+0008 c04b80e9 beq patch12_7 ,p_mouse_store_device_info 
+0009 c048006d beq patch12_0 ,p_mouse_le 
+000a c049802e beq patch12_3 ,p_mouse_bb_event_timer 
+000b c04c80d0 beq patch13_1 ,p_mouse_app_initflag_load_check 
+000c c0750023 beq patch1d_2 ,p_otp_read_data 
+000d 2020233e branch assert 
 
 pf_patch_ext:
-000b c05f8064 beq patch37_7 ,p_g24_reconn_device_fail 
-000c c064806f beq patch39_1 ,p_g24_retransmit 
-000d c17f8000 rtneq patch3f_7 
-000e 2020233e branch assert 
+000e c0208088 beq patch28_1 ,p_le_slave_match 
+000f c0238087 beq patch28_7 ,p_le_got_first_packet 
+0010 c05f80b7 beq patch37_7 ,p_g24_reconn_device_fail 
+0011 c06480c2 beq patch39_1 ,p_g24_retransmit 
+0012 c17f8000 rtneq patch3f_7 
+0013 2020233e branch assert 
+
+p_shutdown_radio:
+0014 70890000 jam 0 ,0x8900 
+0015 20202156 branch shutdown_radio + 1 
 
 p_mouse_before_hibernate:
-000f 20407388 call disable_authrom 
-0010 20404e42 call mouse_setgpio_hibernate 
-0011 20204e3f branch mouse_before_hibernate_next 
+0016 20407388 call disable_authrom 
+0017 20404e42 call mouse_setgpio_hibernate 
+0018 20204e3f branch mouse_before_hibernate_next 
 
 p_mouse_setgpio_hibernate:
-0012 204053ab call mouse_set_sdio_high 
-0013 20407de6 call clear_wake 
-0014 20404fc9 call mouse_before_hibernate_wheel_gpio_set 
-0015 6fe0c894 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-0016 20405254 call mouse_gpio_config_output_high 
-0017 6848c665 fetcht 1 ,mem_device_switch_gpio 
-0018 20404f02 call mouse_gpio_set_pupd_by_input 
-0019 d8400015 arg 21 ,temp 
-001a 20404f0a call device_gpio_config_input_pu 
-001b 20204e4a branch mouse_setgpio_hibernate_next 
+0019 204053ab call mouse_set_sdio_high 
+001a 20407de6 call clear_wake 
+001b 20404fc9 call mouse_before_hibernate_wheel_gpio_set 
+001c 6fe0c894 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+001d 20405254 call mouse_gpio_config_output_high 
+001e 6848c665 fetcht 1 ,mem_device_switch_gpio 
+001f 20404f02 call mouse_gpio_set_pupd_by_input 
+0020 d8400015 arg 21 ,temp 
+0021 20404f0a call device_gpio_config_input_pu 
+0022 20204e4a branch mouse_setgpio_hibernate_next 
 
 p_otp_read_data:
-001c 20406b28 call enable_otp_read 
-001d 20406b63 call otp_read_data1 
-001e 20206b26 branch otp_disable_chgpump 
+0023 20406b28 call enable_otp_read 
+0024 20406b63 call otp_read_data1 
+0025 20206b26 branch otp_disable_chgpump 
 
 p_mouse_3io6key_check:
-001f 1a627e00 copy regc ,pdata 
-0020 67e0ca10 store 1 ,mem_mouse_key_status 
-0021 1fe3fe00 lshift pdata ,pdata 
-0022 1fe22400 copy pdata ,regb 
-0023 18422600 copy temp ,regc 
-0024 20406ef1 call gpio_out_active 
-0025 1a620400 copy regc ,temp 
-0026 20205248 branch mouse_3io6key_check_next 
+0026 1a627e00 copy regc ,pdata 
+0027 67e0ca10 store 1 ,mem_mouse_key_status 
+0028 1fe3fe00 lshift pdata ,pdata 
+0029 1fe22400 copy pdata ,regb 
+002a 18422600 copy temp ,regc 
+002b 20406ef1 call gpio_out_active 
+002c 1a620400 copy regc ,temp 
+002d 20205248 branch mouse_3io6key_check_next 
 
 p_mouse_bb_event_timer:
-0027 20400029 call p_mouse_le_send_conn_param_update_timer 
-0028 20205495 branch mouse_bb_event_timer + 1 
+002e 20400030 call p_mouse_le_send_conn_param_update_timer 
+002f 20205495 branch mouse_bb_event_timer + 1 
 
 p_mouse_le_send_conn_param_update_timer:
-0029 da604ac7 arg mem_mouse_le_send_conn_param_update_timer ,regc 
-002a da405408 arg mouse_updata_le_param ,regb 
-002b 20203755 branch timer_single_step 
+0030 da604ac7 arg mem_mouse_le_send_conn_param_update_timer ,regc 
+0031 da405408 arg mouse_updata_le_param ,regb 
+0032 20203755 branch timer_single_step 
 
 p_mouse_priority_bb_event:
-002c 1a627e00 copy regc ,pdata 
-002d c01d0042 beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
-002e c0200039 beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
-002f c00a803e beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
-0030 c0190032 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
-0031 202053dc branch mouse_priority_bb_event + 2 
+0033 1a627e00 copy regc ,pdata 
+0034 c01d005d beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
+0035 c0200046 beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
+0036 c00a804b beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
+0037 c019003d beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+0038 c00a53e9 beq bt_evt_le_connected ,mouse_le_bb_event_connected 
+0039 202053dc branch mouse_priority_bb_event + 2 
+
+p_mouse_le_bb_event_connected:
+003a 58000000 setarg 0 
+003b 67e24ac9 store 4 ,mem_le_conn_first_rcv 
+003c 202053e9 branch mouse_le_bb_event_connected 
 
 p_mouse_le_ll_start_encryt:
-0032 6fe0c754 fetch 1 ,mem_device_le_reconnect_flag 
-0033 c0008036 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
-0034 70488314 jam 20 ,mem_le_start_encrypt_timer 
-0035 2020540f branch mouse_le_ll_enable_start_enc_flag 
+003d 6fe0c754 fetch 1 ,mem_device_le_reconnect_flag 
+003e c0008041 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+003f 70488314 jam 20 ,mem_le_start_encrypt_timer 
+0040 20200043 branch p_mouse_le_ll_reconn_start_encryt_new 
 
 p_mouse_le_ll_reconn_start_encryt:
-0036 20405408 call mouse_updata_le_param 
-0037 70488305 jam 5 ,mem_le_start_encrypt_timer 
-0038 2020540f branch mouse_le_ll_enable_start_enc_flag 
+0041 20405408 call mouse_updata_le_param 
+0042 70488305 jam 5 ,mem_le_start_encrypt_timer 
+
+p_mouse_le_ll_reconn_start_encryt_new:
+0043 6fe0cac8 fetch 1 ,mem_le_conn_rcv_new 
+0044 67e0cac9 store 1 ,mem_le_conn_first_rcv 
+0045 2020540f branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_conn_param_update_rsp_recieved:
-0039 6fe0cac6 fetch 1 ,mem_mouse_le_send_conn_param_update 
-003a 247a0000 nrtn blank 
-003b 704ac601 jam 1 ,mem_mouse_le_send_conn_param_update 
-003c 704ac71e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
-003d 20600000 rtn 
+0046 6fe0cac6 fetch 1 ,mem_mouse_le_send_conn_param_update 
+0047 247a0000 nrtn blank 
+0048 704ac601 jam 1 ,mem_mouse_le_send_conn_param_update 
+0049 704ac71e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
+004a 20600000 rtn 
 
 p_mouse_le_bb_disconnected:
-003e 58000000 setarg 0 
-003f 67e0cac6 store 1 ,mem_mouse_le_send_conn_param_update 
-0040 67e0cac7 store 1 ,mem_mouse_le_send_conn_param_update_timer 
-0041 202053f9 branch mouse_le_bb_disconnected 
+004b 58000000 setarg 0 
+004c 67e0cac6 store 1 ,mem_mouse_le_send_conn_param_update 
+004d 67e0cac7 store 1 ,mem_mouse_le_send_conn_param_update_timer 
+004e 202053f9 branch mouse_le_bb_disconnected 
+
+p_mouse_bb_disconnected:
+004f 2040548a call mouse_bb_discon_clear_stack 
+0050 6fe143f8 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+0051 c2838054 bbit1 app_disc_ble ,p_mouse4_0_event_bb_disconn 
+0052 c2803771 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+0053 20205544 branch mouse_start_discovery 
+
+p_mouse4_0_event_bb_disconn:
+0054 20404882 call mem_le_connect_status_flag 
+0055 6fe143f8 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+0056 c2803771 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+0057 6fe0c882 fetch 1 ,mem_le_connect_status_flag 
+0058 1fe17e03 and pdata ,0x03 ,pdata 
+0059 c081ce11 bne 0x03 ,mouse_start_reconnect 
+005a 6fe0cacc fetch 1 ,mem_le_check_retransmit_discon_flag 
+005b 243a4e11 nbranch mouse_start_reconnect ,blank 
+005c 20204e35 branch mouse_app_enter_hibernate 
 
 p_mouse_24g_attempt_fail:
-0042 2040592b call mouse_soft_agc_disable 
-0043 20405933 call device_fetch_normal_tx_power 
-0044 6fe0c617 fetch 1 ,mem_24g_attempt_fail_flag 
-0045 243a590a nbranch mouse_24g_hibernate_set ,blank 
-0046 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
-0047 c002d98c beq pair_and_receiver ,mouse_24g_auto_pair_attempt_fail 
-0048 c000804a beq fast_conn_and_receiver ,p_mouse_24g_fast_conn_attempt_fail 
-0049 20205975 branch mouse_24g_attempt_fail + 4 
+005d 2040592b call mouse_soft_agc_disable 
+005e 20405933 call device_fetch_normal_tx_power 
+005f 6fe0c617 fetch 1 ,mem_24g_attempt_fail_flag 
+0060 243a590a nbranch mouse_24g_hibernate_set ,blank 
+0061 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
+0062 c002d98c beq pair_and_receiver ,mouse_24g_auto_pair_attempt_fail 
+0063 c0008065 beq fast_conn_and_receiver ,p_mouse_24g_fast_conn_attempt_fail 
+0064 20205975 branch mouse_24g_attempt_fail + 4 
 
 p_mouse_24g_fast_conn_attempt_fail:
-004a 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-004b c29f004e bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_start_auto_pair 
-004c c298004e bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_start_auto_pair 
-004d 20205983 branch mouse_24g_fast_conn_attempt_fail + 3 
+0065 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+0066 c29f0069 bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_start_auto_pair 
+0067 c2980069 bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_start_auto_pair 
+0068 20205983 branch mouse_24g_fast_conn_attempt_fail + 3 
 
 p_mouse_24g_start_auto_pair:
-004e 6fe145ed fetch 2 ,mem_24g_pair_timeout_init 
-004f 67e145f5 store 2 ,mem_24g_reconn_timeout 
-0050 7045f905 jam pair_and_receiver ,mem_24g_reconn_type 
-0051 2020350a branch g24_reconn_start 
+0069 6fe145ed fetch 2 ,mem_24g_pair_timeout_init 
+006a 67e145f5 store 2 ,mem_24g_reconn_timeout 
+006b 7045f905 jam pair_and_receiver ,mem_24g_reconn_type 
+006c 2020350a branch g24_reconn_start 
 
 p_mouse_le:
-0052 20402a06 call le_fifo_check_nearly_full 
-0053 247a0000 nrtn blank 
-0054 6fe0c74f fetch 1 ,mem_device_fast_conn_flag 
-0055 c07f8059 beq 0xff ,p_mouse_le_next 
-0056 6fe0c882 fetch 1 ,mem_le_connect_status_flag 
-0057 1fe17e03 and pdata ,0x03 ,pdata 
-0058 c1818000 rtnne 0x03 
+006d 20402a06 call le_fifo_check_nearly_full 
+006e 247a0000 nrtn blank 
+006f 6fe0c74f fetch 1 ,mem_device_fast_conn_flag 
+0070 c07f8078 beq 0xff ,p_mouse_le_next 
+0071 6fe0c882 fetch 1 ,mem_le_connect_status_flag 
+0072 1fe17e03 and pdata ,0x03 ,pdata 
+0073 c1818000 rtnne 0x03 
+0074 6fe0caca fetch 1 ,mem_le_check_retransmit_flag 
+0075 207a0000 rtn blank 
+0076 6fe0cacc fetch 1 ,mem_le_check_retransmit_discon_flag 
+0077 247a0000 nrtn blank 
 
 p_mouse_le_next:
-0059 6fe0c9f9 fetch 1 ,mem_mouse_clear_sensor_data_flag 
-005a 205a538b call mouse_clear_sensor_data_by_reset ,blank 
-005b 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-005c c2808061 bbit1 mouse_24g_pairing_flag ,p_mouse_le_send_empty_packet 
-005d c2800061 bbit1 mouse_select_device_flag ,p_mouse_le_send_empty_packet 
-005e c2828061 bbit1 mouse_bt_discovery_button_down_flag ,p_mouse_le_send_empty_packet 
-005f c2830061 bbit1 mouse_bt_discovery_button_long_down_flag ,p_mouse_le_send_empty_packet 
-0060 20205447 branch mouse_le_package 
+0078 6fe0c9f9 fetch 1 ,mem_mouse_clear_sensor_data_flag 
+0079 205a538b call mouse_clear_sensor_data_by_reset ,blank 
+007a 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+007b c2808080 bbit1 mouse_24g_pairing_flag ,p_mouse_le_send_empty_packet 
+007c c2800080 bbit1 mouse_select_device_flag ,p_mouse_le_send_empty_packet 
+007d c2828080 bbit1 mouse_bt_discovery_button_down_flag ,p_mouse_le_send_empty_packet 
+007e c2830080 bbit1 mouse_bt_discovery_button_long_down_flag ,p_mouse_le_send_empty_packet 
+007f 20205447 branch mouse_le_package 
 
 p_mouse_le_send_empty_packet:
-0061 58000000 setarg 0 
-0062 67e3c65c store 7 ,mem_mouse_key 
-0063 2020683e branch hid_device_le_send_mouse_data 
+0080 58000000 setarg 0 
+0081 67e3c65c store 7 ,mem_mouse_key 
+0082 2020683e branch hid_device_le_send_mouse_data 
+
+p_le_check_retransmit_timesout:
+0083 6fe0cac8 fetch 1 ,mem_le_conn_rcv_new 
+0084 da600100 arg 256 ,regc 
+0085 9a60fe00 iadd regc ,pdata 
+0086 20600000 rtn 
+
+p_le_got_first_packet:
+0087 202000a7 branch p_le_got_first_packet_new 
+
+p_le_slave_match:
+0088 2040008a call p_le_check_retransmit 
+0089 20202539 branch le_slave_match + 1 
+
+p_le_check_retransmit:
+008a 6fe0cac9 fetch 1 ,mem_le_conn_first_rcv 
+008b 207a0000 rtn blank 
+008c 6fe0caca fetch 1 ,mem_le_check_retransmit_flag 
+008d 247a0000 nrtn blank 
+008e 6848cac9 fetcht 1 ,mem_le_conn_first_rcv 
+008f 6fe0cac8 fetch 1 ,mem_le_conn_rcv_new 
+0090 98467c00 isub temp ,null 
+0091 24410083 ncall p_le_check_retransmit_timesout ,positive 
+0092 98467e00 isub temp ,pdata 
+0093 1fe67c64 sub pdata ,100 ,null 
+0094 2021009c branch p_le_check_retransmit_count ,positive 
+0095 6fe0cacb fetch 1 ,mem_le_retransmit_cnt 
+0096 1fe67c14 sub pdata ,20 ,null 
+0097 2441009a ncall p_app_ble_disconnect ,positive 
+0098 704aca01 jam 1 ,mem_le_check_retransmit_flag 
+0099 20600000 rtn 
+
+p_app_ble_disconnect:
+009a 704acc01 jam 1 ,mem_le_check_retransmit_discon_flag 
+009b 20203794 branch app_ble_disconnect 
+
+p_le_check_retransmit_count:
+009c 6848817f fetcht 1 ,mem_le_arq 
+009d 6fe0804c fetch 1 ,mem_le_rxbuf_data_header 
+009e 1fe37e00 rshift pdata ,pdata 
+009f 9842fe00 ixor temp ,pdata 
+00a0 2feffe02 isolate1 nesn ,pdata 
+00a1 58000000 setarg 0 
+00a2 6848cacb fetcht 1 ,mem_le_retransmit_cnt 
+00a3 7920fe00 setflag true ,0 ,pdata 
+00a4 98408400 iadd temp ,temp 
+00a5 6048cacb storet 1 ,mem_le_retransmit_cnt 
+00a6 20600000 rtn 
+
+p_le_got_first_packet_new:
+00a7 6fe08005 fetch 1 ,mem_le_conn_rcv 
+00a8 1fe0fe01 increase 1 ,pdata 
+00a9 67e08005 store 1 ,mem_le_conn_rcv 
+00aa 243680ae nbranch p_le_got_first_packet_new + 7 ,match 
+00ab 6fe0cac8 fetch 1 ,mem_le_conn_rcv_new 
+00ac 1fe0fe01 increase 1 ,pdata 
+00ad 67e0cac8 store 1 ,mem_le_conn_rcv_new 
+00ae 6fe08168 fetch 1 ,mem_le_state 
+00af c3818000 rtnbit1 lestate_got_first_packet 
+00b0 79207e03 set1 lestate_got_first_packet ,pdata 
+00b1 67e08168 store 1 ,mem_le_state 
+00b2 6fe142f7 fetch 2 ,mem_le_init_superto 
+00b3 67e10196 store 2 ,mem_le_superto 
+00b4 58000000 setarg 0 
+00b5 67e2431f store 4 ,mem_le_transmit_window 
+00b6 20600000 rtn 
 
 p_g24_reconn_device_fail:
-0064 6fe0c5fa fetch 1 ,mem_24g_fast_conn_enable 
-0065 203a3201 branch g24_ch ,blank 
-0066 6fe145f7 fetch 2 ,mem_24g_reconn_count 
-0067 1fe0fe01 increase 1 ,pdata 
-0068 67e145f7 store 2 ,mem_24g_reconn_count 
-0069 2feffe09 isolate1 9 ,pdata 
-006a 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
-006b c002806d beq pair_and_receiver ,p_g24_reconn_pair_and_receiver 
-006c 20203565 branch g24_reconn_device_fail + 7 
+00b7 6fe0c5fa fetch 1 ,mem_24g_fast_conn_enable 
+00b8 203a3201 branch g24_ch ,blank 
+00b9 6fe145f7 fetch 2 ,mem_24g_reconn_count 
+00ba 1fe0fe01 increase 1 ,pdata 
+00bb 67e145f7 store 2 ,mem_24g_reconn_count 
+00bc 2feffe09 isolate1 9 ,pdata 
+00bd 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
+00be c00280c0 beq pair_and_receiver ,p_g24_reconn_pair_and_receiver 
+00bf 20203565 branch g24_reconn_device_fail + 7 
 
 p_g24_reconn_pair_and_receiver:
-006d 2020b51f branch g24_reconn_receiver_addr ,true 
-006e 2020327a branch g24_pair_init_param 
+00c0 2020b51f branch g24_reconn_receiver_addr ,true 
+00c1 2020327a branch g24_pair_init_param 
 
 p_g24_retransmit:
-006f 6fe0c3cf fetch 1 ,mem_device_option 
-0070 c0040072 beq dvc_op_mouse ,p_mouse_g24_retransmit 
-0071 2020363b branch g24_retransmit0 
+00c2 6fe0c3cf fetch 1 ,mem_device_option 
+00c3 c00400c5 beq dvc_op_mouse ,p_mouse_g24_retransmit 
+00c4 2020363b branch g24_retransmit0 
 
 p_mouse_g24_retransmit:
-0072 6fe0c752 fetch 1 ,mem_device_need_soft_reset 
-0073 247a0000 nrtn blank 
-0074 20400078 call p_mouse_g24_retransmit_100ms_timer 
-0075 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-0076 c3808000 rtnbit1 mouse_24g_pairing_flag 
-0077 2020363b branch g24_retransmit0 
+00c5 6fe0c752 fetch 1 ,mem_device_need_soft_reset 
+00c6 247a0000 nrtn blank 
+00c7 204000cb call p_mouse_g24_retransmit_100ms_timer 
+00c8 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+00c9 c3808000 rtnbit1 mouse_24g_pairing_flag 
+00ca 2020363b branch g24_retransmit0 
 
 p_mouse_g24_retransmit_100ms_timer:
-0078 d8e0000c arg 12 ,queue 
-0079 20407cf1 call timer_check 
-007a 247a0000 nrtn blank 
-007b 204054d7 call mouse_commbination_key_process 
-007c 202059e6 branch mouse_g24_retransmit_100ms_timer_next 
+00cb d8e0000c arg 12 ,queue 
+00cc 20407cf1 call timer_check 
+00cd 247a0000 nrtn blank 
+00ce 204054d7 call mouse_commbination_key_process 
+00cf 202059e6 branch mouse_g24_retransmit_100ms_timer_next 
 
 p_mouse_app_initflag_load_check:
-007d 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-007e 2feffe12 isolate1 mouse_enable_otp ,pdata 
-007f 2040d699 call mouse_otp_load_app_initflag ,true 
-0080 20408082 call p_mouse_le_locall_addr_init_check ,true 
-0081 2020568d branch mouse_app_initflag_load_check + 4 
+00d0 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+00d1 2feffe12 isolate1 mouse_enable_otp ,pdata 
+00d2 2040d699 call mouse_otp_load_app_initflag ,true 
+00d3 204080d5 call p_mouse_le_locall_addr_init_check ,true 
+00d4 2020568d branch mouse_app_initflag_load_check + 4 
 
 p_mouse_le_locall_addr_init_check:
-0082 6fe0c678 fetch 1 ,mem_device_flag 
-0083 c1000000 rtneq mode_24g_device 
-0084 c0008087 beq mode_bt_device1 ,p_mouse_le_device1_locall_addr_init_check 
-0085 c001008e beq mode_bt_device2 ,p_mouse_le_device2_locall_addr_init_check 
-0086 20600000 rtn 
+00d5 6fe0c678 fetch 1 ,mem_device_flag 
+00d6 c1000000 rtneq mode_24g_device 
+00d7 c00080da beq mode_bt_device1 ,p_mouse_le_device1_locall_addr_init_check 
+00d8 c00100e1 beq mode_bt_device2 ,p_mouse_le_device2_locall_addr_init_check 
+00d9 20600000 rtn 
 
 p_mouse_le_device1_locall_addr_init_check:
-0087 6fe34680 fetch 6 ,mem_device1_locall_addr 
-0088 684b46f8 fetcht 6 ,mem_device_compare_addr 
-0089 98467c00 isub temp ,null 
-008a 24628000 nrtn zero 
-008b 6fe342dd fetch 6 ,mem_le_lap 
-008c 67e34680 store 6 ,mem_device1_locall_addr 
-008d 20600000 rtn 
+00da 6fe34680 fetch 6 ,mem_device1_locall_addr 
+00db 684b46f8 fetcht 6 ,mem_device_compare_addr 
+00dc 98467c00 isub temp ,null 
+00dd 24628000 nrtn zero 
+00de 6fe342dd fetch 6 ,mem_le_lap 
+00df 67e34680 store 6 ,mem_device1_locall_addr 
+00e0 20600000 rtn 
 
 p_mouse_le_device2_locall_addr_init_check:
-008e 6fe3468d fetch 6 ,mem_device2_locall_addr 
-008f 684b46f8 fetcht 6 ,mem_device_compare_addr 
-0090 98467c00 isub temp ,null 
-0091 24628000 nrtn zero 
-0092 6fe342dd fetch 6 ,mem_le_lap 
-0093 1fe0ff00 add pdata ,0x0100 ,pdata 
-0094 67e3468d store 6 ,mem_device2_locall_addr 
-0095 20600000 rtn 
+00e1 6fe3468d fetch 6 ,mem_device2_locall_addr 
+00e2 684b46f8 fetcht 6 ,mem_device_compare_addr 
+00e3 98467c00 isub temp ,null 
+00e4 24628000 nrtn zero 
+00e5 6fe342dd fetch 6 ,mem_le_lap 
+00e6 1fe0ff00 add pdata ,0x0100 ,pdata 
+00e7 67e3468d store 6 ,mem_device2_locall_addr 
+00e8 20600000 rtn 
 
 p_mouse_store_device_info:
-0096 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-0097 c288d580 bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
-0098 c289009a bbit1 mouse_enable_otp ,p_mouse_store_otp_device_info 
-0099 20600000 rtn 
+00e9 20600000 rtn 
 
 p_mouse_store_otp_device_info:
-009a 2040009d call p_mouse_write_otp_app_initflag 
-009b 204000a4 call p_mouse_write_otp_locall_addr 
-009c 2020558b branch mouse_store_otp_device_info + 1 
+00ea 204000ed call p_mouse_write_otp_app_initflag 
+00eb 204000f4 call p_mouse_write_otp_locall_addr 
+00ec 2020558b branch mouse_store_otp_device_info + 1 
 
 p_mouse_write_otp_app_initflag:
-009d 20405699 call mouse_otp_load_app_initflag 
-009e 6fe146a0 fetch 2 ,mem_store_flag 
-009f d840aa55 arg eeprom_init_flag ,temp 
-00a0 98467c00 isub temp ,null 
-00a1 20628000 rtn zero 
-00a2 604946a0 storet 2 ,mem_store_flag 
-00a3 2020569d branch mouse_otp_store_app_initflag 
+00ed 20405699 call mouse_otp_load_app_initflag 
+00ee 6fe146a0 fetch 2 ,mem_store_flag 
+00ef d840aa55 arg eeprom_init_flag ,temp 
+00f0 98467c00 isub temp ,null 
+00f1 20628000 rtn zero 
+00f2 604946a0 storet 2 ,mem_store_flag 
+00f3 2020569d branch mouse_otp_store_app_initflag 
 
 p_mouse_write_otp_locall_addr:
-00a4 6fe0c678 fetch 1 ,mem_device_flag 
-00a5 c1000000 rtneq mode_24g_device 
-00a6 c00080a9 beq mode_bt_device1 ,p_mouse_write_otp_le_locall_addr1 
-00a7 c00100bd beq mode_bt_device2 ,p_mouse_write_otp_le_locall_addr2 
-00a8 20600000 rtn 
+00f4 6fe0c678 fetch 1 ,mem_device_flag 
+00f5 c1000000 rtneq mode_24g_device 
+00f6 c00080f9 beq mode_bt_device1 ,p_mouse_write_otp_le_locall_addr1 
+00f7 c001010d beq mode_bt_device2 ,p_mouse_write_otp_le_locall_addr2 
+00f8 20600000 rtn 
 
 p_mouse_write_otp_le_locall_addr1:
-00a9 6a414a8b fetchr regb ,2 ,mem_otp_offset_le_locall_addr1 
-00aa 1a422600 copy regb ,regc 
+00f9 6a414a8b fetchr regb ,2 ,mem_otp_offset_le_locall_addr1 
+00fa 1a422600 copy regb ,regc 
 
 p_mouse_write_otp_le_locall_addr1_loop:
-00ab 204056e5 call mouse_read_otp_le_locall_addr1_common 
-00ac 6fe34a46 fetch 6 ,mem_mouse_le_locall_addr1_temp 
-00ad 203a00b5 branch p_mouse_le_local_addr1_store ,blank 
-00ae 67e34a40 store 6 ,mem_mouse_le_locall_addr1_last 
-00af 1a60a606 increase 6 ,regc 
-00b0 6fe14a8d fetch 2 ,mem_otp_offset_le_locall_addr1_end 
-00b1 9a667c00 isub regc ,null 
-00b2 24610000 nrtn positive 
-00b3 1a622400 copy regc ,regb 
-00b4 202000ab branch p_mouse_write_otp_le_locall_addr1_loop 
+00fb 204056e5 call mouse_read_otp_le_locall_addr1_common 
+00fc 6fe34a46 fetch 6 ,mem_mouse_le_locall_addr1_temp 
+00fd 203a0105 branch p_mouse_le_local_addr1_store ,blank 
+00fe 67e34a40 store 6 ,mem_mouse_le_locall_addr1_last 
+00ff 1a60a606 increase 6 ,regc 
+0100 6fe14a8d fetch 2 ,mem_otp_offset_le_locall_addr1_end 
+0101 9a667c00 isub regc ,null 
+0102 24610000 nrtn positive 
+0103 1a622400 copy regc ,regb 
+0104 202000fb branch p_mouse_write_otp_le_locall_addr1_loop 
 
 p_mouse_le_local_addr1_store:
-00b5 6fe34a40 fetch 6 ,mem_mouse_le_locall_addr1_last 
-00b6 684b4680 fetcht 6 ,mem_device1_locall_addr 
-00b7 98467c00 isub temp ,null 
-00b8 20628000 rtn zero 
-00b9 da204680 arg mem_device1_locall_addr ,rega 
+0105 6fe34a40 fetch 6 ,mem_mouse_le_locall_addr1_last 
+0106 684b4680 fetcht 6 ,mem_device1_locall_addr 
+0107 98467c00 isub temp ,null 
+0108 20628000 rtn zero 
+0109 da204680 arg mem_device1_locall_addr ,rega 
 
 p_mouse_le_addr_write:
-00ba df200006 arg 6 ,loopcnt 
-00bb 1a622400 copy regc ,regb 
-00bc 20206b33 branch otp_write 
+010a df200006 arg 6 ,loopcnt 
+010b 1a622400 copy regc ,regb 
+010c 20206b33 branch otp_write 
 
 p_mouse_write_otp_le_locall_addr2:
-00bd 6a414a77 fetchr regb ,2 ,mem_otp_offset_le_locall_addr2 
-00be 1a422600 copy regb ,regc 
+010d 6a414a77 fetchr regb ,2 ,mem_otp_offset_le_locall_addr2 
+010e 1a422600 copy regb ,regc 
 
 p_mouse_write_otp_le_locall_addr2_loop:
-00bf 2040570e call mouse_read_otp_le_locall_addr2_common 
-00c0 6fe34a5e fetch 6 ,mem_mouse_le_locall_addr2_temp 
-00c1 203a00c9 branch p_mouse_le_local_addr2_store ,blank 
-00c2 67e34a58 store 6 ,mem_mouse_le_locall_addr2_last 
-00c3 1a60a606 increase 6 ,regc 
-00c4 6fe14a79 fetch 2 ,mem_otp_offset_le_locall_addr2_end 
-00c5 9a667c00 isub regc ,null 
-00c6 24610000 nrtn positive 
-00c7 1a622400 copy regc ,regb 
-00c8 202000bf branch p_mouse_write_otp_le_locall_addr2_loop 
+010f 2040570e call mouse_read_otp_le_locall_addr2_common 
+0110 6fe34a5e fetch 6 ,mem_mouse_le_locall_addr2_temp 
+0111 203a0119 branch p_mouse_le_local_addr2_store ,blank 
+0112 67e34a58 store 6 ,mem_mouse_le_locall_addr2_last 
+0113 1a60a606 increase 6 ,regc 
+0114 6fe14a79 fetch 2 ,mem_otp_offset_le_locall_addr2_end 
+0115 9a667c00 isub regc ,null 
+0116 24610000 nrtn positive 
+0117 1a622400 copy regc ,regb 
+0118 2020010f branch p_mouse_write_otp_le_locall_addr2_loop 
 
 p_mouse_le_local_addr2_store:
-00c9 6fe34a58 fetch 6 ,mem_mouse_le_locall_addr2_last 
-00ca 684b468d fetcht 6 ,mem_device2_locall_addr 
-00cb 98467c00 isub temp ,null 
-00cc 20628000 rtn zero 
-00cd da20468d arg mem_device2_locall_addr ,rega 
-00ce 202000ba branch p_mouse_le_addr_write 
+0119 6fe34a58 fetch 6 ,mem_mouse_le_locall_addr2_last 
+011a 684b468d fetcht 6 ,mem_device2_locall_addr 
+011b 98467c00 isub temp ,null 
+011c 20628000 rtn zero 
+011d da20468d arg mem_device2_locall_addr ,rega 
+011e 2020010a branch p_mouse_le_addr_write 
+
+p_mouse_start_work:
+011f 20403717 call app_param_init 
+0120 20204df6 branch mouse_start_work + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/program/patch.prog	(revision 3897)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/program/patch.prog	(working copy)
@@ -1,10 +1,13 @@
-// define TEST_MODE
+define TEST_MODE
 //define AUTO_TEST
 define G24_RETRANSMIT_COMMBINATION_PAIR
+define BLE_CHECK_RETRANSMIT
 
 
 	bbit1 8,pf_patch_ext
 
+
+	beq patch02_0,p_shutdown_radio
 	beq patch0f_5,p_mouse_before_hibernate
 	beq patch0f_6,p_mouse_setgpio_hibernate
 ifdef TEST_MODE
@@ -16,8 +19,11 @@
 	beq patch11_3,p_mouse_init_sensor
 endif
 	beq patch11_1,p_mouse_3io6key_check
-	beq patch12_7,p_mouse_store_device_info
 	beq patch11_7,p_mouse_priority_bb_event
+ifdef BLE_CHECK_RETRANSMIT
+	beq patch12_2,p_mouse_bb_disconnected
+endif
+	beq patch12_7,p_mouse_store_device_info
 	beq patch12_0,p_mouse_le
 	beq patch12_3,p_mouse_bb_event_timer
 	beq patch13_1,p_mouse_app_initflag_load_check
@@ -25,6 +31,10 @@
 	branch assert
 
 pf_patch_ext:
+ifdef BLE_CHECK_RETRANSMIT
+	beq patch28_1,p_le_slave_match
+	beq patch28_7,p_le_got_first_packet
+endif
 	beq patch37_7,p_g24_reconn_device_fail
 ifdef G24_RETRANSMIT_COMMBINATION_PAIR
 	beq patch39_1,p_g24_retransmit
@@ -32,6 +42,10 @@
 	rtneq patch3f_7
 	branch assert
 
+p_shutdown_radio:
+	jam 0,0x8900
+	branch shutdown_radio+1
+
 p_mouse_before_hibernate:
 	call disable_authrom 
 	call mouse_setgpio_hibernate
@@ -83,16 +97,33 @@
 	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,p_mouse_le_conn_param_update_rsp_recieved
 	beq BT_EVT_LE_DISCONNECTED,p_mouse_le_bb_disconnected
 	beq BT_EVT_LE_START_ENC,p_mouse_le_ll_start_encryt
+
+	beq BT_EVT_LE_CONNECTED,mouse_le_bb_event_connected
 	branch mouse_priority_bb_event+2
+p_mouse_le_bb_event_connected:
+ifdef BLE_CHECK_RETRANSMIT
+	setarg 0
+	store 4,mem_le_conn_first_rcv
+endif
+	branch mouse_le_bb_event_connected
 
 p_mouse_le_ll_start_encryt:
 	fetch 1,mem_device_le_reconnect_flag
 	beq 1,p_mouse_le_ll_reconn_start_encryt
 	jam 20,mem_le_start_encrypt_timer
+ifdef BLE_CHECK_RETRANSMIT
+	branch p_mouse_le_ll_reconn_start_encryt_new
+else
 	branch mouse_le_ll_enable_start_enc_flag
+endif
 p_mouse_le_ll_reconn_start_encryt:
 	call mouse_updata_le_param
 	jam 5,mem_le_start_encrypt_timer
+ifdef BLE_CHECK_RETRANSMIT
+p_mouse_le_ll_reconn_start_encryt_new:	
+	fetch 1,mem_le_conn_rcv_new
+	store 1,mem_le_conn_first_rcv
+endif
 	branch mouse_le_ll_enable_start_enc_flag
 
 p_mouse_le_conn_param_update_rsp_recieved:
@@ -108,6 +139,25 @@
 	store 1,mem_mouse_le_send_conn_param_update_timer
 	branch mouse_le_bb_disconnected
 
+ifdef BLE_CHECK_RETRANSMIT
+p_mouse_bb_disconnected:
+	call mouse_bb_discon_clear_stack
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BLE,p_mouse4_0_event_bb_disconn
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	branch mouse_start_discovery
+p_mouse4_0_event_bb_disconn:
+	call mem_le_connect_status_flag
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	bne 0x03,mouse_start_reconnect
+	fetch 1,mem_le_check_retransmit_discon_flag
+	nbranch mouse_start_reconnect,blank
+	branch mouse_app_enter_hibernate
+endif
+
 p_mouse_24g_attempt_fail:
 	call mouse_soft_agc_disable
 	call device_fetch_normal_tx_power
@@ -137,6 +187,12 @@
 	fetch 1,mem_le_connect_status_flag
 	and pdata,0x03,pdata
 	rtnne 0x03
+ifdef BLE_CHECK_RETRANSMIT
+	fetch 1,mem_le_check_retransmit_flag
+	rtn blank
+	fetch 1,mem_le_check_retransmit_discon_flag
+	nrtn blank
+endif
 p_mouse_le_next:
 	fetch 1,mem_mouse_clear_sensor_data_flag
 	call mouse_clear_sensor_data_by_reset,blank
@@ -152,6 +208,75 @@
 	store 7,mem_mouse_key
 	branch hid_device_le_send_mouse_data
 
+
+ifdef BLE_CHECK_RETRANSMIT
+p_le_check_retransmit_timesout:
+	fetch 1,mem_le_conn_rcv_new
+	arg 256,regc
+	iadd regc,pdata
+	rtn
+p_le_got_first_packet:
+	branch p_le_got_first_packet_new
+	
+p_le_slave_match:
+	call p_le_check_retransmit
+	branch le_slave_match+1
+
+p_le_check_retransmit:
+	fetch 1,mem_le_conn_first_rcv
+	rtn blank
+	fetch 1,mem_le_check_retransmit_flag
+	nrtn blank
+	fetcht 1,mem_le_conn_first_rcv
+	fetch 1,mem_le_conn_rcv_new
+	isub temp,null
+	ncall p_le_check_retransmit_timesout,positive	
+	isub temp,pdata
+	sub pdata,100,null
+	branch p_le_check_retransmit_count,positive
+	fetch 1,mem_le_retransmit_cnt
+	sub pdata,20,null
+	ncall p_app_ble_disconnect,positive
+	jam 1,mem_le_check_retransmit_flag
+	rtn 
+p_app_ble_disconnect:
+	jam 1,mem_le_check_retransmit_discon_flag
+	branch app_ble_disconnect
+p_le_check_retransmit_count:
+	fetcht 1,mem_le_arq
+	fetch 1,mem_le_rxbuf_data_header
+//	isolate1 md,pdata
+//	setflag true,mark_ble_rx_md,mark
+	rshift pdata,pdata
+	ixor temp,pdata
+	isolate1 nesn,pdata
+	setarg 0
+	fetcht 1,mem_le_retransmit_cnt
+	setflag true,0,pdata
+	iadd temp,temp
+	storet 1,mem_le_retransmit_cnt
+	rtn
+p_le_got_first_packet_new:
+	fetch 1,mem_le_conn_rcv
+	increase 1,pdata
+	store 1,mem_le_conn_rcv
+	nbranch p_le_got_first_packet_new+7,match
+	fetch 1,mem_le_conn_rcv_new			//lpm  use retention mem
+	increase 1,pdata
+	store 1,mem_le_conn_rcv_new
+	fetch 1,mem_le_state
+	rtnbit1 lestate_got_first_packet
+	set1 lestate_got_first_packet,pdata
+	store 1,mem_le_state
+	fetch 2,mem_le_init_superto
+	store 2,mem_le_superto
+	setarg 0
+	store 4,mem_le_transmit_window	
+	// fetch 1,mem_le_conn_rcv_new
+	// store 1,mem_le_conn_first_rcv
+	rtn
+endif
+
 p_g24_reconn_device_fail:
 	fetch 1,mem_24g_fast_conn_enable
 	branch g24_ch,blank
