feat: upload and download bitstream from the component of project view
This commit is contained in:
@@ -192,26 +192,6 @@ public class JtagController : ControllerBase
|
||||
return "This is Jtag Controller";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行一个Jtag命令
|
||||
/// </summary>
|
||||
/// <param name="address"> 设备地址 </param>
|
||||
/// <param name="port"> 设备端口 </param>
|
||||
/// <param name="hexDevAddr"> 16进制设备目的地址(Jtag) </param>
|
||||
/// <param name="hexCmd"> 16进制命令 </param>
|
||||
[HttpPost("RunCommand")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async ValueTask<IResult> RunCommand(string address, int port, string hexDevAddr, string hexCmd)
|
||||
{
|
||||
var jtagCtrl = new JtagClient.Jtag(address, port);
|
||||
var ret = await jtagCtrl.WriteFIFO(Convert.ToUInt32(hexDevAddr, 16), Convert.ToUInt32(hexCmd, 16));
|
||||
|
||||
if (ret.IsSuccessful) { return TypedResults.Ok(ret.Value); }
|
||||
else { return TypedResults.InternalServerError(ret.Error); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取Jtag ID Code
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user