-
Notifications
You must be signed in to change notification settings - Fork 8
/
glibusb.h
19 lines (14 loc) · 1.03 KB
/
glibusb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef GLIB_USB_H
#define GLIB_USB_H
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <libusb.h>
GSource *glibusb_create_gsource(libusb_context *ctx);
void glibusb_control_transfer(libusb_device_handle *dev, unsigned int timeout, unsigned char *buffer, int buffer_length, GAsyncReadyCallback callback, gpointer user_data);
enum libusb_transfer_status glibusb_control_transfer_finish(GAsyncResult *result, int *actual_length);
void glibusb_interrupt_transfer(libusb_device_handle *dev, unsigned char endpoint, unsigned int timeout, unsigned char *buffer, int buffer_length, GAsyncReadyCallback callback, gpointer user_data);
enum libusb_transfer_status glibusb_interrupt_transfer_finish(GAsyncResult *result, int *actual_length);
void glibusb_bulk_transfer(libusb_device_handle *dev, unsigned char endpoint, unsigned int timeout, unsigned char *buffer, int buffer_length, GAsyncReadyCallback callback, gpointer user_data);
enum libusb_transfer_status glibusb_bulk_transfer_finish(GAsyncResult *result, int *actual_length);
#endif