@@ -459,7 +459,7 @@ void ListAdapters()
459
459
ShowVersion ();
460
460
461
461
// disable compiler warning if no APIs are found
462
- #if ( defined(HAVE_DJTG) || defined(HAVE_FTD2XX) )
462
+ #if ( defined(HAVE_DJTG) || defined(HAVE_FTD2XX) || defined(HAVE_LIBUSB) )
463
463
string ver;
464
464
int ndev = 0 ;
465
465
#endif
@@ -492,10 +492,10 @@ void ListAdapters()
492
492
}
493
493
}
494
494
#else // #ifdef HAVE_DJTG
495
- printf (" Digilent API version: not supported\n " );
495
+ LogNotice (" Digilent API version: not supported\n " );
496
496
#endif
497
497
498
- printf (" \n " );
498
+ LogNotice (" \n " );
499
499
#ifdef HAVE_FTD2XX
500
500
ver = FTDIJtagInterface::GetAPIVersion ();
501
501
LogNotice (" FTDI API version: %s\n " , ver.c_str ());
@@ -530,6 +530,39 @@ void ListAdapters()
530
530
#else // #ifdef HAVE_FTD2XX
531
531
LogNotice (" FTDI API version: not supported\n " );
532
532
#endif
533
+
534
+ LogNotice (" \n " );
535
+ #ifdef HAVE_LIBUSB
536
+ ver = GlasgowSWDInterface::GetAPIVersion ();
537
+ LogNotice (" Glasgow API version: %s\n " , ver.c_str ());
538
+ ndev = GlasgowSWDInterface::GetInterfaceCount ();
539
+ LogNotice (" Enumerating interfaces... %d found\n " , ndev);
540
+ if (ndev == 0 )
541
+ LogNotice (" No interfaces found\n " );
542
+ else
543
+ {
544
+ int idev = 0 ;
545
+ LogIndenter li;
546
+ for (int i=0 ; i<ndev; i++)
547
+ {
548
+ try
549
+ {
550
+ LogNotice (" Interface %d: %s\n " , idev, GlasgowSWDInterface::GetDescription (i).c_str ());
551
+ LogIndenter li;
552
+ LogNotice (" Serial number: %s\n " , GlasgowSWDInterface::GetSerialNumber (i).c_str ());
553
+ LogNotice (" User ID: %s\n " , GlasgowSWDInterface::GetSerialNumber (i).c_str ());
554
+ // LogNotice("Default clock: %.2f MHz\n", GlasgowSWDInterface::GetDefaultFrequency(i)/1000000.0f);
555
+ idev++;
556
+ }
557
+ catch (const JtagException& e)
558
+ {
559
+ LogNotice (" Interface %d: Error getting device information\n " , i);
560
+ }
561
+ }
562
+ }
563
+ #else // #ifdef HAVE_LIBUSB
564
+ LogNotice (" Glasgow API version: not supported\n " );
565
+ #endif
533
566
}
534
567
535
568
catch (const JtagException& ex)
0 commit comments