Commit | Line | Data |
---|---|---|
818b1196 MV |
1 | /* cpp-simple.cpp |
2 | ||
3 | Simple libftdi-cpp usage | |
4 | ||
5 | This program is distributed under the GPL, version 2 | |
6 | */ | |
7 | ||
8 | #include "ftdi.hpp" | |
9 | #include <iostream> | |
10 | using namespace Ftdi; | |
11 | ||
12 | int main(int argc, char **argv) | |
13 | { | |
14 | std::cerr << "Creating ct context" << std::endl; | |
15 | Context ct; | |
16 | { | |
17 | std::cerr << "Copying ct2 context" << std::endl; | |
18 | Context ct2 = ct; | |
19 | } | |
20 | ||
21 | std::cerr << "Copying ct3 context" << std::endl; | |
22 | Context ct3(ct); | |
23 | ||
24 | std::cerr << "Result: " << ct.vendor() << std::endl; | |
25 | ||
26 | return 0; | |
27 | } | |
28 |