libftdi Archives

Subject: Re: Re: [PATCH] -FT230X: Readout, decode and encode the RS232 inverson configuration bits.

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Sep 2014 10:19:05 +0200
Hi Uwe,

On Monday, 18. August 2014 09:31:54 Rogier Wolff wrote:
> On Thu, Aug 14, 2014 at 03:43:01PM +0200, Uwe Bonnes wrote:
> > +                fprintf(stdout,"Inversion on ");
> > +                if (eeprom->rs232_inversion & INVERT_TXD) {
> > +                    fprintf(stdout,"TXD");
> > +                    i = 1;
> > +                }
> > +                if (eeprom->rs232_inversion & INVERT_RXD) {
> > +                    if (i)
> > +                        fprintf(stdout,", ");
> > +                    fprintf(stdout,"RXD");
> > +                    i = 1;
> > +                }
> 
> I would write this a bit different:
> 
> Already at the first call of the helper function, the total code is
> less. When you reuse the helper, you start having /much/ less code...
> 
> Oh, and my code does "one pin" / "two pins" correctly...  :-)
> 
>       Roger.

any comment on Roger's comment? Any plans to update your patch?

Cheers,
Thomas


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

Current Thread