aboutsummaryrefslogtreecommitdiff
path: root/hid.h
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-08-22 04:13:14 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-08-22 04:13:14 +0000
commite44b95e080b5aa15cf70996aaa2fab1144708a77 (patch)
treea5eb5849ff88a63294017ef1dd60db159031366a /hid.h
parent52116dbc660c218a7b45c776cbd4dbd1a47fd2c2 (diff)
everything is building, the element array is being properly populated, I just need to fix the data output to use the new element array
svn path=/trunk/externals/hcs/hid/; revision=5706
Diffstat (limited to 'hid.h')
-rw-r--r--hid.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/hid.h b/hid.h
index 5469f17..c4c0acd 100644
--- a/hid.h
+++ b/hid.h
@@ -4,6 +4,10 @@
#include <stdio.h>
#include <sys/syslog.h>
+#ifdef __linux__
+#include <linux/types.h>
+#endif /* __linux__ */
+
#include <m_pd.h>
/*
@@ -15,7 +19,7 @@
#define HID_MAJOR_VERSION 0
#define HID_MINOR_VERSION 7
-/* static char *version = "$Revision: 1.27 $"; */
+/* static char *version = "$Revision: 1.28 $"; */
/*------------------------------------------------------------------------------
* GLOBAL DEFINES
@@ -72,19 +76,21 @@ extern unsigned short global_debug_level;
typedef struct _hid_element
{
#ifdef __linux__
- //GNU/Linux store type and code to compare against
+ /* GNU/Linux store type and code to compare against */
+ __u16 linux_type;
+ __u16 linux_code;
#else
- void *os_pointer; // pRecElement on Mac OS X;
+ void *os_pointer; // pRecElement on Mac OS X; ... on Windows
#endif /* __linux__ */
- t_symbol *type; // Linux "type"; HID "usagePage"
- t_symbol *name; // Linux "code"; HID "usage"
- unsigned char polled; // is it polled or queued? (maybe only on Mac OS X?)
- unsigned char relative; // relative data gets output everytime
- t_int min; // from device report
- t_int max; // from device report
- t_float instance; // usage page/usage instance # ([absolute throttle 2 163(
- t_int value; // output the sum of events in a poll for relative axes
- t_int previous_value; //only output on change on abs and buttons
+ t_symbol *type; // Linux "type"; HID "usagePage"
+ t_symbol *name; // Linux "code"; HID "usage"
+ unsigned char polled; // is it polled or queued? (maybe only on Mac OS X?)
+ unsigned char relative; // relative data gets output everytime
+ t_int min; // from device report
+ t_int max; // from device report
+ t_float instance; // usage page/usage instance # ([absolute throttle 2 163(
+ t_int value; // output the sum of events in a poll for relative axes
+ t_int previous_value; //only output on change on abs and buttons
} t_hid_element;
/* mostly for status querying */