Extract the USB product ID for getBlhostCmd()
This commit is contained in:
@@ -17,7 +17,7 @@ function checkFirmwareImage(imagePath, extension) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBlhostCmd() {
|
function getBlhostCmd(pid) {
|
||||||
let blhostPath;
|
let blhostPath;
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'linux':
|
case 'linux':
|
||||||
@@ -35,7 +35,7 @@ function getBlhostCmd() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return `../../../lib/bootloader/bin/Tools/blhost/${blhostPath} --usb 0x1d50,0x6121`;
|
return `../../../lib/bootloader/bin/Tools/blhost/${blhostPath} --usb 0x1d50,${pid}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function execRetry(command) {
|
function execRetry(command) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ program
|
|||||||
|
|
||||||
const firmwareImage = program.args[0];
|
const firmwareImage = program.args[0];
|
||||||
const usbDir = '../../../lib/agent/packages/usb';
|
const usbDir = '../../../lib/agent/packages/usb';
|
||||||
const blhostUsb = getBlhostCmd();
|
const blhostUsb = getBlhostCmd(0x6121);
|
||||||
const blhostBuspal = blhostUsb + ' --buspal i2c,0x10,100k';
|
const blhostBuspal = blhostUsb + ' --buspal i2c,0x10,100k';
|
||||||
|
|
||||||
checkFirmwareImage(firmwareImage, extension);
|
checkFirmwareImage(firmwareImage, extension);
|
||||||
|
|||||||
Reference in New Issue
Block a user