reset_device.cpp
Go to the documentation of this file.
1 
9 #include <iostream>
10 
11 #include "roch_ftdi/scanner.hpp"
12 
13 int main(int argc, char** argv)
14 {
15  int ret_val;
16  FTDI_Scanner scanner;
17 
18  if ( scanner.scan() < 0 ) {
19  std::cerr << "Failed to find devices to reset." << std::endl;
20  return -1;
21  }
22 
23  ret_val = scanner.reset();
24  if ( ret_val < 0 && ret_val != -19 )
25  std::cerr << "Failed to reeset devices." << std::endl;
26  return ret_val;
27 }
int main(int argc, char **argv)
int scan()
Definition: scanner.hpp:89
int reset()
Definition: scanner.hpp:211
A Scanner class.
Definition: scanner.hpp:56
Scan the usb devices, and retrieve its serial id and else descriptions, especially for ftdi devices...


roch_ftdi
Author(s): Younghun Ju
autogenerated on Mon Jun 10 2019 14:41:09