[PD-cvs] externals/hcs/hid hid_darwin.c, 1.21, 1.22 hid_linux.c, 1.16, 1.17
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Sun May 28 03:05:48 CEST 2006
- Previous message: [PD-cvs] externals/hcs/hid TODO, 1.22, 1.23 hid.c, 1.23, 1.24 hid.h, 1.21, 1.22 hid_darwin.c, 1.20, 1.21 hid_linux.c, 1.15, 1.16 hid_windows.c, 1.2, 1.3
- Next message: [PD-cvs] externals/hcs/hid/doc hid-help.pd,1.22,1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/externals/hcs/hid
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31064
Modified Files:
hid_darwin.c hid_linux.c
Log Message:
compiles and works on GNU/Linux now, but needs to have the new open methods implemented
Index: hid_darwin.c
===================================================================
RCS file: /cvsroot/pure-data/externals/hcs/hid/hid_darwin.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** hid_darwin.c 27 May 2006 23:12:51 -0000 1.21
--- hid_darwin.c 28 May 2006 01:05:45 -0000 1.22
***************
*** 417,422 ****
{
pRecDevice pCurrentHIDDevice = NULL;
! char vendor_id_pointer[7];
! char product_id_pointer[7];
t_symbol *output_symbol;
t_atom *output_atom = getbytes(sizeof(t_atom));
--- 417,422 ----
{
pRecDevice pCurrentHIDDevice = NULL;
! char vendor_id_string[7];
! char product_id_string[7];
t_symbol *output_symbol;
t_atom *output_atom = getbytes(sizeof(t_atom));
***************
*** 451,463 ****
1, output_atom);
/* vendor id */
! sprintf(vendor_id_pointer,"0x%04x",
(unsigned int)pCurrentHIDDevice->vendorID);
! SETSYMBOL(output_atom, gensym(vendor_id_pointer));
outlet_anything( x->x_status_outlet, gensym("vendorID"),
1, output_atom);
/* product id */
! sprintf(product_id_pointer,"0x%04x",
(unsigned int)pCurrentHIDDevice->productID);
! SETSYMBOL(output_atom, gensym(product_id_pointer));
outlet_anything( x->x_status_outlet, gensym("productID"),
1, output_atom);
--- 451,463 ----
1, output_atom);
/* vendor id */
! sprintf(vendor_id_string,"0x%04x",
(unsigned int)pCurrentHIDDevice->vendorID);
! SETSYMBOL(output_atom, gensym(vendor_id_string));
outlet_anything( x->x_status_outlet, gensym("vendorID"),
1, output_atom);
/* product id */
! sprintf(product_id_string,"0x%04x",
(unsigned int)pCurrentHIDDevice->productID);
! SETSYMBOL(output_atom, gensym(product_id_string));
outlet_anything( x->x_status_outlet, gensym("productID"),
1, output_atom);
Index: hid_linux.c
===================================================================
RCS file: /cvsroot/pure-data/externals/hcs/hid/hid_linux.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** hid_linux.c 27 May 2006 23:12:51 -0000 1.16
--- hid_linux.c 28 May 2006 01:05:45 -0000 1.17
***************
*** 461,465 ****
}
! t_int hid_build_device_list(t_hid *x)
{
debug_print(LOG_DEBUG,"hid_build_device_list");
--- 461,465 ----
}
! void hid_build_device_list(void)
{
debug_print(LOG_DEBUG,"hid_build_device_list");
***************
*** 471,476 ****
* the current t_float, then this will probably need to be changed.
*/
-
- return (0);
}
--- 471,474 ----
***************
*** 480,483 ****
--- 478,522 ----
}
+ /* device info on the status outlet */
+ void hid_platform_specific_info(t_hid* x)
+ {
+ struct input_id my_id;
+ char device_name[256] = "Unknown";
+ char vendor_id_string[7];
+ char product_id_string[7];
+ t_symbol *output_symbol;
+ t_atom *output_atom = getbytes(sizeof(t_atom));
+
+ ioctl(x->x_fd, EVIOCGID);
+ sprintf(vendor_id_string,"0x%04x", my_id.vendor);
+ SETSYMBOL(output_atom, gensym(vendor_id_string));
+ outlet_anything( x->x_status_outlet, gensym("vendorID"),
+ 1, output_atom);
+ sprintf(product_id_string,"0x%04x", my_id.product);
+ SETSYMBOL(output_atom, gensym(product_id_string));
+ outlet_anything( x->x_status_outlet, gensym("productID"),
+ 1, output_atom);
+ ioctl(x->x_fd, EVIOCGNAME(sizeof(device_name)), device_name);
+ SETSYMBOL(output_atom, gensym(device_name));
+ outlet_anything( x->x_status_outlet, gensym("name"),
+ 1, output_atom);
+ freebytes(output_atom,sizeof(t_atom));
+ }
+
+
+ t_int get_device_number_by_id(unsigned short vendor_id, unsigned short product_id)
+ {
+
+ return -1;
+ }
+
+ t_int get_device_number_from_usage_list(t_int device_number,
+ unsigned short usage_page,
+ unsigned short usage)
+ {
+
+ return -1;
+ }
+
- Previous message: [PD-cvs] externals/hcs/hid TODO, 1.22, 1.23 hid.c, 1.23, 1.24 hid.h, 1.21, 1.22 hid_darwin.c, 1.20, 1.21 hid_linux.c, 1.15, 1.16 hid_windows.c, 1.2, 1.3
- Next message: [PD-cvs] externals/hcs/hid/doc hid-help.pd,1.22,1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list