Index: format/app_mouse.format
===================================================================
--- /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/format/app_mouse.format	(revision 1129)
+++ /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/format/app_mouse.format	(working copy)
@@ -449,6 +449,9 @@
 //byte 8
 0x38 MOUSE_ENABLE_SMOOTHER
 0x39 MOUSE_ENABLE_XY_OFFSET
+0x3a MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+0x3b MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+0x3c MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
 
 //mouse dpi level
 0x00 MOUSE_DPI_LEVEL1
Index: output/bt_format.meta
===================================================================
--- /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/output/bt_format.meta	(revision 1129)
+++ /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/output/bt_format.meta	(working copy)
@@ -5598,6 +5598,9 @@
 //byte 8
 0x38 MOUSE_ENABLE_SMOOTHER
 0x39 MOUSE_ENABLE_XY_OFFSET
+0x3a MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+0x3b MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+0x3c MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
 
 //mouse dpi level
 0x00 MOUSE_DPI_LEVEL1
Index: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/output/eeprom.dat	(revision 1137)
+++ /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/output/eeprom.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-92
-0b
+0e
+0c
 c2
 84
 00
@@ -15,7 +15,7 @@
 c0
 45
 81
-a7
+b6
 c0
 57
 00
@@ -23,31 +23,31 @@
 c0
 64
 81
-b6
+c5
 c0
 65
 01
-c6
+e3
 c0
 68
-01
-ff
+02
+1e
 c0
 68
 82
-96
+b5
 c0
 6b
 01
-cf
+ec
 c0
 6c
 82
-0c
+2b
 c0
 6f
 02
-cc
+eb
 20
 20
 13
@@ -83,15 +83,15 @@
 c0
 75
 81
-79
+88
 c0
 76
 01
-81
+90
 c0
 76
 81
-8b
+9a
 20
 20
 13
@@ -195,7 +195,7 @@
 20
 40
 02
-56
+75
 20
 20
 3b
@@ -1459,15 +1459,75 @@
 24
 2c
 01
-6e
+7d
 24
 37
 81
-6e
+7d
+20
+40
+26
+72
+20
+40
+01
+70
 20
 20
 26
-4e
+51
+6f
+e0
+cb
+e1
+24
+5a
+01
+74
+70
+4b
+e1
+00
+20
+60
+00
+00
+20
+40
+41
+aa
+6f
+e4
+4b
+ab
+c4
+1e
+00
+00
+6f
+e0
+c9
+13
+d8
+40
+00
+40
+20
+40
+60
+93
+6f
+e0
+c9
+14
+d8
+40
+00
+40
+20
+20
+60
+93
 6f
 e0
 c8
@@ -1527,7 +1587,7 @@
 24
 21
 01
-7e
+8d
 20
 20
 26
@@ -1535,7 +1595,7 @@
 20
 40
 01
-a0
+af
 20
 40
 27
@@ -1627,7 +1687,7 @@
 c5
 13
 01
-97
+a6
 6f
 e0
 c8
@@ -1639,7 +1699,7 @@
 24
 21
 01
-9f
+ae
 6f
 e0
 c8
@@ -1659,7 +1719,7 @@
 c0
 00
 01
-a0
+af
 20
 60
 00
@@ -1675,7 +1735,7 @@
 c0
 01
 01
-a5
+b4
 1f
 e0
 fe
@@ -1800,6 +1860,14 @@
 40
 3e
 36
+20
+40
+01
+d2
+20
+20
+01
+d7
 6f
 e4
 4b
@@ -1820,6 +1888,54 @@
 20
 60
 93
+6f
+e4
+4b
+ab
+c4
+1e
+00
+00
+68
+48
+c9
+13
+20
+40
+60
+42
+68
+48
+c9
+14
+20
+40
+60
+42
+6f
+e0
+c9
+13
+d8
+40
+00
+80
+20
+40
+60
+93
+6f
+e0
+c9
+14
+d8
+40
+00
+80
+20
+20
+60
+93
 68
 48
 c9
@@ -1863,15 +1979,15 @@
 c0
 1c
 81
-d4
+f1
 c0
 1e
 01
-d6
+f3
 c0
 1d
 01
-dc
+f9
 20
 20
 43
@@ -1879,7 +1995,7 @@
 20
 40
 02
-48
+67
 20
 20
 48
@@ -1887,7 +2003,7 @@
 20
 40
 02
-48
+67
 6f
 e2
 48
@@ -1914,28 +2030,28 @@
 a5
 24
 3a
+02
 01
-e4
 6f
 e0
 c8
 8b
 c0
 01
-01
-ed
+02
+0a
 c0
 02
-01
-f3
+02
+10
 c0
 01
-81
-fa
+82
+19
 20
 40
 02
-48
+67
 20
 20
 48
@@ -1982,12 +2098,12 @@
 ab
 c2
 97
-81
-f1
+82
+0e
 c2
 98
-01
-f1
+02
+0e
 20
 20
 48
@@ -1995,7 +2111,7 @@
 20
 40
 02
-31
+50
 20
 20
 48
@@ -2006,16 +2122,16 @@
 ab
 c3
 17
-81
-f8
+82
+15
 6f
 e0
 cb
 b4
 c0
 00
-81
-f8
+82
+15
 20
 20
 48
@@ -2023,27 +2139,35 @@
 20
 40
 02
+67
+6f
+e4
+4b
+ab
+c3
+1e
 48
+3a
 20
 20
-48
-3a
+02
+01
 6f
 e4
 4b
 ab
 c3
 17
-81
-f8
+82
+15
 c2
 89
-81
-f8
+82
+15
 c2
 89
-01
-f8
+02
+15
 20
 20
 48
@@ -2055,7 +2179,7 @@
 20
 40
 02
-02
+21
 20
 20
 40
@@ -2091,7 +2215,7 @@
 20
 3a
 02
-6e
+8d
 67
 e0
 cb
@@ -2123,15 +2247,15 @@
 20
 40
 02
-6b
+8a
 20
 40
 02
-23
+42
 20
 40
 02
-5d
+7c
 20
 40
 40
@@ -2143,7 +2267,7 @@
 20
 40
 02
-81
+a0
 20
 40
 44
@@ -2191,7 +2315,7 @@
 20
 20
 02
-63
+82
 6f
 e0
 cb
@@ -2207,11 +2331,11 @@
 c0
 00
 82
-38
+57
 20
 40
 02
-45
+64
 6f
 e0
 cb
@@ -2235,7 +2359,7 @@
 20
 42
 82
-2f
+4e
 20
 60
 00
@@ -2247,7 +2371,7 @@
 20
 20
 02
-4a
+69
 70
 4b
 eb
@@ -2283,7 +2407,7 @@
 da
 40
 02
-3b
+5a
 20
 20
 31
@@ -2303,7 +2427,7 @@
 20
 3a
 02
-43
+62
 6f
 e0
 cb
@@ -2311,7 +2435,7 @@
 20
 3a
 02
-48
+67
 1f
 e0
 ff
@@ -2327,7 +2451,7 @@
 c0
 00
 82
-4a
+69
 70
 4b
 e7
@@ -2355,7 +2479,7 @@
 24
 3a
 02
-4e
+6d
 70
 4b
 e5
@@ -2379,7 +2503,7 @@
 c0
 01
 82
-54
+73
 68
 48
 cb
@@ -2431,7 +2555,7 @@
 da
 40
 02
-58
+77
 20
 20
 31
@@ -2447,7 +2571,7 @@
 20
 20
 02
-34
+53
 6f
 e0
 c9
@@ -2463,7 +2587,7 @@
 da
 40
 02
-68
+87
 20
 20
 31
@@ -2474,8 +2598,8 @@
 38
 c0
 00
+02
 01
-e4
 20
 20
 43
@@ -2487,7 +2611,7 @@
 da
 40
 02
-6e
+8d
 20
 20
 31
@@ -2499,7 +2623,7 @@
 c2
 8e
 02
-74
+93
 6f
 e0
 c9
@@ -2507,15 +2631,15 @@
 c0
 00
 02
-7b
+9a
 c0
 00
 82
-7d
+9c
 20
 20
 02
-79
+98
 6f
 e0
 c9
@@ -2523,19 +2647,19 @@
 c0
 00
 02
-7d
+9c
 c0
 00
 82
-7f
+9e
 c0
 01
 02
