From 72ae79023d20f43624578e8bf2b30f8f29700486 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 15 Sep 2016 15:46:26 +0200 Subject: [PATCH] Update comments and add include guards --- include/extdrv/bme280_humidity_sensor.h | 4 ++++ include/extdrv/tsl256x_light_sensor.h | 7 ++++++- include/extdrv/veml6070_uv_sensor.h | 23 +++++++---------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/extdrv/bme280_humidity_sensor.h b/include/extdrv/bme280_humidity_sensor.h index b8a5208..7f2b13a 100644 --- a/include/extdrv/bme280_humidity_sensor.h +++ b/include/extdrv/bme280_humidity_sensor.h @@ -21,6 +21,8 @@ * *************************************************************************** */ +#ifndef EXTDRV_BME280_H +#define EXTDRV_BME280_H #include "lib/stdint.h" #include "core/system.h" @@ -219,4 +221,6 @@ uint32_t bme280_compensate_pressure(struct bme280_sensor_config* conf, int uncom uint32_t bme280_compensate_humidity(struct bme280_sensor_config* conf, int uncomp_humidity); +#endif /* EXTDRV_BME280_H */ + diff --git a/include/extdrv/tsl256x_light_sensor.h b/include/extdrv/tsl256x_light_sensor.h index afd96b8..0b45966 100644 --- a/include/extdrv/tsl256x_light_sensor.h +++ b/include/extdrv/tsl256x_light_sensor.h @@ -22,8 +22,10 @@ *************************************************************************** */ +#ifndef EXTDRV_TSL256X_H +#define EXTDRV_TSL256X_H + #include "lib/stdint.h" -#include "core/system.h" /* TSL256x sensor instance data. @@ -271,3 +273,6 @@ uint32_t calculate_lux(struct tsl256x_sensor_config* conf, uint16_t ch0, uint16_ #define M8C 0x0000 /* 0.000 * 2^LUX_SCALE*/ +#endif /* EXTDRV_TSL256X_H */ + + diff --git a/include/extdrv/veml6070_uv_sensor.h b/include/extdrv/veml6070_uv_sensor.h index 585fa89..7e6e5f6 100644 --- a/include/extdrv/veml6070_uv_sensor.h +++ b/include/extdrv/veml6070_uv_sensor.h @@ -21,6 +21,8 @@ * *************************************************************************** */ +#ifndef EXTDRV_VEML6070_H +#define EXTDRV_VEML6070_H #include "lib/stdint.h" @@ -50,7 +52,7 @@ struct veml6070_sensor_config { #define VEML6070_ENABLE (0) -/* Check the sensor presence, return 1 if foundZ */ +/* Check the sensor presence, return 1 if found */ int veml6070_probe_sensor(struct veml6070_sensor_config* conf); @@ -58,15 +60,8 @@ int veml6070_probe_sensor(struct veml6070_sensor_config* conf); * Performs a read of the uv data from the sensor. * 'uv_raw': integer addresses for conversion result. * Return value(s): - * Upon successfull completion, returns 0 and the luminosity read is placed in the - * provided integer(s). On error, returns a negative integer equivalent to errors from - * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine + * Upon successfull completion, returns 0 and the value read is placed in the provided integer. + * On error, returns a negative integer equivalent to errors from glibc. */ int veml6070_sensor_read(struct veml6070_sensor_config* conf, uint16_t* uv_raw); @@ -76,13 +71,9 @@ int veml6070_sensor_read(struct veml6070_sensor_config* conf, uint16_t* uv_raw); * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int veml6070_configure(struct veml6070_sensor_config* conf); +#endif /* EXTDRV_VEML6070_H */ + -- 2.43.0