mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 18:02:38 +02:00
main: DFU mode: pass board vid/pid
This commit is contained in:
+6
-1
@@ -265,8 +265,13 @@ int main(int argc, char **argv)
|
||||
if (args.dfu || (board && board->mode == COMM_DFU)) {
|
||||
/* try to init DFU probe */
|
||||
DFU *dfu = NULL;
|
||||
uint16_t vid = 0, pid = 0;
|
||||
if (board) {
|
||||
vid = board->vid;
|
||||
pid = board->pid;
|
||||
}
|
||||
try {
|
||||
dfu = new DFU(args.bit_file, args.verbose);
|
||||
dfu = new DFU(args.bit_file, vid, pid, args.verbose);
|
||||
} catch (std::exception &e) {
|
||||
printError("DFU init failed with: " + string(e.what()));
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user