aboutsummaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-04-06 15:47:34 -0700
committerpx4dev <px4@purgatory.org>2013-04-06 15:47:34 -0700
commite7e35616c01119eae7a436c260d88cdc6fec6ce5 (patch)
treee7c54e5d86f7714647599c4c1da821a6a93b8ffe /nuttx
parentd8e8e6cd209e688de51a800123e513f4885655cd (diff)
downloadpx4-firmware-e7e35616c01119eae7a436c260d88cdc6fec6ce5.tar.gz
px4-firmware-e7e35616c01119eae7a436c260d88cdc6fec6ce5.tar.bz2
px4-firmware-e7e35616c01119eae7a436c260d88cdc6fec6ce5.zip
Fix the way that tone_alarm idles the GPIO and make it idle safely for v2 boards.
Diffstat (limited to 'nuttx')
-rwxr-xr-xnuttx/configs/px4fmu/include/board.h1
-rwxr-xr-xnuttx/configs/px4fmuv2/include/board.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/nuttx/configs/px4fmu/include/board.h b/nuttx/configs/px4fmu/include/board.h
index 8ad56a4c6..0bc0b3021 100755
--- a/nuttx/configs/px4fmu/include/board.h
+++ b/nuttx/configs/px4fmu/include/board.h
@@ -326,6 +326,7 @@
*/
#define TONE_ALARM_TIMER 3 /* timer 3 */
#define TONE_ALARM_CHANNEL 3 /* channel 3 */
+#define GPIO_TONE_ALARM_IDLE (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN8)
#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF2|GPIO_SPEED_2MHz|GPIO_FLOAT|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN8)
/************************************************************************************
diff --git a/nuttx/configs/px4fmuv2/include/board.h b/nuttx/configs/px4fmuv2/include/board.h
index 8158e618d..973aab0ce 100755
--- a/nuttx/configs/px4fmuv2/include/board.h
+++ b/nuttx/configs/px4fmuv2/include/board.h
@@ -311,7 +311,8 @@
*/
#define TONE_ALARM_TIMER 2 /* timer 2 */
#define TONE_ALARM_CHANNEL 1 /* channel 1 */
-#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_FLOAT|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15)
+#define GPIO_TONE_ALARM_IDLE (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN15)
+#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15)
/************************************************************************************
* Public Data