Changeset 11529


Ignore:
Timestamp:
18 Mar 2014, 23:39:47 (11 years ago)
Author:
uli
Message:

Make at least test pass again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/pyfprint/trunk/src/fprint.py

    r11526 r11529  
    22import ctypes
    33
    4 lib = ctypes.cdll.LoadLibrary("libfprint.so")
     4lib = ctypes.cdll.LoadLibrary("libfprint.so.0")
    55
    66#
     
    2828        ]
    2929
     30class libusb_device_descriptor(ctypes.Structure):
     31    # from libusb.h
     32    _fields_ = [
     33        ('bLength', ctypes.c_uint8),
     34        ('bDescriptorType', ctypes.c_uint8),
     35        ('bcdUSB', ctypes.c_uint16),
     36        ('bDeviceClass', ctypes.c_uint8),
     37        ('bDeviceSubClass', ctypes.c_uint8),
     38        ('bDeviceProtocol', ctypes.c_uint8),
     39        ('bMaxPacketSize0', ctypes.c_uint8),
     40        ('idVendor', ctypes.c_uint16),
     41        ('idProduct', ctypes.c_uint16),
     42        ('bcdDevice', ctypes.c_uint16),
     43        ('iManufacturer', ctypes.c_uint8),
     44        ('iProduct', ctypes.c_uint8),
     45        ('iSerialNumber', ctypes.c_uint8),
     46        ('bNumConfigurations', ctypes.c_uint8),
     47        ]
    3048
    3149
     
    4866        #  Device operations
    4967        ('discover', ctypes.CFUNCTYPE(
    50             c_int,  # Returntype?
    51             POINTER(libusb_device_descriptor), ctypes.c_uint32_p),
     68            ctypes.c_int,  # Returntype?
     69            ctypes.POINTER(libusb_device_descriptor),
     70            ctypes.POINTER(ctypes.c_uint32)),
     71         ),
    5272        # int (*discover)(struct libusb_device_descriptor *dsc, uint32_t *devtype);
    5373        # int (*open)(struct fp_dev *dev, unsigned long driver_data);
     
    5979        # int (*identify_start)(struct fp_dev *dev);
    6080        # int (*identify_stop)(struct fp_dev *dev, gboolean iterating);
    61 };
     81# };
    6282     
    6383        ]
Note: See TracChangeset for help on using the changeset viewer.