-79
+98
 20
 20
 02
-7b
+9a
 70
 4b
 ed
@@ -2543,7 +2667,7 @@
 20
 20
 02
-60
+7f
 70
 4b
 ed
@@ -2551,7 +2675,7 @@
 20
 20
 02
-60
+7f
 70
 4b
 ed
@@ -2559,7 +2683,7 @@
 20
 20
 02
-60
+7f
 70
 4b
 ed
@@ -2567,7 +2691,7 @@
 20
 20
 02
-60
+7f
 6f
 e0
 c9
@@ -2575,7 +2699,7 @@
 c0
 00
 02
-87
+a6
 6f
 e4
 4b
@@ -2591,7 +2715,7 @@
 20
 20
 02
-8a
+a9
 6f
 e4
 4b
@@ -2627,7 +2751,7 @@
 20
 22
 82
-91
+b0
 20
 20
 44
@@ -2667,23 +2791,23 @@
 20
 40
 02
-9f
+be
 20
 40
 02
-a4
+c3
 20
 40
 02
-a9
+c8
 20
 40
 02
-ae
+cd
 20
 40
 02
-bb
+da
 20
 20
 41
@@ -2695,7 +2819,7 @@
 20
 40
 02
-c8
+e7
 20
 40
 41
@@ -2715,7 +2839,7 @@
 20
 40
 02
-c8
+e7
 20
 40
 41
@@ -2735,7 +2859,7 @@
 20
 40
 02
-c8
+e7
 20
 40
 41
@@ -2779,7 +2903,7 @@
 c0
 7f
 82
-b7
+d6
 20
 20
 41
@@ -2791,7 +2915,7 @@
 20
 40
 02
-ca
+e9
 68
 48
 c9
@@ -2831,7 +2955,7 @@
 c0
 7f
 82
-c4
+e3
 20
 20
 41
@@ -2843,7 +2967,7 @@
 20
 40
 02
-ca
+e9
 68
 48
 c9
@@ -2879,7 +3003,7 @@
 20
 40
 02
-d0
+ef
 20
 20
 46
@@ -2915,7 +3039,7 @@
 20
 40
 02
-d9
+f8
 20
 20
 40
@@ -2943,7 +3067,7 @@
 c0
 7f
 82
-e0
+ff
 20
 20
 40
@@ -2955,7 +3079,7 @@
 20
 40
 02
-ca
+e9
 68
 48
 c9
@@ -2964,8 +3088,8 @@
 20
 41
 95
-c2
-22
+0b
+3a
 aa
 55
 40
@@ -3129,7 +3253,7 @@
 01
 80
 00
-03
+1f
 aa
 55
 0c
@@ -4191,134 +4315,10 @@
 aa
 aa
 55
-4c
+68
 70
-5c
-80
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+93
+d0
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-1a
-f1
+c3
+0f
Index: output/flash.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/output/flash.dat	(revision 1137)
+++ /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/output/flash.dat	(working copy)
@@ -2,8 +2,8 @@
 02
 aa
 55
-92
-0b
+0e
+0c
 c2
 84
 00
@@ -15,7 +15,7 @@
 c0
 45
 81
-a7
+b6
 c0
 57
 00
@@ -23,31 +23,31 @@
 c0
 64
 81
-b6
+c5
 c0
 65
 01
-c6
+e3
 c0
 68
-01
-ff
+02
+1e
 c0
 68
 82
-96
+b5
 c0
 6b
 01
-cf
+ec
 c0
 6c
 82
-0c
+2b
 c0
 6f
 02
-cc
+eb
 20
 20
 13
@@ -83,15 +83,15 @@
 c0
 75
 81
-79
+88
 c0
 76
 01
-81
+90
 c0
 76
 81
-8b
+9a
 20
 20
 13
@@ -195,7 +195,7 @@
 20
 40
 02
-56
+75
 20
 20
 3b
@@ -1459,15 +1459,75 @@
 24
 2c
 01
-6e
+7d
 24
 37
 81
-6e
+7d
+20
+40
+26
+72
+20
+40
+01
+70
 20
 20
 26
