aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-05-07 16:16:23 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-05-07 16:16:23 +0000
commit5b3ac4861336ee5c510d3e554fcf18acad691ebe (patch)
tree7a84bc6cd505aa57d115ff2688aceac217bcf469
parent0a8862934ec4c665c1b618001b182e62735654c7 (diff)
i don't claim that everything here is as it should be; but at least it compiles again...
(and input seems to work; i have not been able to do the keyboard-led thing, however) svn path=/trunk/externals/io/hidio/; revision=9771
-rw-r--r--hidio_linux.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/hidio_linux.c b/hidio_linux.c
index be632cf..72e57f4 100644
--- a/hidio_linux.c
+++ b/hidio_linux.c
@@ -72,7 +72,7 @@ t_symbol* hidio_convert_linux_buttons_to_numbers(__u16 linux_code)
snprintf(hidio_code, MAXPDSTRING,"btn_%d",linux_code - BTN_WHEEL);
else return 0;
}
- return gensym(hidio_code ? hidio_code : "?");
+ return gensym(*hidio_code ? hidio_code : "?");
}
/* Georg Holzmann: implementation of the keys */
@@ -274,7 +274,7 @@ void hidio_print_device_list(void)
for(i=0;i<128;++i)
{
snprintf(dev_handle_name, MAXPDSTRING, "/dev/input/event%d", i);
- if(dev_handle_name)
+ if(*dev_handle_name)
{
/* open the device read-only, non-exclusive */
fd = open (dev_handle_name, O_RDONLY | O_NONBLOCK);
@@ -451,7 +451,7 @@ t_int hidio_open_device(t_hidio *x, short device_number)
x->x_device_number = device_number;
snprintf(block_device,MAXPDSTRING,"/dev/input/event%d",x->x_device_number);
- if(block_device)
+ if(*block_device)
{
/* open the device read-only, non-exclusive */
// x->x_fd = open(block_device, O_RDONLY | O_NONBLOCK);
@@ -589,8 +589,24 @@ short get_device_number_from_usage(short device_number,
return -1;
}
+void hidio_write_event_symbol_int(t_hidio *x, t_symbol *type, t_int code,
+ t_int instance, t_int value)
+{
+ debug_post(LOG_DEBUG,"hidio_write_event_symbol_int");
+}
+void hidio_write_event_symbols(t_hidio *x, t_symbol *type, t_symbol *code,
+ t_int instance, t_int value)
+{
+ debug_post(LOG_DEBUG,"hidio_write_event_symbols");
+}
+
+void hidio_write_event_ints(t_hidio *x, t_int type, t_int code,
+ t_int instance, t_int value)
+{
+ debug_post(LOG_DEBUG,"hidio_write_event_ints");
+}
-void hidio_write_event(t_hidio *x, t_symbol *type, t_symbol *code,
+void hidio_write_event_JMZ(t_hidio *x, t_symbol *type, t_symbol *code,
t_float instance, t_float value)
{
struct input_event write_event;