2016-01-15 17:44:02 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* 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_hdc1000
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
* @file
|
|
|
|
* @brief Default configuration for HDC1000 devices
|
|
|
|
*
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HDC1000_PARAMS_H
|
|
|
|
#define HDC1000_PARAMS_H
|
|
|
|
|
|
|
|
#include "board.h"
|
|
|
|
#include "hdc1000.h"
|
|
|
|
#include "saul_reg.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2017-08-29 18:00:46 +02:00
|
|
|
* @name Set default configuration parameters for the HDC1000 driver
|
2016-01-15 17:44:02 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef HDC1000_PARAM_I2C
|
2018-08-06 21:33:53 +02:00
|
|
|
#define HDC1000_PARAM_I2C I2C_DEV(0)
|
2016-01-15 17:44:02 +01:00
|
|
|
#endif
|
|
|
|
#ifndef HDC1000_PARAM_ADDR
|
2020-04-14 17:57:11 +02:00
|
|
|
#define HDC1000_PARAM_ADDR (CONFIG_HDC1000_I2C_ADDRESS)
|
2016-01-15 17:44:02 +01:00
|
|
|
#endif
|
|
|
|
#ifndef HDC1000_PARAM_RES
|
2018-08-06 21:33:53 +02:00
|
|
|
#define HDC1000_PARAM_RES HDC1000_14BIT
|
|
|
|
#endif
|
|
|
|
#ifndef HDC1000_PARAM_RENEW_INTERVAL
|
|
|
|
#define HDC1000_PARAM_RENEW_INTERVAL (1000000ul)
|
2016-01-15 17:44:02 +01:00
|
|
|
#endif
|
|
|
|
|
2018-02-28 16:46:07 +01:00
|
|
|
#ifndef HDC1000_PARAMS
|
2018-08-06 21:33:53 +02:00
|
|
|
#define HDC1000_PARAMS { .i2c = HDC1000_PARAM_I2C, \
|
|
|
|
.addr = HDC1000_PARAM_ADDR, \
|
|
|
|
.res = HDC1000_PARAM_RES, \
|
|
|
|
.renew_interval = HDC1000_PARAM_RENEW_INTERVAL }
|
2018-02-28 16:46:07 +01:00
|
|
|
#endif
|
|
|
|
#ifndef HDC1000_SAUL_INFO
|
2018-08-06 21:33:53 +02:00
|
|
|
#define HDC1000_SAUL_INFO { .name = "hdc1000" }
|
2018-02-28 16:46:07 +01:00
|
|
|
#endif
|
2016-01-15 17:44:02 +01:00
|
|
|
/**@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief HDC1000 configuration
|
|
|
|
*/
|
|
|
|
static const hdc1000_params_t hdc1000_params[] =
|
|
|
|
{
|
2018-02-28 16:46:07 +01:00
|
|
|
HDC1000_PARAMS
|
2016-01-15 17:44:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Additional meta information to keep in the SAUL registry
|
|
|
|
*/
|
|
|
|
static const saul_reg_info_t hdc1000_saul_info[] =
|
|
|
|
{
|
2018-02-28 16:46:07 +01:00
|
|
|
HDC1000_SAUL_INFO
|
2016-01-15 17:44:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* HDC1000_PARAMS_H */
|
|
|
|
/** @} */
|