-4e
+51
+6f
+e0
+cb
+e1
+24
+5a
+01
+74
+70
+4b
+e1
+00
+20
+60
+00
+00
+20
+40
+41
+aa
+6f
+e4
+4b
+ab
+c4
+1e
+00
+00
+6f
+e0
+c9
+13
+d8
+40
+00
+40
+20
+40
+60
+93
+6f
+e0
+c9
+14
+d8
+40
+00
+40
+20
+20
+60
+93
 6f
 e0
 c8
@@ -1527,7 +1587,7 @@
 24
 21
 01
-7e
+8d
 20
 20
 26
@@ -1535,7 +1595,7 @@
 20
 40
 01
-a0
+af
 20
 40
 27
@@ -1627,7 +1687,7 @@
 c5
 13
 01
-97
+a6
 6f
 e0
 c8
@@ -1639,7 +1699,7 @@
 24
 21
 01
-9f
+ae
 6f
 e0
 c8
@@ -1659,7 +1719,7 @@
 c0
 00
 01
-a0
+af
 20
 60
 00
@@ -1675,7 +1735,7 @@
 c0
 01
 01
-a5
+b4
 1f
 e0
 fe
@@ -1800,6 +1860,14 @@
 40
 3e
 36
+20
+40
+01
+d2
+20
+20
+01
+d7
 6f
 e4
 4b
@@ -1820,6 +1888,54 @@
 20
 60
 93
+6f
+e4
+4b
+ab
+c4
+1e
+00
+00
+68
+48
+c9
+13
+20
+40
+60
+42
+68
+48
+c9
+14
+20
+40
+60
+42
+6f
+e0
+c9
+13
+d8
+40
+00
+80
+20
+40
+60
+93
+6f
+e0
+c9
+14
+d8
+40
+00
+80
+20
+20
+60
+93
 68
 48
 c9
@@ -1863,15 +1979,15 @@
 c0
 1c
 81
-d4
+f1
 c0
 1e
 01
-d6
+f3
 c0
 1d
 01
-dc
+f9
 20
 20
 43
@@ -1879,7 +1995,7 @@
 20
 40
 02
-48
+67
 20
 20
 48
@@ -1887,7 +2003,7 @@
 20
 40
 02
-48
+67
 6f
 e2
 48
@@ -1914,28 +2030,28 @@
 a5
 24
 3a
+02
 01
-e4
 6f
 e0
 c8
 8b
 c0
 01
-01
-ed
+02
+0a
 c0
 02
-01
-f3
+02
+10
 c0
 01
-81
-fa
+82
+19
 20
 40
 02
-48
+67
 20
 20
 48
@@ -1982,12 +2098,12 @@
 ab
 c2
 97
-81
-f1
+82
+0e
 c2
 98
-01
-f1
+02
+0e
 20
 20
 48
@@ -1995,7 +2111,7 @@
 20
 40
 02
-31
+50
 20
 20
 48
@@ -2006,16 +2122,16 @@
 ab
 c3
 17
-81
-f8
+82
+15
 6f
 e0
 cb
 b4
 c0
 00
-81
-f8
+82
+15
 20
 20
 48
@@ -2023,27 +2139,35 @@
 20
 40
 02
+67
+6f
+e4
+4b
+ab
+c3
+1e
 48
+3a
 20
 20
-48
-3a
+02
+01
 6f
 e4
 4b
 ab
 c3
 17
-81
-f8
+82
+15
 c2
 89
-81
-f8
+82
+15
 c2
 89
-01
-f8
+02
+15
 20
 20
 48
@@ -2055,7 +2179,7 @@
 20
 40
 02
-02
+21
 20
 20
 40
@@ -2091,7 +2215,7 @@
 20
 3a
 02
-6e
+8d
 67
 e0
 cb
@@ -2123,15 +2247,15 @@
 20
 40
 02
-6b
+8a
 20
 40
 02
-23
+42
 20
 40
 02
-5d
+7c
 20
 40
 40
@@ -2143,7 +2267,7 @@
 20
 40
 02
-81
+a0
 20
 40
 44
@@ -2191,7 +2315,7 @@
 20
 20
 02
-63
+82
 6f
 e0
 cb
@@ -2207,11 +2331,11 @@
 c0
 00
 82
-38
+57
 20
 40
 02
-45
+64
 6f
 e0
 cb
