main: DFU mode: pass board vid/pid
This commit is contained in:
parent
cbe2bf5494
commit
630d4428c6
|
|
@ -265,8 +265,13 @@ int main(int argc, char **argv)
|
||||||
if (args.dfu || (board && board->mode == COMM_DFU)) {
|
if (args.dfu || (board && board->mode == COMM_DFU)) {
|
||||||
/* try to init DFU probe */
|
/* try to init DFU probe */
|
||||||
DFU *dfu = NULL;
|
DFU *dfu = NULL;
|
||||||
|
uint16_t vid = 0, pid = 0;
|
||||||
|
if (board) {
|
||||||
|
vid = board->vid;
|
||||||
|
pid = board->pid;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
dfu = new DFU(args.bit_file, args.verbose);
|
dfu = new DFU(args.bit_file, vid, pid, args.verbose);
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
printError("DFU init failed with: " + string(e.what()));
|
printError("DFU init failed with: " + string(e.what()));
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue