aboutsummaryrefslogtreecommitdiff
path: root/hid.h
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-05-28 20:13:58 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-05-28 20:13:58 +0000
commite6087aad22076ca3f2066020bd4271bb0991d370 (patch)
treee53e3c68c9026fc1d5929f9747ea50a4e6082dda /hid.h
parent2c54414ff1d4a90c06e6e9f3ee5d78ecd2f3977e (diff)
On Mac OSX, replaced hid_get_device_by_number() by a global array of pointers, it should reduce the CPU load noticably. next I need to handle elements independently
svn path=/trunk/externals/hcs/hid/; revision=5147
Diffstat (limited to 'hid.h')
-rw-r--r--hid.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/hid.h b/hid.h
index 7c74d46..b4db8bb 100644
--- a/hid.h
+++ b/hid.h
@@ -15,7 +15,16 @@
#define HID_MAJOR_VERSION 0
#define HID_MINOR_VERSION 7
-/* static char *version = "$Revision: 1.22 $"; */
+/* static char *version = "$Revision: 1.23 $"; */
+
+/*------------------------------------------------------------------------------
+ * GLOBAL DEFINES
+ */
+
+#define DEFAULT_DELAY 5
+
+/* this is set to simplify data structures (arrays instead of linked lists) */
+#define MAX_DEVICES 128
/*------------------------------------------------------------------------------
* CLASS DEF
@@ -25,8 +34,8 @@ typedef struct _hid
t_object x_obj;
t_int x_fd;
t_int x_device_number;
- unsigned short vendor_id; // USB idVendor for current device
- unsigned short product_id; // USB idProduct for current device
+// unsigned short vendor_id; // USB idVendor for current device
+// unsigned short product_id; // USB idProduct for current device
t_int x_has_ff;
void *x_ff_device;
t_clock *x_clock;
@@ -38,11 +47,6 @@ typedef struct _hid
} t_hid;
-/*------------------------------------------------------------------------------
- * GLOBAL DEFINES
- */
-
-#define DEFAULT_DELAY 5
/*------------------------------------------------------------------------------
@@ -57,6 +61,9 @@ t_int hid_instance_count;
extern unsigned short global_debug_level;
+/* next I need to make a data structure to hold the data to be output for this
+ * poll. This should probably be an array for efficiency */
+
/*------------------------------------------------------------------------------
* FUNCTION PROTOTYPES FOR DIFFERENT PLATFORMS
*/