2019-08-16 14:18:12 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 - 2019 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_tmp00x
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
* @file
|
|
|
|
* @brief Default configuration for TMP00X (TMP006 and TMP007) devices
|
|
|
|
*
|
|
|
|
* @author Sebastian Meiling <s@mlng.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TMP00X_PARAMS_H
|
|
|
|
#define TMP00X_PARAMS_H
|
|
|
|
|
|
|
|
#include "board.h"
|
|
|
|
#include "tmp00x.h"
|
|
|
|
#include "saul_reg.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Set default configuration parameters for the TMP00X driver
|
2023-01-04 21:04:51 +01:00
|
|
|
* @ingroup config
|
2019-08-16 14:18:12 +02:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef TMP00X_PARAM_I2C
|
2023-01-04 21:04:51 +01:00
|
|
|
/**
|
|
|
|
* @brief The I2C bus the TMP00X device is connected to
|
|
|
|
*/
|
2019-08-16 14:18:12 +02:00
|
|
|
#define TMP00X_PARAM_I2C I2C_DEV(0)
|
|
|
|
#endif
|
2023-01-04 21:04:51 +01:00
|
|
|
|
2019-08-16 14:18:12 +02:00
|
|
|
#ifndef TMP00X_PARAM_ADDR
|
2023-01-04 21:04:51 +01:00
|
|
|
/**
|
|
|
|
* @brief The I2C address of the TMP00X device
|
|
|
|
*/
|
2020-04-29 18:41:13 +02:00
|
|
|
#define TMP00X_PARAM_ADDR (CONFIG_TMP00X_I2C_ADDRESS)
|
2019-08-16 14:18:12 +02:00
|
|
|
#endif
|
2023-01-04 21:04:51 +01:00
|
|
|
|
2019-08-16 14:18:12 +02:00
|
|
|
#ifndef TMP00X_PARAM_RATE
|
2023-01-04 21:04:51 +01:00
|
|
|
/**
|
|
|
|
* @brief The conversion rate to configure the TMP00X device with
|
|
|
|
*/
|
2019-08-16 14:18:12 +02:00
|
|
|
#define TMP00X_PARAM_RATE TMP00X_CONFIG_CR_DEF
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TMP00X_PARAMS
|
2023-01-04 21:04:51 +01:00
|
|
|
/**
|
|
|
|
* @brief The parameters to initialize the TMP00X device driver with
|
|
|
|
*/
|
2019-08-16 14:18:12 +02:00
|
|
|
#define TMP00X_PARAMS { .i2c = TMP00X_PARAM_I2C, \
|
|
|
|
.addr = TMP00X_PARAM_ADDR, \
|
|
|
|
.rate = TMP00X_PARAM_RATE }
|
|
|
|
#endif
|
2023-01-04 21:04:51 +01:00
|
|
|
|
2019-08-16 14:18:12 +02:00
|
|
|
#ifndef TMP00X_SAUL_INFO
|
2023-01-04 21:04:51 +01:00
|
|
|
/**
|
|
|
|
* @brief The SAUL info to register the TMP00x device driver instances with
|
|
|
|
*/
|
2019-08-16 14:18:12 +02:00
|
|
|
#define TMP00X_SAUL_INFO { .name = "tmp00x" }
|
|
|
|
#endif
|
|
|
|
/**@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief TMP00X configuration
|
|
|
|
*/
|
|
|
|
static const tmp00x_params_t tmp00x_params[] =
|
|
|
|
{
|
|
|
|
TMP00X_PARAMS
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Additional meta information to keep in the SAUL registry
|
|
|
|
*/
|
|
|
|
static const saul_reg_info_t tmp00x_saul_info[] =
|
|
|
|
{
|
|
|
|
TMP00X_SAUL_INFO
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* TMP00X_PARAMS_H */
|
|
|
|
/** @} */
|