add class jtag status reg

This commit is contained in:
2025-04-25 16:10:51 +08:00
parent b8bb4f6b5e
commit c1ff893b58
3 changed files with 169 additions and 28 deletions

View File

@@ -152,6 +152,15 @@ namespace Common
return (srcBits & mask) == dstBits;
}
public static Result<bool> ToBit(UInt32 srcBits, int location)
{
if (location < 0)
return new(new ArgumentException(
"Location can't be negetive", nameof(location)));
return (srcBits & (1 << location)) == 1;
}
/// <summary>
/// 字符串转二进制字节数组