@@ -2235,7 +2359,7 @@
 20
 42
 82
-2f
+4e
 20
 60
 00
@@ -2247,7 +2371,7 @@
 20
 20
 02
-4a
+69
 70
 4b
 eb
@@ -2283,7 +2407,7 @@
 da
 40
 02
-3b
+5a
 20
 20
 31
@@ -2303,7 +2427,7 @@
 20
 3a
 02
-43
+62
 6f
 e0
 cb
@@ -2311,7 +2435,7 @@
 20
 3a
 02
-48
+67
 1f
 e0
 ff
@@ -2327,7 +2451,7 @@
 c0
 00
 82
-4a
+69
 70
 4b
 e7
@@ -2355,7 +2479,7 @@
 24
 3a
 02
-4e
+6d
 70
 4b
 e5
@@ -2379,7 +2503,7 @@
 c0
 01
 82
-54
+73
 68
 48
 cb
@@ -2431,7 +2555,7 @@
 da
 40
 02
-58
+77
 20
 20
 31
@@ -2447,7 +2571,7 @@
 20
 20
 02
-34
+53
 6f
 e0
 c9
@@ -2463,7 +2587,7 @@
 da
 40
 02
-68
+87
 20
 20
 31
@@ -2474,8 +2598,8 @@
 38
 c0
 00
+02
 01
-e4
 20
 20
 43
@@ -2487,7 +2611,7 @@
 da
 40
 02
-6e
+8d
 20
 20
 31
@@ -2499,7 +2623,7 @@
 c2
 8e
 02
-74
+93
 6f
 e0
 c9
@@ -2507,15 +2631,15 @@
 c0
 00
 02
-7b
+9a
 c0
 00
 82
-7d
+9c
 20
 20
 02
-79
+98
 6f
 e0
 c9
@@ -2523,19 +2647,19 @@
 c0
 00
 02
-7d
+9c
 c0
 00
 82
-7f
+9e
 c0
 01
 02
-79
+98
 20
 20
 02
-7b
+9a
 70
 4b
 ed
@@ -2543,7 +2667,7 @@
 20
 20
 02
-60
+7f
 70
 4b
 ed
@@ -2551,7 +2675,7 @@
 20
 20
 02
-60
+7f
 70
 4b
 ed
@@ -2559,7 +2683,7 @@
 20
 20
 02
-60
+7f
 70
 4b
 ed
@@ -2567,7 +2691,7 @@
 20
 20
 02
-60
+7f
 6f
 e0
 c9
@@ -2575,7 +2699,7 @@
 c0
 00
 02
-87
+a6
 6f
 e4
 4b
@@ -2591,7 +2715,7 @@
 20
 20
 02
-8a
+a9
 6f
 e4
 4b
@@ -2627,7 +2751,7 @@
 20
 22
 82
-91
+b0
 20
 20
 44
@@ -2667,23 +2791,23 @@
 20
 40
 02
-9f
+be
 20
 40
 02
-a4
+c3
 20
 40
 02
-a9
+c8
 20
 40
 02
-ae
+cd
 20
 40
 02
-bb
+da
 20
 20
 41
@@ -2695,7 +2819,7 @@
 20
 40
 02
-c8
+e7
 20
 40
 41
@@ -2715,7 +2839,7 @@
 20
 40
 02
-c8
+e7
 20
 40
 41
@@ -2735,7 +2859,7 @@
 20
 40
 02
-c8
+e7
 20
 40
 41
@@ -2779,7 +2903,7 @@
 c0
 7f
 82
-b7
+d6
 20
 20
 41
@@ -2791,7 +2915,7 @@
 20
 40
 02
-ca
+e9
 68
 48
 c9
@@ -2831,7 +2955,7 @@
 c0
 7f
 82
-c4
+e3
 20
 20
 41
@@ -2843,7 +2967,7 @@
 20
 40
 02
-ca
+e9
 68
 48
 c9
@@ -2879,7 +3003,7 @@
 20
 40
 02
-d0
+ef
 20
 20
 46
@@ -2915,7 +3039,7 @@
 20
 40
 02
-d9
+f8
 20
 20
 40
@@ -2943,7 +3067,7 @@
 c0
 7f
 82
-e0
+ff
 20
 20
 40
