feat: 移除电源控制按钮,在jtag操作时自动开启
This commit is contained in:
@@ -108,6 +108,9 @@ export const useEquipments = defineStore("equipments", () => {
|
||||
async function jtagBoundaryScan() {
|
||||
const release = await jtagClientMutex.acquire();
|
||||
try {
|
||||
// 自动开启电源
|
||||
await powerSetOnOff(true);
|
||||
|
||||
const jtagClient = AuthManager.createAuthenticatedJtagClient();
|
||||
const portStates = await jtagClient.boundaryScanLogicalPorts(
|
||||
boardAddr.value,
|
||||
@@ -139,6 +142,9 @@ export const useEquipments = defineStore("equipments", () => {
|
||||
|
||||
async function jtagUploadBitstream(bitstream: File): Promise<boolean> {
|
||||
try {
|
||||
// 自动开启电源
|
||||
await powerSetOnOff(true);
|
||||
|
||||
const jtagClient = AuthManager.createAuthenticatedJtagClient();
|
||||
const resp = await jtagClient.uploadBitstream(
|
||||
boardAddr.value,
|
||||
@@ -155,6 +161,9 @@ export const useEquipments = defineStore("equipments", () => {
|
||||
async function jtagDownloadBitstream(): Promise<boolean> {
|
||||
const release = await jtagClientMutex.acquire();
|
||||
try {
|
||||
// 自动开启电源
|
||||
await powerSetOnOff(true);
|
||||
|
||||
const jtagClient = AuthManager.createAuthenticatedJtagClient();
|
||||
const resp = await jtagClient.downloadBitstream(
|
||||
boardAddr.value,
|
||||
@@ -173,6 +182,9 @@ export const useEquipments = defineStore("equipments", () => {
|
||||
async function jtagGetIDCode(isQuiet: boolean = false): Promise<number> {
|
||||
const release = await jtagClientMutex.acquire();
|
||||
try {
|
||||
// 自动开启电源
|
||||
await powerSetOnOff(true);
|
||||
|
||||
const jtagClient = AuthManager.createAuthenticatedJtagClient();
|
||||
const resp = await jtagClient.getDeviceIDCode(
|
||||
boardAddr.value,
|
||||
@@ -190,6 +202,9 @@ export const useEquipments = defineStore("equipments", () => {
|
||||
async function jtagSetSpeed(speed: number): Promise<boolean> {
|
||||
const release = await jtagClientMutex.acquire();
|
||||
try {
|
||||
// 自动开启电源
|
||||
await powerSetOnOff(true);
|
||||
|
||||
const jtagClient = AuthManager.createAuthenticatedJtagClient();
|
||||
const resp = await jtagClient.setSpeed(
|
||||
boardAddr.value,
|
||||
|
||||
Reference in New Issue
Block a user