diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@gmail.com> | 2017-09-23 10:42:07 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@gmail.com> | 2017-09-23 10:42:07 +0000 |
commit | 9bc7aac84481cb6811e5dee0f76b827500136cb6 (patch) | |
tree | 9770bca3dd6676312bcdc46abe0eb211b9eaa53e /os/ex/Bosch | |
parent | c0949745e19dc0012f550e961d36ce0df34ff805 (diff) | |
download | ChibiOS-9bc7aac84481cb6811e5dee0f76b827500136cb6.tar.gz ChibiOS-9bc7aac84481cb6811e5dee0f76b827500136cb6.tar.bz2 ChibiOS-9bc7aac84481cb6811e5dee0f76b827500136cb6.zip |
Aligned documentation of BMP085
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10686 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex/Bosch')
-rw-r--r-- | os/ex/Bosch/bmp085.c | 30 | ||||
-rw-r--r-- | os/ex/Bosch/bmp085.h | 28 |
2 files changed, 22 insertions, 36 deletions
diff --git a/os/ex/Bosch/bmp085.c b/os/ex/Bosch/bmp085.c index 82676dc4c..1d68e8bca 100644 --- a/os/ex/Bosch/bmp085.c +++ b/os/ex/Bosch/bmp085.c @@ -20,32 +20,29 @@ /** * @file bmp085.c - * * @brief BMP085 Digital pressure sensor interface module code. * - * @author Theodore Ateba, tf.ateba@gmail.com - * - * @date 19 July 2016 - * - * TODO: Read the altitude with the sensor. - * + * @addtogroup BMP085 + * @ingroup EX_BOSCH * @{ */ -/*==========================================================================*/ -/* Include files. */ -/*==========================================================================*/ - -/* ChibiOS HAL file. */ #include "hal.h" - -/* ChibiOS EX file. */ #include "bmp085.h" /*==========================================================================*/ /* Driver local definitions. */ /*==========================================================================*/ +#define BMP085_SAD 0x77 + +#define BMP085_CR_P_VAL0 0x34 +#define BMP085_CR_P_VAL1 0x74 +#define BMP085_CR_P_VAL2 0xB4 +#define BMP085_CR_P_VAL3 0xF4 + +#define BMP085_CR_T_VAL 0x2E + /*==========================================================================*/ /* Driver exported variables. */ /*==========================================================================*/ @@ -176,6 +173,7 @@ static void calcul_t(int32_t ut, float *ctp) { * @brief Calcul the true pressure. * * @param[in] up uncompensated pressure + * @param[in] oss over sampling setting * @param[out] cpp pointer of the compensated pressure */ static void calcul_p(int32_t up, uint8_t oss, float *cpp) { @@ -290,7 +288,7 @@ static msg_t start_p_measurement(BMP085Driver *devp) { * * @return msg the operation status */ -msg_t acquire_ut(BMP085Driver *devp, int32_t *utemp) { +static msg_t acquire_ut(BMP085Driver *devp, int32_t *utemp) { uint8_t rxbuf[2]; msg_t msg; @@ -327,7 +325,7 @@ msg_t acquire_ut(BMP085Driver *devp, int32_t *utemp) { * * @return msg the operation status */ -msg_t acquire_up(BMP085Driver *devp, int32_t *upress) { +static msg_t acquire_up(BMP085Driver *devp, int32_t *upress) { uint8_t rxbuf[3]; uint8_t oss; diff --git a/os/ex/Bosch/bmp085.h b/os/ex/Bosch/bmp085.h index 9bfa5b99e..04233f534 100644 --- a/os/ex/Bosch/bmp085.h +++ b/os/ex/Bosch/bmp085.h @@ -20,13 +20,10 @@ /** * @file bmp085.h - * * @brief BMP085 Digital pressure sensor interface module header. * - * @author Theodore Ateba, tf.ateba@gmail.com - * - * @date 19 July 2016 - * + * @addtogroup BMP085 + * @ingroup EX_BOSCH * @{ */ @@ -70,29 +67,20 @@ * @brief BMP085 barometer subsystem characteristics. * @{ */ -#define BMP085_BARO_NUMBER_OF_AXES 1U /**< Number of axes. */ +#define BMP085_BARO_NUMBER_OF_AXES 1U /**< Number of axes */ -#define BMP085_P_RES 0.01 /**< Press resolution. */ - -#define BMP085_CR_P_VAL0 0x34 /**< Press control reg value 0. */ -#define BMP085_CR_P_VAL1 0x74 /**< Press control reg value 1. */ -#define BMP085_CR_P_VAL2 0xB4 /**< Press control reg value 2. */ -#define BMP085_CR_P_VAL3 0xF4 /**< Press control reg value 3. */ +#define BMP085_P_RES 0.01 /**< LSB/hP */ /** @} */ /** * @brief BMP085 thermometer subsystem characteristics. * @{ */ -#define BMP085_THERMO_NUMBER_OF_AXES 1U /**< Number of axis. */ - -#define BMP085_T_RES 0.1 /**< Temp resolution. */ +#define BMP085_THERMO_NUMBER_OF_AXES 1U /**< Number of axes */ -#define BMP085_CR_T_VAL 0x2E /**< Temp control register value. */ +#define BMP085_T_RES 0.1 /**< LSB/C° */ /** @} */ -#define BMP085_SAD 0x77 /**< Slave address. */ - /** * @name BMP085 Registers addresses. * @{ @@ -151,7 +139,7 @@ * @note The default is @p FALSE. */ #if !defined(BMP085_BARO_USE_ADVANCED) || defined(__DOXYGEN__) -#define BMP085_BARO_USE_AVANCED FALSE +#define BMP085_BARO_USE_ADVANCED FALSE #endif /** @@ -160,7 +148,7 @@ * @note The default is @p FALSE. */ #if !defined(BMP085_THERMO_USE_ADVANCED) || defined(__DOXYGEN__) -#define BMP085_THERMO_USE_AVANCED FALSE +#define BMP085_THERMO_USE_DAVANCED FALSE #endif /** |