aboutsummaryrefslogtreecommitdiffstats
path: root/cphidgetgeneric.h
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-04-14 12:56:48 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-04-14 12:56:48 +0100
commit0b624384cd52be20e61284551d832b499d7b7707 (patch)
tree6f95a4bbef47abc9720b96c0722e8f632aef228a /cphidgetgeneric.h
downloadlibphidget21-0b624384cd52be20e61284551d832b499d7b7707.tar.gz
Imported Upstream version 2.1.8.20120216upstream/2.1.8.20120216
Diffstat (limited to 'cphidgetgeneric.h')
-rw-r--r--cphidgetgeneric.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/cphidgetgeneric.h b/cphidgetgeneric.h
new file mode 100644
index 0000000..55fab44
--- /dev/null
+++ b/cphidgetgeneric.h
@@ -0,0 +1,35 @@
+#ifndef __CPHIDGETGENERIC
+#define __CPHIDGETGENERIC
+#include "cphidget.h"
+
+DPHANDLE(Generic)
+CHDRSTANDARD(Generic)
+
+CHDRGET(Generic,INPacketLength,int *length)
+CHDRGET(Generic,OUTPacketLength,int *length)
+
+CHDRGET(Generic,LastPacket,const unsigned char **packet, int *length)
+CHDRSET(Generic,Packet,unsigned char *packet, int length)
+CHDREVENT(Generic,Packet,const unsigned char *packet, int length)
+
+#ifndef EXTERNALPROTO
+struct _CPhidgetGeneric {
+ CPhidget phid;
+
+ int (CCONV *fptrPacket)(CPhidgetGenericHandle, void *, const unsigned char *, int);
+ void *fptrPacketptr;
+
+ unsigned char lastPacket[MAX_IN_PACKET_SIZE];
+
+ unsigned char buffer[MAX_OUT_PACKET_SIZE];
+
+ int in, out;
+
+ unsigned char outputPacket[MAX_OUT_PACKET_SIZE];
+ unsigned int outputPacketLen;
+} typedef CPhidgetGenericInfo;
+#endif
+
+/** @} */
+
+#endif