Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
31210b7
drivers/tmp117: TMP117 driver
leocordier May 19, 2026
33e7f11
Update drivers/include/tmp117.h
leocordier May 19, 2026
7f93db1
Update drivers/include/tmp117.h
leocordier May 19, 2026
53375b9
Update drivers/include/tmp117.h
leocordier May 19, 2026
41c205f
Update drivers/include/tmp117.h
leocordier May 19, 2026
0ad27c0
Update drivers/include/tmp117.h
leocordier May 19, 2026
b970951
Update drivers/include/tmp117.h
leocordier May 19, 2026
9b92f13
Update drivers/tmp117/tmp117.c
leocordier May 19, 2026
d8d4b5d
Update drivers/tmp117/tmp117.c
leocordier May 19, 2026
1a9a218
Update tests/drivers/tmp117/README.md
leocordier May 19, 2026
2c62eda
Update tests/drivers/tmp117/README.md
leocordier May 19, 2026
c1cd55e
Apply suggestion from @crasbe
leocordier May 19, 2026
0c89813
Apply suggestion from @crasbe
leocordier May 19, 2026
d74c5c6
Apply suggestion from @crasbe
leocordier May 19, 2026
3c372c9
Apply suggestion from @crasbe
leocordier May 19, 2026
92d730e
review of crasbe sugestions
leocordier May 19, 2026
ea621ff
uncrustify source file
leocordier May 19, 2026
952ca3c
drivers/tmp117/tmp117.c: change helper functions to static according …
leocordier May 20, 2026
2d7e7ed
uncrustify files and changing error values to errno according to basi…
leocordier May 20, 2026
e0ba063
adding saul support for tmp117 driver
leocordier May 21, 2026
9a52738
correct murdock errors
leocordier May 21, 2026
a03157b
drivers/saul/init_devs/auto_init_tmp117.c: change ARRAY_SIZE declarat…
leocordier May 25, 2026
928b221
proccessing basilfx review
leocordier May 26, 2026
59a3b64
remove tests/drivers/tmp117/Makefile.uncrustify
leocordier May 26, 2026
a98131f
drivers/tmp117/tmp117.c: change temperature conversion according to k…
leocordier May 26, 2026
b5212b6
change according to kfessel review
leocordier May 27, 2026
4703875
drivers/tmp117: add comments and removing whitespaces
leocordier Jun 22, 2026
9a69aac
correct review comments
leocordier Jun 25, 2026
54e8194
drivers/include/tmp117.h: remove tab line 9
leocordier Jun 29, 2026
24b10f1
drivers/tmp117/include/tmp117_params.h: remove defgroup
leocordier Jun 29, 2026
92ae0c0
drivers/tmp117/include/tmp117_regs.h: remove defgroup
leocordier Jun 29, 2026
177d1d3
tests/drivers/tmp117/main.c: remove tab line 9
leocordier Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions drivers/include/tmp117.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
/*
* SPDX-FileCopyrightText: 2026 UGA
* SPDX-License-Identifier: LGPL-2.1-only
*/

#pragma once

/**
* @defgroup driver_tmp117

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @defgroup driver_tmp117
* @defgroup drivers_tmp117

Other sensors use drivers_XXX. This needs to be adapted in multiple files.

* @ingroup drivers_sensors
* @brief Device driver for TMP117 temperature sensor
*
* @{
* @file
* @author Léo Cordier <leo.cordier@univ-grenoble-alpes.fr>
*/

#include "periph/i2c.h"
#include <errno.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Named return values
*/
enum {
TMP117_OK = 0, /**< everything was fine */
TMP117_DATAREADY = 1, /**< data is ready to be read */
TMP117_NOI2C = -EIO, /**< I2C communication failed */
TMP117_NODEV = -ENODEV, /**< no TMP117 device found on the bus */
TMP117_NODATA = -ENODATA /**< no data available */
};
Comment thread
leocordier marked this conversation as resolved.

