1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/mpu9x50: Fix prameter placement for docs

When generating the doxygen output the temp sens and offset are in the config group.
Since they are internal parameters not to be accessed by users they are placed in the mpu9x650_internal.h file.
This commit is contained in:
MrKevinWeiss 2020-01-13 11:43:25 +01:00
parent 53cb3b087c
commit e19091541f
3 changed files with 84 additions and 53 deletions

View File

@ -43,59 +43,6 @@ extern "C" {
#define MPU9X50_MAX_COMP_SMPL_RATE (100)
/** @} */
/**
* @name Power Management 1 register macros
* @{
*/
#define MPU9X50_PWR_WAKEUP (0x00)
#define MPU9X50_PWR_PLL (0x01)
#define MPU9X50_PWR_RESET (0x80)
/** @} */
/**
* @name Power Management 2 register macros
* @{
*/
#define MPU9X50_PWR_GYRO (0x07)
#define MPU9X50_PWR_ACCEL (0x38)
/** @} */
/**
* @name Sleep times in microseconds
* @{
*/
#define MPU9X50_COMP_MODE_SLEEP_US (1000)
#define MPU9X50_BYPASS_SLEEP_US (3000)
#define MPU9X50_PWR_CHANGE_SLEEP_US (50000)
#define MPU9X50_RESET_SLEEP_US (100000)
/** @} */
/**
* @name MPU-9X50 compass operating modes and reg values
* @{
*/
#define MPU9X50_COMP_POWER_DOWN (0x00)
#define MPU9X50_COMP_SINGLE_MEASURE (0x01)
#define MPU9X50_COMP_SELF_TEST (0x08)
#define MPU9X50_COMP_FUSE_ROM (0x0F)
#define MPU9X50_COMP_WHOAMI_ANSWER (0x48) /**< MPU9X50 WHO_AM_I answer register */
/** @} */
/**
* @ingroup config
* @{
*/
#ifdef MODULE_MPU9150
#define MPU9X50_TEMP_SENSITIVITY 340
#define MPU9X50_TEMP_OFFSET 35
#elif defined(MODULE_MPU9250)
#define MPU9X50_TEMP_SENSITIVITY 333.87
#define MPU9X50_TEMP_OFFSET 21
#else
#error "MPU9X50 DRIVER not selected or supported"
#endif
/** @} */
/**
* @brief Power enum values
*/

View File

@ -0,0 +1,83 @@
/*
* Copyright (C) 2020 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup drivers_mpu9x50
*
* @{
* @file
* @brief Internal config for the MPU-9X50 (MPU9150 and MPU9250)
*
* @author Kevin Weiss <kevin.weiss@haw-hamburg.de>
*/
#ifndef MPU9X50_INTERNAL_H
#define MPU9X50_INTERNAL_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Power Management 1 register macros
* @{
*/
#define MPU9X50_PWR_WAKEUP (0x00)
#define MPU9X50_PWR_PLL (0x01)
#define MPU9X50_PWR_RESET (0x80)
/** @} */
/**
* @name Power Management 2 register macros
* @{
*/
#define MPU9X50_PWR_GYRO (0x07)
#define MPU9X50_PWR_ACCEL (0x38)
/** @} */
/**
* @name Sleep times in microseconds
* @{
*/
#define MPU9X50_COMP_MODE_SLEEP_US (1000)
#define MPU9X50_BYPASS_SLEEP_US (3000)
#define MPU9X50_PWR_CHANGE_SLEEP_US (50000)
#define MPU9X50_RESET_SLEEP_US (100000)
/** @} */
/**
* @name MPU-9X50 compass operating modes and reg values
* @{
*/
#define MPU9X50_COMP_POWER_DOWN (0x00)
#define MPU9X50_COMP_SINGLE_MEASURE (0x01)
#define MPU9X50_COMP_SELF_TEST (0x08)
#define MPU9X50_COMP_FUSE_ROM (0x0F)
#define MPU9X50_COMP_WHOAMI_ANSWER (0x48) /**< MPU9X50 WHO_AM_I answer register */
/** @} */
/**
* @name MPU-9X50 temperature calibration values
* @{
*/
#ifdef MODULE_MPU9150
#define MPU9X50_TEMP_SENSITIVITY 340
#define MPU9X50_TEMP_OFFSET 35
#elif defined(MODULE_MPU9250)
#define MPU9X50_TEMP_SENSITIVITY 333.87
#define MPU9X50_TEMP_OFFSET 21
#else
#error "MPU9X50 DRIVER not selected or supported"
#endif
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* MPU9X50_INTERNAL_H */
/** @} */

View File

@ -22,6 +22,7 @@
#include "mpu9x50.h"
#include "mpu9x50_regs.h"
#include "mpu9x50_internal.h"
#include "periph/i2c.h"
#include "xtimer.h"
#include "byteorder.h"