summaryrefslogtreecommitdiff
path: root/nuttx/configs/mx1ads/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-04-10 22:07:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-04-10 22:07:20 +0000
commit7b7fc55ce2dcc9adae56185d40e62e6c2276c98f (patch)
tree759bc03e7ba223c70abd7c3311ed3ffadf168bbb /nuttx/configs/mx1ads/src
parent6a80bc8280dfdd98426010f986928a142debddfd (diff)
downloadpx4-nuttx-7b7fc55ce2dcc9adae56185d40e62e6c2276c98f.tar.gz
px4-nuttx-7b7fc55ce2dcc9adae56185d40e62e6c2276c98f.tar.bz2
px4-nuttx-7b7fc55ce2dcc9adae56185d40e62e6c2276c98f.zip
Basic i.MX1 low-level boot
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1695 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/mx1ads/src')
-rw-r--r--nuttx/configs/mx1ads/src/up_leds.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/nuttx/configs/mx1ads/src/up_leds.c b/nuttx/configs/mx1ads/src/up_leds.c
index d34fe4143..effdb7fa4 100644
--- a/nuttx/configs/mx1ads/src/up_leds.c
+++ b/nuttx/configs/mx1ads/src/up_leds.c
@@ -55,6 +55,22 @@
****************************************************************************/
/****************************************************************************
+ * Name: imx_ledon
+ ****************************************************************************/
+
+static inline void imx_ledon(void)
+{
+}
+
+/****************************************************************************
+ * Name: imx_ledoff
+ ****************************************************************************/
+
+static void imx_ledoff(void)
+{
+}
+
+/****************************************************************************
* Public Funtions
****************************************************************************/
@@ -65,7 +81,9 @@
#ifdef CONFIG_ARCH_LEDS
void up_ledinit(void)
{
-# error "Missing implementation"
+ /* Configure Port A, Bit 2 as an output, initial value=1 */
+
+ imxgpio_configoutput(GPIOA, 2, 1);
}
/****************************************************************************
@@ -74,7 +92,23 @@ void up_ledinit(void)
void up_ledon(int led)
{
-# error "Missing implementation"
+ switch (led)
+ {
+ case LED_STARTED:
+ case LED_HEAPALLOCATE:
+ case LED_IRQSENABLED:
+ case LED_STACKCREATED:
+ imxgpio_setoutput(GPIOA, 2); /* Port A, Bit 2 = 1 */
+ break;
+
+ case LED_INIRQ:
+ case LED_SIGNAL:
+ case LED_ASSERTION:
+ case LED_PANIC:
+ default:
+ imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
+ break;
+ }
}
/****************************************************************************
@@ -83,6 +117,7 @@ void up_ledon(int led)
void up_ledoff(int led)
{
-# error "Missing implementation"
+ imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
}
+
#endif /* CONFIG_ARCH_LEDS */