libftdi Archives

Subject: Re: Please review: Streaming read for libftdi-1

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 29 Apr 2010 13:52:36 +0200
>>>>> "Jie" == Jie Zhang <jzhang918@xxxxxxxxx> writes:

...
    >> @@ -477,6 +477,11 @@ int ftdi_usb_open_dev(struct ftdi_context *ftdi,
    >> libusb_device *dev)     // set configuration (needed especially for
    >> windows)     // tolerate EBUSY: one device with one configuration,
    >> but two interfaces     //    and libftdi sessions to both interfaces
    >> (e.g. FT2232) +        if (libusb_set_configuration(ftdi->usb_dev,
    >> cfg0) < 0) +        { +            ftdi_usb_close_internal (ftdi); +
    >>            ftdi_error_return(-3, "unable to set usb
    >> configuration. Make sure ftdi_sio is unloaded!"); +        }     if
    >> (desc.bNumConfigurations > 0 && cfg != cfg0)     {         if
    >> (libusb_set_configuration(ftdi->usb_dev, cfg0) < 0)

    Jie> Why do you need this change?

Sorry, this was some leftover. Will remove.

...

    Jie> Use 4 whitespace indent.

...
    Jie> Put `{' on a new line.

When Micah comes back positive about the relicensing, I will resubmit,
hopefully in an acceptable style. As style you advertise the Allman style
(bsd in Emacs)(http://en.wikipedia.org/wiki/Indent_style)?

So I should use in emacs:
(setq indent-tabs-mode nil)
(setq c-default-style "linux"
          c-basic-offset 4)
?

Bye
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread