paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [5630] generic adc subsystem for fw


From: Felix Ruess
Subject: [paparazzi-commits] [5630] generic adc subsystem for fw
Date: Mon, 23 Aug 2010 18:10:53 +0000

Revision: 5630
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5630
Author:   flixr
Date:     2010-08-23 18:10:53 +0000 (Mon, 23 Aug 2010)
Log Message:
-----------
generic adc subsystem for fw

Modified Paths:
--------------
    paparazzi3/trunk/conf/boards/tiny_2.11.makefile

Added Paths:
-----------
    paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/adc_generic.makefile

Added: paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/adc_generic.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/adc_generic.makefile   
                        (rev 0)
+++ paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/adc_generic.makefile   
2010-08-23 18:10:53 UTC (rev 5630)
@@ -0,0 +1,30 @@
+# generic ADC
+
+#
+# default values for tiny and twog are:
+# ADC_GENERIC_NB_SAMPLES = 16
+#
+# to change just redefine before including this file
+#
+# you have to set the params of the ADCs to use, eg.
+# <subsystem name"adc" type="generic">
+#   <param name="ADC_GENERIC1" value="ADC_3"/>
+#   <param name="ADC_GENERIC2" value="ADC_4"/>
+# </subsystem>
+#
+# if you only set one parameter only that one will be used
+
+ifdef ADC_GENERIC1
+  ap.CFLAGS += -DUSE_ADC_GENERIC 
-DADC_CHANNEL_GENERIC_NB_SAMPLES=$(ADC_GENERIC_NB_SAMPLES)
+  ap.CFLAGS += -DADC_CHANNEL_GENERIC1=$(ADC_GENERIC1) -DUSE_$(ADC_GENERIC1)
+  ifdef ADC_GENERIC2
+    ap.CFLAGS += -DADC_CHANNEL_GENERIC2=$(ADC_GENERIC2) -DUSE_$(ADC_GENERIC2)
+  endif
+  ap.srcs += $(SRC_FIXEDWING)/adc_generic.c
+else
+  ifdef ADC_GENERIC2
+    ap.CFLAGS += -DUSE_ADC_GENERIC 
-DADC_CHANNEL_GENERIC_NB_SAMPLES=$(ADC_GENERIC_NB_SAMPLES)
+    ap.CFLAGS += -DADC_CHANNEL_GENERIC2=$(ADC_GENERIC1) -DUSE_$(ADC_GENERIC2)
+    ap.srcs += $(SRC_FIXEDWING)/adc_generic.c
+  endif
+endif

Modified: paparazzi3/trunk/conf/boards/tiny_2.11.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/tiny_2.11.makefile     2010-08-23 18:10:46 UTC 
(rev 5629)
+++ paparazzi3/trunk/conf/boards/tiny_2.11.makefile     2010-08-23 18:10:53 UTC 
(rev 5630)
@@ -32,6 +32,7 @@
 ADC_GYRO_PITCH = ADC_4
 ADC_GYRO_NB_SAMPLES = 16
 
+ADC_GENERIC_NB_SAMPLES = 16
 
 # All targets on the TINY board run on the same processor achitecture
 $(TARGET).ARCHDIR = $(ARCHI)




reply via email to

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