paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [6137] fixed erroneous commit


From: Eric
Subject: [paparazzi-commits] [6137] fixed erroneous commit
Date: Sat, 09 Oct 2010 12:41:51 +0000

Revision: 6137
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6137
Author:   lamestllama
Date:     2010-10-09 12:41:51 +0000 (Sat, 09 Oct 2010)
Log Message:
-----------
fixed erroneous commit

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h

Modified: 
paparazzi3/trunk/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h  
2010-10-09 12:33:14 UTC (rev 6136)
+++ paparazzi3/trunk/sw/airborne/modules/deploy_sonar_buoy/deploy_sonar_buoy.h  
2010-10-09 12:41:51 UTC (rev 6137)
@@ -1,3 +1,4 @@
+
 /*
  * $Id: $
  *
@@ -20,49 +21,16 @@
  * the Free Software Foundation, 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#include <stm32/gpio.h>
-#include <stm32/rcc.h>
-#include "deploy_sonar_buoy.h"
-#include "airframe.h"
 
-/* simple module to toggle two gpio pins on Lisa. 
- * The application in this was written for drops 
- * two sonar buoys. TODO extend to a generalised 
- * GPIO  module 
- */
 
-bool_t buoy_1;
-bool_t buoy_2;
+#ifndef DEPLOY_SONAR_BUOY_H
+#define DEPLOY_SONAR_BUOY_H
 
-/* initialises GPIO pins */
-void deploy_sonar_buoy_init(void) {
-  /* initialise peripheral clock for port C */
-  RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOC, ENABLE);
-  GPIO_InitTypeDef GPIO_InitStructure;
-  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
-  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
-  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
-  GPIO_Init(GPIOC, &GPIO_InitStructure);  
-  /* set port C pin 5 to be low */
-  GPIO_WriteBit(GPIOC, GPIO_Pin_5 , Bit_RESET );
-  
-  /* initialise peripheral clock for port B */
-  RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOB, ENABLE);
-  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
-  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
-  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
-  GPIO_Init(GPIOB, &GPIO_InitStructure);
-  /* set port B pin 0 to be low */  
-  GPIO_WriteBit(GPIOB, GPIO_Pin_0 , Bit_RESET );
-  
-  /* set the variables of interest to be FALSE */
-  buoy_1 = FALSE;
-  buoy_2 = FALSE;
-  deploy_sonar_buoy_periodic();
-}
+#include "std.h"
 
-/* sets GPIO pins */
-void deploy_sonar_buoy_periodic(void) {
-  GPIO_WriteBit(GPIOC, GPIO_Pin_5 , buoy_1 ? Bit_SET : Bit_RESET );
-  GPIO_WriteBit(GPIOB, GPIO_Pin_0 , buoy_2 ? Bit_SET : Bit_RESET );
-}
+extern bool_t buoy_1;
+extern bool_t buoy_2;
+extern void deploy_sonar_buoy_init(void);
+extern void deploy_sonar_buoy_periodic(void);
+
+#endif  /* DEPLOY_SONAR_BUOY_H */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]