Hi Daniel,

On Friday 08 May 2009, Daniel Gorsulowski wrote:
> > I suggest to use something like this here:
> >
> >     led_nr = simple_strtoul(argv[1], NULL, 10);
> >     if (led_nr > CONFIG_LED_MAX) {
> >             printf ("Usage:\n%s\n", cmdtp->usage);
> >             return 1;
> >     }
> >
> >     if (strcmp(argv[2], "off") == 0) {
> >             on = 1;
> >     } else if (strcmp(argv[2], "on") == 0) {
> >             on = 0;
> >     } else {
> >             printf ("Usage:\n%s\n", cmdtp->usage);
> >             return 1;
> >     }
> >
> >     user_led(led_nr, on);
> >
> > No ugly #ifdef's in this case. What do you think?
> >
> > Best regards,
> > Stefan
>
> I agree with you.

Good. :)

> Please give me some days, to implement your basic approaches.
> I've many other things to do and it's not that easy (for me)
> to create a tidy patch.

Sure. Take your time. 

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to