src
reset_device.cpp
Go to the documentation of this file.
1
9
#include <iostream>
10
11
#include "
kobuki_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
}
FTDI_Scanner::reset
int reset()
Definition:
scanner.hpp:215
FTDI_Scanner::scan
int scan()
Definition:
scanner.hpp:93
main
int main(int, char **)
Definition:
reset_device.cpp:13
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.
kobuki_ftdi
Author(s): Younghun Ju
autogenerated on Wed Mar 2 2022 00:26:19