typedef enum {
TMP117_CONV_CC = 0, /**< continous conversion mode */
TMP117_CONV_SD = 1, /**< shutdown conversion mode */
TMP117_CONV_OS = 3 /**< one shot conversion mode */
} tmp117_conv_mode_t;

typedef enum {
TMP117_CONV_CYCLE_15_MS = 0, /**< 15.5ms conversion cycle */
TMP117_CONV_CYCLE_125_MS = 1, /**< 125ms conversion cycle */
TMP117_CONV_CYCLE_250_MS = 2, /**< 250ms conversion cycle */
TMP117_CONV_CYCLE_500_MS = 3, /**< 500ms conversion cycle */
TMP117_CONV_CYCLE_1_S = 4, /**< 1s conversion cycle */
TMP117_CONV_CYCLE_4_S = 5, /**< 4s conversion cycle */
TMP117_CONV_CYCLE_8_S = 6, /**< 8s conversion cycle */
TMP117_CONV_CYCLE_16_S = 7, /**< 16s conversion cycle */
} tmp117_conv_cycle_t;

typedef enum {
TMP117_NO_AVG = 0, /**< no averaging */
TMP117_AVG_8 = 1, /**< 8 Averaged conversions */
TMP117_AVG_32 = 2, /**< 32 Averaged conversions */
TMP117_AVG_64 = 3, /**< 64 Averaged conversions */
} tmp117_avg_t;

typedef struct {
i2c_t i2c;
uint8_t addr;
tmp117_conv_mode_t conv_mode; /**< conversion mode */
tmp117_conv_cycle_t conv_cycle; /**< conversion cycle time */
tmp117_avg_t avg; /**< data averaging*/
}tmp117_params_t;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}tmp117_params_t;
} tmp117_params_t;


typedef struct {
tmp117_params_t params;
bool is_initialized;
} tmp117_t;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many blank lines.

Static checks will highlight a few more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still more blank than needed

Suggested change


/**
* @brief Initializes a TMP117 device
*
* @param[in,out] dev device descriptor
* @param[in] params device configuration
*
* @retval TMP117_OK on success
* @retval TMP117_NODEV if no device is found on the bus
* @retval TMP117_NOI2C if other error occurs
*/
int tmp117_init(tmp117_t *dev, const tmp117_params_t *params);

/**
* @brief Reads the temperature from the sensor.
*
* @param[in, out] dev device descriptor
* @param[out] value read value in centi-celsius
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param[in, out] dev device descriptor
* @param[out] value read value in centi-celsius
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs
* @param[in,out] dev device descriptor
* @param[out] value read value in centi-celsius
*
* @retval TMP117_OK on success
* @retval TMP117_I2C if other error occurs

*/
int tmp117_read_temperature(tmp117_t *dev, int16_t *value);

/**
* @brief Update the conversion mode of the sensor.
*
* @param[in, out] dev device descriptor
* @param[in] mode conversion mode value
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param[in, out] dev device descriptor
* @param[in] mode conversion mode value
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs
* @param[in,out] dev device descriptor
* @param[in] mode conversion mode value
*
* @retval TMP117_OK on success
* @retval TMP117_I2C if other error occurs

*/
int tmp117_set_conversion_mode(tmp117_t *dev, tmp117_conv_mode_t mode);

/**
* @brief Update the conversion cycle of the sensor.
*
* @param[in, out] dev device descriptor
* @param[in] cycle conversion cycle value
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param[in, out] dev device descriptor
* @param[in] cycle conversion cycle value
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs
* @param[in,out] dev device descriptor
* @param[in] cycle conversion cycle value
*
* @retval TMP117_OK on success
* @retval TMP117_I2C if other error occurs

*/
int tmp117_set_conversion_cycle(tmp117_t *dev, tmp117_conv_cycle_t cycle);

/**
* @brief Update the averaging value of the sensor.
*
* @param[in, out] dev device descriptor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param[in, out] dev device descriptor
* @param[in,out] dev device descriptor

* @param[in] avg averaging value
*
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return TMP117_OK on success
* @return TMP117_I2C if other error occurs
* @retval TMP117_OK on success
* @retval TMP117_I2C if other error occurs

*/
int tmp117_set_averaging(tmp117_t *dev, tmp117_avg_t avg);

