style fixes
This commit is contained in:
parent
6c333d7cbf
commit
53387b53c6
@ -163,7 +163,8 @@ struct bmp280_dev_s
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static uint8_t bmp280_getreg8(FAR struct bmp280_dev_s *priv, uint8_t regaddr);
|
static uint8_t bmp280_getreg8(FAR struct bmp280_dev_s *priv,
|
||||||
|
uint8_t regaddr);
|
||||||
static void bmp280_putreg8(FAR struct bmp280_dev_s *priv, uint8_t regaddr,
|
static void bmp280_putreg8(FAR struct bmp280_dev_s *priv, uint8_t regaddr,
|
||||||
uint8_t regval);
|
uint8_t regval);
|
||||||
static uint32_t bmp280_getpressure(FAR struct bmp280_dev_s *priv);
|
static uint32_t bmp280_getpressure(FAR struct bmp280_dev_s *priv);
|
||||||
@ -568,9 +569,9 @@ static uint32_t bmp280_gettemp(FAR struct bmp280_dev_s *priv)
|
|||||||
sninfo("temp = %d\n", temp);
|
sninfo("temp = %d\n", temp);
|
||||||
|
|
||||||
if (priv->compensated == ENABLE_COMPENSATED)
|
if (priv->compensated == ENABLE_COMPENSATED)
|
||||||
{
|
{
|
||||||
temp = bmp280_compensate_temp(priv, temp);
|
temp = bmp280_compensate_temp(priv, temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
@ -669,7 +670,7 @@ static int bmp280_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SNIOC_GET_TEMP:
|
case SNIOC_GET_TEMP:
|
||||||
*(uint32_t*)arg = bmp280_gettemp(priv);
|
*(uint32_t *)arg = bmp280_gettemp(priv);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
snerr("Unrecognized cmd: %d\n", cmd);
|
snerr("Unrecognized cmd: %d\n", cmd);
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
#ifndef __INCLUDE_NUTTX_SENSORS_BMP280_H
|
#ifndef __INCLUDE_NUTTX_SENSORS_BMP280_H
|
||||||
#define __INCLUDE_NUTTX_SENSORS_BMP280_H
|
#define __INCLUDE_NUTTX_SENSORS_BMP280_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#if defined(CONFIG_I2C) && (defined(CONFIG_SENSORS_BMP280) || defined(CONFIG_SENSORS_BMP280_SCU))
|
#if defined(CONFIG_I2C) && (defined(CONFIG_SENSORS_BMP280) || defined(CONFIG_SENSORS_BMP280_SCU))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user