mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-20 19:36:19 +08:00
bcaba7c720
modules developpers can provide - a description of the module - a list of the configuration variables and flags (configure and define) - a list of sections to add to the airframe file
48 lines
1.5 KiB
XML
48 lines
1.5 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="ir_adc" dir="sensors">
|
|
<doc>
|
|
<description>Infrared sensor using ADC</description>
|
|
<configure name="ADC_IR1" value="ADCX" description="ADC for IR horizontal channel 1"/>
|
|
<configure name="ADC_IR2" value="ADCX" description="ADC for IR horizontal channel 2"/>
|
|
<configure name="ADC_IR_TOP" value="ADCX" description="ADC for IR vertical channel"/>
|
|
<configure name="ADC_IR_NB_SAMPLES" value="nb samples"/>
|
|
</doc>
|
|
<header>
|
|
<file name="infrared_adc.h"/>
|
|
</header>
|
|
<init fun="infrared_adc_init()"/>
|
|
<periodic fun="infrared_adc_update()" freq="60."/>
|
|
<makefile target="ap|sim|jsbsim">
|
|
<define name="USE_INFRARED_TELEMETRY"/>
|
|
<file name="infrared.c" dir="subsystems/sensors"/>
|
|
<file name="infrared_adc.c" dir="subsystems/sensors"/>
|
|
</makefile>
|
|
<makefile target="ap">
|
|
<raw>
|
|
#
|
|
# LPC only has one ADC
|
|
#
|
|
ifeq ($(ARCH), lpc21)
|
|
ap.CFLAGS += -DADC_CHANNEL_IR1=$(ADC_IR1) -DUSE_$(ADC_IR1)
|
|
ap.CFLAGS += -DADC_CHANNEL_IR2=$(ADC_IR2) -DUSE_$(ADC_IR2)
|
|
ap.CFLAGS += -DADC_CHANNEL_IR_TOP=$(ADC_IR_TOP) -DUSE_$(ADC_IR_TOP)
|
|
endif
|
|
|
|
#
|
|
# On STM32 let's hardwire infrared sensors to AD1 for now
|
|
#
|
|
ifeq ($(ARCH), stm32)
|
|
ap.CFLAGS += -DUSE_AD1
|
|
ap.CFLAGS += -DADC_CHANNEL_IR1=$(ADC_IR1_CHAN) -DUSE_AD1_$(ADC_IR1)
|
|
ap.CFLAGS += -DADC_CHANNEL_IR2=$(ADC_IR2_CHAN) -DUSE_AD1_$(ADC_IR2)
|
|
ap.CFLAGS += -DADC_CHANNEL_IR_TOP=$(ADC_IR_TOP_CHAN) -DUSE_AD1_$(ADC_IR_TOP)
|
|
endif
|
|
|
|
ap.CFLAGS += -DADC_CHANNEL_IR_NB_SAMPLES=$(ADC_IR_NB_SAMPLES)
|
|
</raw>
|
|
</makefile>
|
|
</module>
|
|
|
|
|