wrapper module to use a board specific barometer

This commit is contained in:
Gautier Hattenberger
2011-07-19 23:32:31 +02:00
parent 5a79bc6174
commit 2980a5decf
4 changed files with 54 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_board" dir="sensors">
<header>
<file name="baro_board_module.h"/>
</header>
<init fun="baro_init()"/>
<periodic fun="baro_periodic()" freq="60."/>
<event fun="BaroEvent(baro_abs,baro_diff)"/>
<makefile target="ap">
<define name="USE_BARO_AS_ALTIMETER"/>
<file name="baro_board.c" dir="boards/$(BOARD)"/>
<define name="ADS1114_I2C_DEVICE" value="i2c1"/>
<file name="ads1114.c" dir="peripherals"/>
</makefile>
</module>
+2 -1
View File
@@ -66,5 +66,6 @@ void baro_periodic( void ) {
} }
#endif #endif
// Read the ADC // Read the ADC
//ads1114_read(); ads1114_read();
} }
+1
View File
@@ -68,3 +68,4 @@ void baro_periodic( void ) {
// Read the ADC // Read the ADC
ads1114_read(); ads1114_read();
} }
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2011 Gautier Hattenberger
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
/*
* Wrapper for the board specific barometer
*/
#ifndef BARO_BOARD_MODULE_H
#define BARO_BOARD_MODULE_H
#include "subsystems/sensors/baro.h"
static inline void baro_abs(void) {}
static inline void baro_diff(void) {}
#endif