-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvrpn_Button_USB.h
More file actions
28 lines (25 loc) · 835 Bytes
/
Copy pathvrpn_Button_USB.h
File metadata and controls
28 lines (25 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef VRPN_BUTTON_USB_H
#ifdef _WIN32
#include "vrpn_Button.h"
// USB button code.
// This class is derived from the vrpn_Button_Filter class, so that it
// can be made to toggle its buttons using messages from the client.
class VRPN_API vrpn_Button_USB : public vrpn_Button_Filter {
public:
vrpn_Button_USB(const char *name, const char *deviceName,
vrpn_Connection *c);
~vrpn_Button_USB();
virtual void mainloop();
protected:
void read(void);
//! writes data to the device
bool USBWrite(const unsigned long &data);
//! reads data from the device
bool USBRead(unsigned long &data, int port);
//! basic io handeling
bool USB_IO(unsigned long lIn, int lInSize, unsigned long &lOut,
int lOutSize);
HANDLE m_hDevice; //!< the usb device
};
#endif
#endif