20 ret_val = scanner.
scan();
22 std::cout <<
"FTDI device not found!!!" << std::endl;
26 unsigned int no_devices = (
unsigned int)ret_val;
27 std::cout << no_devices <<
" device(s) found." << std::endl;
29 std::string serial_number, manufacturer, product;
30 for(
unsigned int i=0; i<no_devices; i++ )
33 if (ret_val < 0)
break;
36 if (ret_val < 0)
break;
39 if (ret_val < 0)
break;
41 std::cout << std::endl;
42 std::cout <<
"Device #" << i << std::endl;
43 std::cout <<
" Manufacturer : " << manufacturer << std::endl;
44 std::cout <<
" Product : " << product << std::endl;
45 std::cout <<
" Serial Number: " << serial_number << std::endl;
49 if (ret_val < 0) std::cerr <<
"Something went wrong. Did you run with sudo." << std::endl;