modify ads1114 driver to use 2 modules (same i2c bus for now)

add airspeed_ads1114 module
modify baro_board module (baro for umarim) to use airspeed when airspeed_ads1114 is loaded
This commit is contained in:
Gautier Hattenberger
2011-11-23 14:58:38 +01:00
parent 316ce9d6ca
commit 4de4dcb1fa
9 changed files with 272 additions and 59 deletions
@@ -10,6 +10,8 @@
<modules>
<load name="baro_board.xml"/>
<load name="airspeed_ads1114.xml"/>
<!--load name="mcp355x.xml"/-->
</modules>
<firmware name="fixedwing">
@@ -40,6 +42,8 @@
<subsystem name="navigation"/>
<!-- Sensors -->
<subsystem name="gps" type="ublox"/>
<!--subsystem name="spi"/-->
</firmware>
+18
View File
@@ -0,0 +1,18 @@
<!DOCTYPE module SYSTEM "module.dtd">
<!-- Module to extend the baro_board module with an airspeed sensor using ads1114 adc -->
<module name="airspeed_ads1114" dir="sensors">
<depend require="baro_board.xml"/>
<header>
<file name="airspeed_ads1114.h"/>
</header>
<periodic fun="airspeed_periodic()" freq="60."/>
<makefile target="ap">
<file name="airspeed_ads1114.c"/>
<define name="USE_BARO_DIFF"/>
<define name="USE_ADS1114_2"/>
<define name="ADS1114_2_PGA" value="0x1"/> <!-- PGA gain = 1 (+/- 4.096V) -->
</makefile>
</module>
+1
View File
@@ -12,6 +12,7 @@
<define name="USE_BARO_AS_ALTIMETER"/>
<file name="baro_board.c" dir="boards/$(BOARD)"/>
<define name="ADS1114_I2C_DEVICE" value="i2c1"/>
<define name="USE_ADS1114_1"/>
<file name="ads1114.c" dir="peripherals"/>
</makefile>
</module>