Main Page
Related Pages
Classes
Files
File List
File Members
src
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
}
main
int main(int argc, char **argv)
Definition:
reset_device.cpp:13
FTDI_Scanner::scan
int scan()
Definition:
scanner.hpp:89
FTDI_Scanner::reset
int reset()
Definition:
scanner.hpp:211
FTDI_Scanner
A Scanner class.
Definition:
scanner.hpp:56
scanner.hpp
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