/**
* @brief Check if the sensor have a new temperature measure available.
*
* @param[in, out] dev device descriptor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param[in, out] dev device descriptor
* @param[in,out] dev device descriptor

*
* @return TMP117_DATAREADY a new data is available
* @return TMP117_OK no new data available
* @return TMP117_I2C if other error occurs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return TMP117_DATAREADY a new data is available
* @return TMP117_OK no new data available
* @return TMP117_I2C if other error occurs
* @retval TMP117_DATAREADY a new data is available
* @retval TMP117_OK no new data available
* @retval TMP117_I2C if other error occurs

*/
int tmp117_is_data_ready(tmp117_t *dev);

#ifdef __cplusplus
}
#endif

/** @} */
66 changes: 66 additions & 0 deletions drivers/saul/init_devs/auto_init_tmp117.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* SPDX-FileCopyrightText: 2026 LIG-Geopred
* SPDX-License-Identifier: LGPL-2.1-only
*/

/**
* @ingroup sys_auto_init_saul
* @{
*
* @file
* @brief Auto initialization of TMP117 temperature sensor
*
* @author léo cordier <leo.cordier@univ-grenoble-alpes.fr>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @author léo cordier <leo.cordier@univ-grenoble-alpes.fr>
* @author Léo Cordier <leo.cordier@univ-grenoble-alpes.fr>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leocordier: please explain short if / why you want your name lower case?

*
* @}
*/
#include "assert.h"
#include "log.h"
#include "saul_reg.h"

#include "tmp117.h"
#include "tmp117_params.h"

/**
* @brief Define the number of configured sensors
*/
#define TMP117_NUM (unsigned)(sizeof((tmp117_params)) / sizeof((tmp117_params)[0]))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ARRAY_SIZE

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when i use ARRAY_SIZE the murdoc test fail on github

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you include container.h

I assume it is this run
https://ci.riot-os.org/details/786c4cfa69eb4a8089a198ac2141682f


/**
* @brief Allocate memory for the device descriptors
*/
static tmp117_t tmp117_devs[TMP117_NUM];

/**
* @brief Memory for the SAUL registry entries
*/
static saul_reg_t saul_entries[TMP117_NUM];

/**
* @brief Define the number of saul info

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Define the number of saul info
* @brief Define the number of SAUL info

*/
#define TMP117_INFO_NUM (unsigned)(sizeof((tmp117_saul_info)) / sizeof((tmp117_saul_info)[0]))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ARRAY_SIZE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above


/**
* @brief Reference the driver struct
*/
extern const saul_driver_t tmp117_saul_driver;


void auto_init_tmp117(void)
{
assert(TMP117_NUM == TMP117_INFO_NUM);

for (unsigned i = 0; i < TMP117_NUM; i++) {
LOG_DEBUG("[auto_init_saul] initializing tmp117 #%u\n", i);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_DEBUG("[auto_init_saul] initializing tmp117 #%u\n", i);
LOG_DEBUG("[auto_init_saul] initializing TMP117 #%u\n", i);


if (tmp117_init(&tmp117_devs[i], &tmp117_params[i]) != TMP117_OK) {
LOG_ERROR("[auto_init_saul] error initializing tmp117 #%u\n", i);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_ERROR("[auto_init_saul] error initializing tmp117 #%u\n", i);
LOG_ERROR("[auto_init_saul] error initializing TMP117 #%u\n", i);

continue;
}
saul_entries[i].dev = &(tmp117_devs[i]);
saul_entries[i].name = tmp117_saul_info[i].name;
saul_entries[i].driver = &tmp117_saul_driver;
saul_reg_add(&(saul_entries[i]));
}
}
4 changes: 4 additions & 0 deletions drivers/saul/init_devs/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ void saul_init_devs(void)
extern void auto_init_tmp00x(void);
auto_init_tmp00x();
}
if (IS_USED(MODULE_TMP117)) {
extern void auto_init_tmp117(void);
auto_init_tmp117();
}
if (IS_USED(MODULE_TSL2561)) {
extern void auto_init_tsl2561(void);
auto_init_tsl2561();
Expand Down
1 change: 1 addition & 0 deletions drivers/tmp117/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(RIOTMAKE)/driver_with_saul.mk
1 change: 1 addition & 0 deletions drivers/tmp117/Makefile.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FEATURES_REQUIRED += periph_i2c

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline

2 changes: 2 additions & 0 deletions drivers/tmp117/Makefile.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
USEMODULE_INCLUDES_tmp117 := $(LAST_MAKEFILEDIR)/include
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_tmp117)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline

