USBDevice.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <stdint.h>
00004 
00005 // forward declarations
00006 struct libusb_context;
00007 struct libusb_device_handle;
00008 
00009 class USBDevice
00010 {
00011 public:
00012   USBDevice(
00013     uint16_t idVendor,
00014     uint16_t idProduct);
00015 
00016   virtual ~USBDevice();
00017 
00018 protected:
00019     static uint32_t numDevices(
00020       uint16_t idVendor,
00021       uint16_t idProduct);
00022 
00023     void open(uint32_t devid);
00024 
00025     void sendVendorSetup(
00026         uint8_t request,
00027         uint16_t value,
00028         uint16_t index,
00029         const unsigned char* data,
00030         uint16_t length);
00031 
00032 protected:
00033     libusb_context* m_ctx;
00034     libusb_device_handle *m_handle;
00035 
00036     float m_version;
00037 
00038 private:
00039   uint16_t m_idVendor;
00040   uint16_t m_idProduct;
00041 };


crazyflie_cpp
Author(s): Wolfgang Hoenig
autogenerated on Sun Oct 8 2017 02:47:59