Hi,

I have a need for fxload.  I think I've narrowed the issues down to
the following (namely USBDEVFS_CONTROL) , so if someone could give me
a leg up on that, I'd be grateful.  FreeBSD includes a predecessor
"EZload", but I don't think it works with recent devices as the
hardware technology has been sold to another company (cypress)...

Thanks,
Steve

# include  <dev/usb/usbdevice_fs.h>

static inline int ctrl_msg (
    int                                 device,
    unsigned char                       requestType,
    unsigned char                       request,
    unsigned short                      value,
    unsigned short                      index,
    unsigned char                       *data,
    size_t                              length
) {
    struct usbdevfs_ctrltransfer        ctrl;

    if (length > USHRT_MAX) {
        fputs ("length too big", stderr);
        return -EINVAL;
    }

    /* 8 bytes SETUP */
    ctrl.bRequestType = requestType;
    ctrl.bRequest = request;
    ctrl.wValue   = value;
    ctrl.wLength  = (unsigned short) length;
    ctrl.wIndex = index;

    /* "length" bytes DATA */
    ctrl.data = data;

    ctrl.timeout = 10000;

    return ioctl (device, USBDEVFS_CONTROL, &ctrl);
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to