summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3240g-eval/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-11-24 01:34:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-11-24 01:34:10 +0000
commitc4bb5210280f599935b85afdf6d8457a5ac5eea4 (patch)
tree1bc7b3d10bec5f3f9feffb73a3012e8a31ff7946 /nuttx/configs/stm3240g-eval/include
parent8839ea425361f00f162c23f42fdb0364f335226e (diff)
downloadpx4-nuttx-c4bb5210280f599935b85afdf6d8457a5ac5eea4.tar.gz
px4-nuttx-c4bb5210280f599935b85afdf6d8457a5ac5eea4.tar.bz2
px4-nuttx-c4bb5210280f599935b85afdf6d8457a5ac5eea4.zip
Finish code for basic STM3240 port
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4124 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3240g-eval/include')
-rwxr-xr-xnuttx/configs/stm3240g-eval/include/board.h34
1 files changed, 22 insertions, 12 deletions
diff --git a/nuttx/configs/stm3240g-eval/include/board.h b/nuttx/configs/stm3240g-eval/include/board.h
index 5ebc54bb7..b66997235 100755
--- a/nuttx/configs/stm3240g-eval/include/board.h
+++ b/nuttx/configs/stm3240g-eval/include/board.h
@@ -174,18 +174,28 @@
/* LED definitions ******************************************************************/
-#define LED_STARTED 0
-#define LED_HEAPALLOCATE 1
-#define LED_IRQSENABLED 2
-#define LED_STACKCREATED 3
-#define LED_INIRQ 4
-#define LED_SIGNAL 5
-#define LED_ASSERTION 6
-#define LED_PANIC 7
-
-/* The STM3240G-EVAL supports several buttons */
-
-#warning "Missing logic"
+/* The STM3240G-EVAL board has 4 LEDs that we will encode as: */
+
+#define LED_STARTED 0 /* LED1 */
+#define LED_HEAPALLOCATE 1 /* LED2 */
+#define LED_IRQSENABLED 2 /* LED1 + LED2 */
+#define LED_STACKCREATED 3 /* LED3 */
+#define LED_INIRQ 4 /* LED1 + LED3 */
+#define LED_SIGNAL 5 /* LED2 + LED3 */
+#define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */
+#define LED_PANIC 7 /* N/C + N/C + N/C + LED4 */
+
+/* The STM3240G-EVAL supports three buttons: */
+
+#define BUTTON_WAKEUP 0
+#define BUTTON_TAMPER 1
+#define BUTTON_USER 2
+
+#define NUM_BUTTONS 3
+
+#define BUTTON_WAKEUP_BIT (1 << BUTTON_WAKEUP)
+#define BUTTON_TAMPER_BIT (1 << BUTTON_TAMPER)
+#define BUTTON_USER_BIT (1 << BUTTON_USER)
/* Alternate function pin selections ************************************************/