add jtag get id code api
This commit is contained in:
@@ -49,19 +49,43 @@ namespace WebProtocol
|
||||
/// <example> 0x10_00_00_00 </example>
|
||||
public UInt32 address;
|
||||
|
||||
/// <summary>
|
||||
/// Convert to Json String
|
||||
/// </summary>
|
||||
/// <returns> Json String </returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Package Options which to receive from boards </summary>
|
||||
public struct RecvPackOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Task ID
|
||||
/// </summary>
|
||||
public byte commandID;
|
||||
/// <summary>
|
||||
/// Whether is succeed to finish command
|
||||
/// </summary>
|
||||
public bool isSuccess;
|
||||
public byte[] data;
|
||||
/// <summary>
|
||||
/// Return Data
|
||||
/// </summary>
|
||||
public byte[]? data;
|
||||
|
||||
/// <summary>
|
||||
/// Convert to Json String
|
||||
/// </summary>
|
||||
/// <returns> Json String </returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Package which send address to write </summary>
|
||||
public struct SendAddrPackage
|
||||
{
|
||||
readonly byte sign = (byte)PackSign.SendAddr;
|
||||
@@ -227,6 +251,7 @@ namespace WebProtocol
|
||||
RecvPackOptions opts;
|
||||
opts.commandID = commandID;
|
||||
opts.isSuccess = Convert.ToBoolean((resp >> 1) == 0b01 ? true : false);
|
||||
opts.data = null;
|
||||
|
||||
return opts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user