84 changes: 84 additions & 0 deletions drivers/tmp117/include/tmp117_params.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* SPDX-FileCopyrightText: 2026 UGA
* SPDX-License-Identifier: LGPL-2.1-only
*/

#pragma once

Comment thread
leocordier marked this conversation as resolved.
/**
* @defgroup driver_tmp117
* @ingroup drivers_sensors
* @brief Device driver parameters for TMP117 temperature sensor
*
* @{
* @file
* @author Léo Cordier <leo.cordier@univ-grenoble-alpes.fr>
*/



#include "board.h"
#include "tmp117.h"
#include "saul_reg.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
Comment on lines +24 to +26

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif
/**
#endif
/**

Double blank lines should be avoided in C code, usually the static test complains about this too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this should be applied to all files.

* @brief Default configuration parameters for TMP117 sensors
* @{
*/
#ifndef TMP117_PARAM_I2C
# define TMP117_PARAM_I2C (I2C_DEV(0))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align with the other values

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# define TMP117_PARAM_I2C (I2C_DEV(0))
# define TMP117_PARAM_I2C (I2C_DEV(0))

#endif
#ifndef TMP117_PARAM_ADDR
# define TMP117_PARAM_ADDR (0x48)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# define TMP117_PARAM_ADDR (0x48)
# define TMP117_PARAM_ADDR (0x48)

#endif
#ifndef TMP117_PARAM_CONV_MODE
# define TMP117_PARAM_CONV_MODE TMP117_CONV_CC
#endif
#ifndef TMP117_PARAM_CONV_CYCLE
# define TMP117_PARAM_CONV_CYCLE TMP117_CONV_CYCLE_1_S
#endif
#ifndef TMP117_PARAM_AVG
# define TMP117_PARAM_AVG TMP117_AVG_8
#endif


#ifndef TMP117_PARAMS
# define TMP117_PARAMS { .i2c = TMP117_PARAM_I2C, \
.addr = TMP117_PARAM_ADDR, \
.conv_mode = TMP117_PARAM_CONV_MODE, \
.conv_cycle = TMP117_PARAM_CONV_CYCLE, \
.avg = TMP117_PARAM_AVG }
#endif
Comment on lines +46 to +52

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#ifndef TMP117_PARAMS
# define TMP117_PARAMS { .i2c = TMP117_PARAM_I2C, \
.addr = TMP117_PARAM_ADDR, \
.conv_mode = TMP117_PARAM_CONV_MODE, \
.conv_cycle = TMP117_PARAM_CONV_CYCLE, \
.avg = TMP117_PARAM_AVG }
#endif
#ifndef TMP117_PARAMS
# define TMP117_PARAMS { .i2c = TMP117_PARAM_I2C, \
.addr = TMP117_PARAM_ADDR, \
.conv_mode = TMP117_PARAM_CONV_MODE, \
.conv_cycle = TMP117_PARAM_CONV_CYCLE, \
.avg = TMP117_PARAM_AVG }
#endif

/** @} */

#ifndef TMP117_SAUL_INFO
/**
* @brief The SAUL info to register the TMP117 device driver instances with
*/
#define TMP117_SAUL_INFO { .name = "tmp117" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define TMP117_SAUL_INFO { .name = "tmp117" }
# define TMP117_SAUL_INFO { .name = "TMP117" }

#endif
/**@}*/

