[modules] use configure for I2C_DEV

This commit is contained in:
Felix Ruess
2015-11-16 17:39:53 +01:00
parent ef9f21c373
commit 74ebb5bad9
17 changed files with 121 additions and 34 deletions
+8 -1
View File
@@ -18,7 +18,7 @@
- Brown wire: SCL
</description>
<define name="BARO_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
<configure name="BARO_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
<define name="BARO_ETS_SCALE" value="scale" description="scale factor to convert raw ADC measurement to pressure in Pascal (default: 37.5)"/>
<define name="BARO_ETS_ALT_SCALE" value="scale" description="scale factor to convert raw ADC measurement to altitude change in meters (default: 0.32)"/>
<define name="BARO_ETS_ALT_SCALE" value="scale" description="pressure offset in Pascal when converting raw adc to real pressure (default: 101325.0="/>
@@ -34,6 +34,13 @@
<event fun="BaroEtsEvent()"/>
<makefile target="ap">
<raw>
BARO_ETS_I2C_DEV ?= i2c0
BARO_ETS_I2C_DEV_LOWER=$(shell echo $(BARO_ETS_I2C_DEV) | tr A-Z a-z)
BARO_ETS_I2C_DEV_UPPER=$(shell echo $(BARO_ETS_I2C_DEV) | tr a-z A-Z)
</raw>
<define name="USE_$(BARO_ETS_I2C_DEV_UPPER)"/>
<define name="BARO_ETS_I2C_DEV" value="$(BARO_ETS_I2C_DEV_LOWER)"/>
<file name="baro_ets.c"/>
</makefile>