[U-Boot] i.MX51 How to use and program LED's
Stefano Babic
sbabic at denx.de
Thu Mar 25 17:51:32 CET 2010
Carlo McKee wrote:
> Hello,
>
> I need help on how to write a simple routine in C to turn on and off the
> general purpose diagnostic LED's of the iMX51 EVK board.
> I am developing under Linux. Any help appreciated.
As I cann see from schematics, the diagnostic led is connected with
GPIO2_6. At the moment, there are no accessors function to access the
gpio, in the same way we have for i.MX31. It should be nice to have it,
however ;)
Anyway, you can directly access to the gpio controller with readl/writel
accessors. You can see an example (read) in mx51evk.c in board_mmc_getcd().
Check the gpio controller part of the manual, you need at least to set
the direction as output for the GPIO2_6 pin before setting it.
Regards,
Stefano Babic
--
=====================================================================
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: office at denx.de
=====================================================================
More information about the U-Boot
mailing list