接入蓝牙基本结构
This commit is contained in:
1 parent
84e8b50bbf
commit
2f84f70a5f
152 files changed
+6426
-56
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scripts.Ble.Win.CPPBridge
|
||||
{
|
||||
internal static class GattUuidExtension
|
||||
{
|
||||
// Token: 0x0600213A RID: 8506 RVA: 0x000896FD File Offset: 0x000878FD
|
||||
public static Guid WclShortGuidToGuid(this ushort shortUuid)
|
||||
{
|
||||
return new Guid("0000XXXX-0000-1000-8000-00805F9B34FB".Replace("XXXX", shortUuid.ToString("X4")));
|
||||
}
|
||||
|
||||
// Token: 0x0600213B RID: 8507 RVA: 0x0008971F File Offset: 0x0008791F
|
||||
public static Guid WclGuidToNormalizedGuid(this GattUuid uuid)
|
||||
{
|
||||
if (uuid.IsShortUuid)
|
||||
{
|
||||
return new Guid("0000XXXX-0000-1000-8000-00805F9B34FB".Replace("XXXX", uuid.ShortUuid.ToString("X4")));
|
||||
}
|
||||
return uuid.LongUuid;
|
||||
}
|
||||
|
||||
// Token: 0x04001365 RID: 4965
|
||||
public const string GuidTemplate = "0000XXXX-0000-1000-8000-00805F9B34FB";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user