aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/boards/px4fmu/px4fmu_init.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-05-09 15:39:54 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-05-09 15:39:54 +0200
commit296a19072d26dfb814f7ca164e508b9203d51ac1 (patch)
tree8711be321cea881e6b4ce713115e134321ac09b8 /src/drivers/boards/px4fmu/px4fmu_init.c
parent44df8db984b0fcedb246aec0c272b62babefc31f (diff)
downloadpx4-firmware-296a19072d26dfb814f7ca164e508b9203d51ac1.tar.gz
px4-firmware-296a19072d26dfb814f7ca164e508b9203d51ac1.tar.bz2
px4-firmware-296a19072d26dfb814f7ca164e508b9203d51ac1.zip
Enabled leds on FMU again
Diffstat (limited to 'src/drivers/boards/px4fmu/px4fmu_init.c')
-rw-r--r--src/drivers/boards/px4fmu/px4fmu_init.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/drivers/boards/px4fmu/px4fmu_init.c b/src/drivers/boards/px4fmu/px4fmu_init.c
index 5dd70c3f9..69edc23ab 100644
--- a/src/drivers/boards/px4fmu/px4fmu_init.c
+++ b/src/drivers/boards/px4fmu/px4fmu_init.c
@@ -1,6 +1,6 @@
/****************************************************************************
*
- * Copyright (C) 2012 PX4 Development Team. All rights reserved.
+ * Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -91,6 +91,19 @@
# endif
#endif
+/*
+ * Ideally we'd be able to get these from up_internal.h,
+ * but since we want to be able to disable the NuttX use
+ * of leds for system indication at will and there is no
+ * separate switch, we need to build independent of the
+ * CONFIG_ARCH_LEDS configuration switch.
+ */
+__BEGIN_DECLS
+extern void led_init();
+extern void led_on(int led);
+extern void led_off(int led);
+__END_DECLS
+
/****************************************************************************
* Protected Functions
****************************************************************************/
@@ -114,7 +127,7 @@ __EXPORT void stm32_boardinitialize(void)
/* configure SPI interfaces */
stm32_spiinitialize();
- /* configure LEDs */
+ /* configure LEDs (empty call to NuttX' ledinit) */
up_ledinit();
}
@@ -178,11 +191,11 @@ __EXPORT int nsh_archinitialize(void)
(hrt_callout)stm32_serial_dma_poll,
NULL);
- // initial LED state
-// drv_led_start();
- up_ledoff(LED_BLUE);
- up_ledoff(LED_AMBER);
- up_ledon(LED_BLUE);
+ /* initial LED state */
+ drv_led_start();
+ led_off(LED_AMBER);
+ led_on(LED_BLUE);
+
/* Configure SPI-based devices */