/**
* @brief Allocation of TMP117 configuration
*/
static const tmp117_params_t tmp117_params[] =
{
TMP117_PARAMS
};

/**
* @brief Additional meta information to keep in the SAUL registry
*/
static const saul_reg_info_t tmp117_saul_info[] =
{
TMP117_SAUL_INFO
};

#ifdef __cplusplus
}
#endif
75 changes: 75 additions & 0 deletions drivers/tmp117/include/tmp117_regs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* SPDX-FileCopyrightText: 2026 UGA
* SPDX-License-Identifier: LGPL-2.1-only
*/

#pragma once

/**
* @defgroup driver_tmp117
* @ingroup drivers_sensors
* @brief Device driver parameters for TMP117 temperature sensor
*
* @{
* @file
* @author Léo Cordier <leo.cordier@univ-grenoble-alpes.fr>
*/
Comment thread
leocordier marked this conversation as resolved.


#ifdef __cplusplus
extern "C" {
#endif

/**
* @name TMP117 registers
* @{
*/
#define TMP117_REG_TEMP_RESULT (0x00) /**< temperature register address */
#define TMP117_REG_CONFIG (0x01) /**< configuration register address */
#define TMP117_REG_TEMP_HIGH_LIMIT (0x02) /**< high temperature limit register address */
#define TMP117_REG_TEMP_LOW_LIMIT (0x03) /**< low temperature limit register address */
#define TMP117_REG_EEPROM_UNLOCK (0x04) /**< EEPROM unlock register address */
#define TMP117_REG_EEPROM_1 (0x05) /**< EEPROM 1 register address */
#define TMP117_REG_EEPROM_2 (0x06) /**< EEPROM 2 register address */
#define TMP117_REG_TEMP_OFFSET (0x07) /**< temperature offset register address */
#define TMP117_REG_EEPROM_3 (0x08) /**< EEPROM 3 register address */
#define TMP117_REG_DEVICE_ID (0x0F) /**< device ID register address */
/** @} */


/**
* @name TMP117 shift mask
* @{
*/
#define TMP117_DATA_READY_SHIFT 13 /**< data ready bit shift in configuration register */
#define TMP117_CONV_MODE_SHIFT 10 /**< conversion mode bits shift in configuration register */
#define TMP117_CONV_CYCLE_SHIFT 7 /**< conversion cycle bits shift in configuration register */
#define TMP117_AVG_SHIFT 5 /**< averaging bits shift in configuration register */
/** @} */

/**
* @name TMP117 field mask
* @{
*/
#define TMP117_CONV_MODE_MASK (0x3 << TMP117_CONV_MODE_SHIFT) /**< conversion mode bits mask in configuration register */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define TMP117_CONV_MODE_MASK (0x3 << TMP117_CONV_MODE_SHIFT) /**< conversion mode bits mask in configuration register */
/** @brief conversion mode bits mask in configuration register */
#define TMP117_CONV_MODE_MASK (0x3 << TMP117_CONV_MODE_SHIFT)

Please adapt the following lines that are >100 characters long, accordingly.

#define TMP117_CONV_CYCLE_MASK (0x7 << TMP117_CONV_CYCLE_SHIFT) /**< conversion cycle bits mask in configuration register */
#define TMP117_AVG_MASK (0x3 << TMP117_AVG_SHIFT) /**< averaging bits mask in configuration register */
#define TMP117_DATA_READY_MASK (0x1 << TMP117_DATA_READY_SHIFT) /**< data ready bit mask in configuration register */

/** @} */


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespaces



/**
* @name TMP117 registers - default values
* @{
*/

#define TMP117_REG_DEVICE_ID_DEFAULT_VAL (0x0117) /**< default value of tmp117 device id register */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define TMP117_REG_DEVICE_ID_DEFAULT_VAL (0x0117) /**< default value of tmp117 device id register */
#define TMP117_REG_DEVICE_ID_DEFAULT_VAL (0x0117) /**< default value of TMP117 device id register */

/** @} */


#ifdef __cplusplus
}
#endif
Loading