[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5716] remaping test
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5716] remaping test |
Date: |
Thu, 26 Aug 2010 17:51:53 +0000 |
Revision: 5716
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5716
Author: poine
Date: 2010-08-26 17:51:52 +0000 (Thu, 26 Aug 2010)
Log Message:
-----------
remaping test
Modified Paths:
--------------
paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
paparazzi3/trunk/conf/boards/lisa_l_1.0.makefile
paparazzi3/trunk/sw/airborne/booz/arch/stm32/peripherals/booz_max1168_arch.c
Added Paths:
-----------
paparazzi3/trunk/conf/boards/lisa_l_1.1.makefile
Modified: paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml 2010-08-26 16:29:33 UTC
(rev 5715)
+++ paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml 2010-08-26 17:51:52 UTC
(rev 5716)
@@ -182,7 +182,7 @@
-->
<firmware name="rotorcraft">
- <target name="ap" board="lisa_l_1.0">
+ <target name="ap" board="lisa_l_1.1">
<!-- <define name="BOOZ_START_DELAY" value="1"/> -->
<subsystem name="radio_control" type="spektrum">
<param name="RADIO_CONTROL_SPEKTRUM_MODEL"
Modified:
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
2010-08-26 16:29:33 UTC (rev 5715)
+++ paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
2010-08-26 17:51:52 UTC (rev 5716)
@@ -34,6 +34,11 @@
#
#
+#
+# param: MAX_1168_DRDY_PORT
+
+
+
# imu Booz2 v1.1
ap.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
ap.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
@@ -56,6 +61,8 @@
ap.CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
else ifeq ($(ARCHI), stm32)
ap.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
+ap.CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
+ap.CFLAGS += -DMAX_1168_DRDY_PORT_SOURCE=$(MAX_1168_DRDY_PORT_SOURCE)
endif
#
Modified: paparazzi3/trunk/conf/boards/lisa_l_1.0.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/lisa_l_1.0.makefile 2010-08-26 16:29:33 UTC
(rev 5715)
+++ paparazzi3/trunk/conf/boards/lisa_l_1.0.makefile 2010-08-26 17:51:52 UTC
(rev 5716)
@@ -54,4 +54,12 @@
GPS_BAUD=B38400
GPS_LED = 3
-
+#
+# this is the DRDY pin of a max1168 on a booz IMU
+#
+# v 1.0
+#
+MAX_1168_DRDY_PORT = _GPIOD
+MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOD
+# v1.1
+#MAX_1168_DRDY_PORT = GPIOB
\ No newline at end of file
Added: paparazzi3/trunk/conf/boards/lisa_l_1.1.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/lisa_l_1.1.makefile
(rev 0)
+++ paparazzi3/trunk/conf/boards/lisa_l_1.1.makefile 2010-08-26 17:51:52 UTC
(rev 5716)
@@ -0,0 +1,9 @@
+include $(PAPARAZZI_SRC)/conf/boards/lisa_l_1.0.makefile
+
+#
+# this is the DRDY pin of a max1168 on a booz IMU
+#
+# v1.1
+#
+MAX_1168_DRDY_PORT = _GPIOB
+MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOB
\ No newline at end of file
Modified:
paparazzi3/trunk/sw/airborne/booz/arch/stm32/peripherals/booz_max1168_arch.c
===================================================================
---
paparazzi3/trunk/sw/airborne/booz/arch/stm32/peripherals/booz_max1168_arch.c
2010-08-26 16:29:33 UTC (rev 5715)
+++
paparazzi3/trunk/sw/airborne/booz/arch/stm32/peripherals/booz_max1168_arch.c
2010-08-26 17:51:52 UTC (rev 5716)
@@ -28,6 +28,16 @@
#include <stm32/misc.h>
#include <stm32/dma.h>
+
+/* I can't use GPIOD as it's already defined in some system header */
+#define __DRDY_PORT(dev, _x) _x##dev
+#define _DRDY_PORT(dev, _x) __DRDY_PORT(dev, _x)
+#define DRDY_PORT(_x) _DRDY_PORT(MAX_1168_DRDY_PORT, _x)
+
+#define __DRDY_PORT_SOURCE(dev, _x) _x##dev
+#define _DRDY_PORT_SOURCE(dev, _x) __DRDY_PORT_SOURCE(dev, _x)
+#define DRDY_PORT_SOURCE(_x) _DRDY_PORT_SOURCE(MAX_1168_DRDY_PORT_SOURCE, _x)
+
void exti2_irq_handler(void);
void booz_max1168_arch_init( void ) {
@@ -41,15 +51,18 @@
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
- /* configure external interrupt exti2 on PD2( data ready ) */
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_AFIO, ENABLE);
+ /* configure external interrupt exti2 on PD2( data ready ) v1.0*/
+ /* PB2( data ready ) v1.1*/
+ // RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_AFIO,
ENABLE);
+ RCC_APB2PeriphClockCmd(DRDY_PORT(RCC_APB2Periph) | RCC_APB2Periph_AFIO,
ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOD, &GPIO_InitStructure);
EXTI_InitTypeDef EXTI_InitStructure;
- GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource2);
+ // GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource2);
+ GPIO_EXTILineConfig(DRDY_PORT_SOURCE(GPIO_), GPIO_PinSource2);
EXTI_InitStructure.EXTI_Line = EXTI_Line2;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5716] remaping test,
antoine drouin <=