12 #ifndef ONBOARDSDK_LINUX_USB_DEVICE_H 13 #define ONBOARDSDK_LINUX_USB_DEVICE_H 35 static const int POSSIBLE_DJI_DEVICE_NUM = 6;
36 static const int TIMEOUT = 50;
37 static const int OUT_END_PT = 0x0A;
38 static const int IN_END_PT = 0x84;
40 typedef struct USBFilter
56 bool isDJIUSBDevice(uint16_t idVendor, uint16_t idProduct);
59 size_t send(
const uint8_t* buf,
size_t len);
60 size_t readall(uint8_t* buf,
size_t maxlen);
62 time_ms getTimeStamp();
64 libusb_device* DJI_device;
65 libusb_device_handle* DJI_dev_handle;
66 int DJI_device_product_id;
67 USBFilter DJI_usb_dev_filter[POSSIBLE_DJI_DEVICE_NUM];
76 #endif //ONBOARDSDK_LINUX_USB_DEVICE_H size_t send(const uint8_t *buf, size_t len)
Start of DJI_HardDriver virtual function implementations.
Serial device driver abstraction. Provided as an abstract class. Please inherit and implement for ind...
handle array of characters
Definition: commondatarangehandler.h:14
POSIX-Compatible USB Driver for *NIX platforms.
Definition: linux_usb_device.hpp:33