@@ -2955,7 +3079,7 @@
 20
 40
 02
-ca
+e9
 68
 48
 c9
@@ -2964,8 +3088,8 @@
 20
 41
 95
-c2
-22
+0b
+3a
 aa
 55
 40
@@ -3129,7 +3253,7 @@
 01
 80
 00
-03
+1f
 aa
 55
 0c
@@ -4191,134 +4315,10 @@
 aa
 aa
 55
-4c
+68
 70
-5c
-80
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+93
+d0
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-1a
-f1
+c3
+0f
Index: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/program/patch.prog	(revision 1137)
+++ /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/program/patch.prog	(working copy)
@@ -491,7 +491,28 @@
 	beq no_ack_24g,g24_transmit_no_ack
 	nbranch p_g24_retransmit,sync
 	nbranch p_g24_retransmit,user3
-	branch g24_transmit_process+8
+	call g24_ackpayload_parse
+	call p_mouse_wakeup_24g
+	branch g24_transmit_no_ack
+
+p_mouse_wakeup_24g:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall p_mouse_wakeup_24g_from_long_sleep,blank
+	jam 0,mem_sensor_shutdown_flag
+	rtn	
+	
+p_mouse_wakeup_24g_from_long_sleep:
+	call mouse_init_sensor_wakeup
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+p_mouse_wheel_set_wakeup:
+	fetch 1,mem_whee_a_data_gpio
+	arg gpcfg_pullup,temp
+ 	call gpio_config_function_int
+	fetch 1,mem_whee_b_data_gpio
+	arg gpcfg_pullup,temp
+ 	branch gpio_config_function_int
+	
 
 p_g24_retransmit:
 	fetch 1,mem_24g_abort_pac
@@ -608,11 +629,33 @@
 	arg gpcfg_output_high,temp
 	call gpio_config_function_int
 	call mouse_setgpio_hibernate+3
+	call p_mouse_adc_gpio_set_before_hibernate
+	branch p_mouse_wheel_gpio_set_before_hibernate
+
+p_mouse_adc_gpio_set_before_hibernate:	
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
 	rtnbit0 MOUSE_ENABLE_ADC
 	fetch 1,mem_adc_channel_gpio	
 	arg gpcfg_no_ie,temp
  	branch gpio_config_function_int
+ 	
+p_mouse_wheel_gpio_set_before_hibernate:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+p_mouse_wheel_clr_wakeup:
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_clr_wake
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_clr_wake
+		
+	fetch 1,mem_whee_a_data_gpio
+	arg gpcfg_pulldown,temp
+	call gpio_config_function_int
+	fetch 1,mem_whee_b_data_gpio
+	arg gpcfg_pulldown,temp
+	branch gpio_config_function_int
+
+ 	
 
 p_mouse_lpm_before_common:
 	fetcht 1,mem_whee_a_data_gpio		//reinit gpio pu after disable wheel wakeup
@@ -700,7 +743,10 @@
 
 p_mouse_24g_attempt_fail_enter_hibernate:
 	call p_mouse_multi_led_blink_off	
-	branch mouse_24g_attempt_fail_enter_hibernate+1
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL,mouse_24g_attempt_fail_enter_hibernate+1
+	branch p_mouse_24g_hibernate_set
+
 
 p_mouse_reconn_dongle_attempt_fail:
 	fetch MOUSE_FLAG_LEN,mem_mouse_flag
Index: sched/mouse.dat
===================================================================
--- /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/sched/mouse.dat	(revision 1129)
+++ /YC1308AC/branch/mouse_project/YHK/mouse_only_24g/sched/mouse.dat	(working copy)
@@ -87,7 +87,9 @@
 #mouse flag byte8
 #bit0 MOUSE_ENABLE_SMOOTHER
 #bit1 MOUSE_ENABLE_XY_OFFSET
-
+#bit2 MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+#bit3 MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+#bit4 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
 
 
 mem_mouse_flag:
@@ -109,7 +111,7 @@
 80 00 #dip(matrix)+2.4 first
 
 #updata 1byte
-03
+1f
 
 mem_mouse_discovery_timeout:b0 04	#2min
 mem_mouse_24g_pair_timeout_init:58 02  #1min	    24g reconn timer&pair timer
