]> git.zerfleddert.de Git - usb-driver/blobdiff - xpcu.h
make it possible to return an error everywhere
[usb-driver] / xpcu.h
diff --git a/xpcu.h b/xpcu.h
index bbf5a9da1d37533d647f403998c89765da6fd78a..30ff4f181cfa63097e8dc8d2148c52fdf89c853b 100644 (file)
--- a/xpcu.h
+++ b/xpcu.h
@@ -1,17 +1,23 @@
 #define XPCU_CLAIM     1
 #define XPCU_RELEASE   0
 
+#define ENABLE_INTERRUPT       1
+#define DISABLE_INTERRUPT      0
+
 struct xpcu_s {
        struct usb_device *dev;
        usb_dev_handle *handle;
-       struct usb_bus *busses;
        int interface;
        int alternate;
        unsigned long card_type;
+       pthread_mutex_t interrupt;
 };
 
-int __attribute__ ((visibility ("hidden"))) xpcu_deviceinfo(struct xpcu_s *xpcu, unsigned char *buf);
+int __attribute__ ((visibility ("hidden"))) xpcu_deviceinfo(struct xpcu_s *xpcu, struct usb_get_device_data *ugdd);
 int __attribute__ ((visibility ("hidden"))) xpcu_transfer(struct xpcu_s *xpcu, struct usb_transfer *ut);
-void __attribute__ ((visibility ("hidden"))) xpcu_set_interface(struct xpcu_s *xpcu, struct usb_set_interface *usi);
-struct xpcu_s __attribute__ ((visibility ("hidden"))) *xpcu_open(void);
-void __attribute__ ((visibility ("hidden"))) xpcu_close(struct xpcu_s *xpcu);
+int __attribute__ ((visibility ("hidden"))) xpcu_set_interface(struct xpcu_s *xpcu, struct usb_set_interface *usi);
+struct xpcu_s __attribute__ ((visibility ("hidden"))) *xpcu_find(struct event *e);
+int __attribute__ ((visibility ("hidden"))) xpcu_found(struct xpcu_s *xpcu, struct event *e);
+int __attribute__ ((visibility ("hidden"))) xpcu_close(struct xpcu_s *xpcu, struct event *e);
+int __attribute__ ((visibility ("hidden"))) xpcu_int_state(struct xpcu_s *xpcu, struct interrupt *it, int enable);
+int __attribute__ ((visibility ("hidden"))) xpcu_int_wait(struct xpcu_s *xpcu, struct interrupt *it);
Impressum, Datenschutz