changeset 2349:e82381ee1ecc

* src/sam7ex256_misc.c Use the backlight of the lcd as a simple 1-bit LED
author asl
date Mon, 08 Jan 2007 19:07:42 +0000
parents 73a01c1a35ba
children 25616cc0f362
files packages/hal/arm/at91/sam7ex256/current/ChangeLog packages/hal/arm/at91/sam7ex256/current/src/sam7ex256_misc.c
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/arm/at91/sam7ex256/current/ChangeLog
+++ b/packages/hal/arm/at91/sam7ex256/current/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-01  Uwe Kindler  <uwe_kindler@web.de>
+
+	* src/sam7ex256_misc.c Use the backlight of the lcd as a simple 1-bit LED
+
 2006-12-30  Uwe Kindler  <uwe_kindler@web.de>
 
 	* SAM7-EX256 development board package
--- a/packages/hal/arm/at91/sam7ex256/current/src/sam7ex256_misc.c
+++ b/packages/hal/arm/at91/sam7ex256/current/src/sam7ex256_misc.c
@@ -53,15 +53,14 @@
 #include <cyg/hal/hal_io.h>             // IO macros
 
 //
-// the development board does not contain any leds but this function is
-// required for proper compilation - maybe we can use the integrated
-// nokia 320x 320 pixel lcd for led debug output
+// The development board does not contain any leds but a nokia 320 x 320 
+// pixel lcd. We use the backlight of the lcd as a simple 1-bit LED
 //
 void hal_at91_led (int val)
 {
-    //
-    // todo: implement led simulation for nokia 320 x 320 pixel LCD
-    //
+     HAL_ARM_AT91_GPIO_CFG_DIRECTION(AT91_GPIO_PB20, AT91_PIN_OUT);
+     HAL_ARM_AT91_GPIO_PUT(AT91_GPIO_PB20, (val & 1));
+
 }