From 9bc7aac84481cb6811e5dee0f76b827500136cb6 Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Sat, 23 Sep 2017 10:42:07 +0000 Subject: Aligned documentation of BMP085 git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10686 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ex/Bosch/bmp085.c | 30 ++++++++++++++---------------- os/ex/Bosch/bmp085.h | 28 ++++++++-------------------- os/ex/dox/main.dox | 19 +++++++++++++++++-- 3 files changed, 39 insertions(+), 38 deletions(-) (limited to 'os/ex') 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 /** diff --git a/os/ex/dox/main.dox b/os/ex/dox/main.dox index dbb73d7b4..45b6b96cf 100644 --- a/os/ex/dox/main.dox +++ b/os/ex/dox/main.dox @@ -27,9 +27,17 @@ * @section ex_complex_drivers_architecture EX Complex Drivers Architecture * Each EX driver can be considered as a standalone Complex Device Driver. For * ease of use these drivers are grouped by vendor: - * - Micron Technology Peripherals - * - STMicroelectronics Peripherals + * - Bosch Devices + * - Micron Technology Devices + * - STMicroelectronics Devices * . + * + * @section bosch_devices Bosch Devices + * This section contains all the drivers of devices produced by Bosch. + * Devices currently supported are MEMS and are: + * - @b BMP085: Digital pressure sensor; + * . + * * @section micron_devices Micron Technology Devices * This section contains all the drivers of devices produced by * Micron Technology. Devices currently supported are FLASH and are: @@ -50,6 +58,13 @@ * . */ + /** + * @defgroup EX_BOSCH Bosch Devices + * @brief Bosch Devices. + * + * @ingroup EX + */ + /** * @defgroup EX_MICRON Micron Technology Devices * @brief Micron Technology Devices. -- cgit v1.2.3