feat: 移除电源控制按钮,在jtag操作时自动开启

This commit is contained in:
alivender
2025-07-31 13:20:45 +08:00
parent d7c02ee6c9
commit 0cc35ce541
4 changed files with 16 additions and 15 deletions

View File

@@ -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,