#include <usb_comm.h>
Public Member Functions | |
int | close_device () |
int | open_device (uint16_t vendor_id, uint16_t product_id, int ep_in_addr, int ep_out_addr) |
int | read_bytes (unsigned char *, int) |
UsbComm () | |
Constructor. | |
int | write_bytes (unsigned char *, int) |
~UsbComm () | |
Destructor. | |
Private Member Functions | |
void | print_array (uint8_t *buf, int length) |
Device handle. | |
Private Attributes | |
int | baud_ |
Baud rate. | |
struct libusb_device_handle * | devh |
int | ep_in_addr_ |
int | ep_out_addr_ |
int | error |
std::string | port_name_ |
Definition at line 13 of file usb_comm.h.
Constructor.
Definition at line 10 of file usb_comm.cpp.
Destructor.
Definition at line 15 of file usb_comm.cpp.
int milvus::UsbComm::close_device | ( | ) |
Definition at line 73 of file usb_comm.cpp.
int milvus::UsbComm::open_device | ( | uint16_t | vendor_id, |
uint16_t | product_id, | ||
int | ep_in_addr, | ||
int | ep_out_addr | ||
) |
Definition at line 19 of file usb_comm.cpp.
void milvus::UsbComm::print_array | ( | uint8_t * | buf, |
int | length | ||
) | [private] |
Device handle.
Definition at line 117 of file usb_comm.cpp.
int milvus::UsbComm::read_bytes | ( | unsigned char * | buf, |
int | size | ||
) |
Definition at line 84 of file usb_comm.cpp.
int milvus::UsbComm::write_bytes | ( | unsigned char * | buf, |
int | size | ||
) |
Definition at line 104 of file usb_comm.cpp.
int milvus::UsbComm::baud_ [private] |
Baud rate.
Definition at line 34 of file usb_comm.h.
struct libusb_device_handle* milvus::UsbComm::devh [private] |
Definition at line 30 of file usb_comm.h.
int milvus::UsbComm::ep_in_addr_ [private] |
Definition at line 31 of file usb_comm.h.
int milvus::UsbComm::ep_out_addr_ [private] |
Definition at line 32 of file usb_comm.h.
int milvus::UsbComm::error [private] |
Definition at line 36 of file usb_comm.h.
std::string milvus::UsbComm::port_name_ [private] |
Definition at line 35 of file usb_comm.h.