using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assets.Scripts.Devices.Ble.Extension { public static class PrimitiveExtensions { public static bool IsBitSet(this byte value, int position) { return ((uint)value & (uint)(1 << position)) > 0U; } public static bool IsBitSet(this ushort value, int position) { return ((uint)value & (uint)(1 << position)) > 0U; } } }