Statistics
| Branch: | Tag: | Revision:

root / host / lib / transport / libusb1_base.hpp @ b6099569

History | View | Annotate | Download (1.4 kB)

1
//
2
// Copyright 2010 Ettus Research LLC
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
//
17

    
18
#ifndef INCLUDED_TRANSPORT_LIBUSB_HPP
19
#define INCLUDED_TRANSPORT_LIBUSB_HPP
20

    
21
#include <uhd/config.hpp>
22
#include <uhd/transport/usb_device_handle.hpp>
23
#include <libusb-1.0/libusb.h>
24

    
25
namespace uhd { namespace transport {
26

    
27
namespace libusb {
28
    void init(libusb_context **ctx, int debug_level);
29

    
30
    std::vector<libusb_device *> get_fsf_device_list(libusb_context *ctx);
31

    
32
    libusb_device_handle *open_device(libusb_context *ctx,
33
                                      usb_device_handle::sptr handle);
34

    
35
    bool compare_device(libusb_device *dev, usb_device_handle::sptr handle);
36

    
37
    bool open_interface(libusb_device_handle *dev_handle, int interface);
38

    
39
    std::string get_serial(libusb_device *dev);
40
}
41

    
42
}} //namespace
43

    
44
#endif /* INCLUDED_TRANSPORT_LIBUSB_HPP */