mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-17 23:54:34 +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
35 lines
1.0 KiB
XML
35 lines
1.0 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<!--
|
|
Generic ADC module
|
|
@configure ADC_CHANNEL_GENERIC1 on which ADC input 1 is measured
|
|
@configure ADC_CHANNEL_GENERIC2 on which ADC input 2 is measured
|
|
-->
|
|
|
|
<module name="adc_generic" dir="adcs">
|
|
<doc>
|
|
<description>Generic ADC</description>
|
|
<configure name="ADC_CHANNEL_GENERIC1" value="ADCX" description="choose which ADC is used for input 1"/>
|
|
<configure name="ADC_CHANNEL_GENERIC2" value="ADCX" description="choose which ADC is used for input 2"/>
|
|
</doc>
|
|
<header>
|
|
<file name="adc_generic.h"/>
|
|
</header>
|
|
<init fun="adc_generic_init()"/>
|
|
<periodic fun="adc_generic_periodic()" freq="4"/>
|
|
<makefile target="ap">
|
|
<file name="adc_generic.c"/>
|
|
<raw>
|
|
|
|
ifneq ($(ADC_CHANNEL_GENERIC1),)
|
|
ap.CFLAGS += -DADC_CHANNEL_GENERIC1=$(ADC_CHANNEL_GENERIC1) -DUSE_$(ADC_CHANNEL_GENERIC1)
|
|
endif
|
|
|
|
ifneq ($(ADC_CHANNEL_GENERIC2),)
|
|
ap.CFLAGS += -DADC_CHANNEL_GENERIC2=$(ADC_CHANNEL_GENERIC2) -DUSE_$(ADC_CHANNEL_GENERIC2)
|
|
endif
|
|
|
|
</raw>
|
|
</makefile>
|
|
</module>
|