| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1#include "libusb.h"
2#include <iostream>
3
4 int main(int argc, char *argv[])
5{
6 // Initialize libusb.
7 libusb_context * l_pContext;
8 int l_Status = libusb_init (&l_pContext);
9 if (l_Status != LIBUSB_SUCCESS)
10 {
11 std::cout << "libusb_init error: " << l_Status << "\n";
12 exit (1);
13 }
14
15 // Set the log level.
16 l_Status = libusb_set_option (l_pContext, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_WARNING);
17 if (l_Status != LIBUSB_SUCCESS)
18 {
19 std::cout << "libusb_set_option error: " << l_Status << "\n";
20 exit (1);
21 }
22
23 l_Status = libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG);
24 std::cout << "libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) returns: " << l_Status << "\n";
25 exit (0);
26}
main
int main(void)
Definition THM1176MeasureImmediateTiming.cpp:75