On Tuesday, April 20, 2010 20:45:12 Thomas Chou wrote:
> +void __led_init(led_id_t mask, int state)
> +{
> +     gpio_direction_output(mask, (state == STATUS_LED_ON) ? 0 : 1);
> +}
> +
> +void __led_set(led_id_t mask, int state)
> +{
> +     gpio_set_value(mask, (state == STATUS_LED_ON) ? 0 : 1);
> +}

are these checks correct ?  "on" means a value of "1" with GPIO lines, but 
here you're setting the value to 0 when the state is "on".  so perhaps they 
should both read:
        ..., state == STATUS_LED_ON);

> +void __led_toggle(led_id_t mask)
> +{
> +     gpio_set_value(mask, !gpio_get_value (mask));
> +}

no space before the (mask)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to