-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathtmp117_params.h
More file actions
84 lines (71 loc) · 1.74 KB
/
Copy pathtmp117_params.h
File metadata and controls
84 lines (71 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* 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>
*/
#include "board.h"
#include "tmp117.h"
#include "saul_reg.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Default configuration parameters for TMP117 sensors
* @{
*/
#ifndef TMP117_PARAM_I2C
# define TMP117_PARAM_I2C (I2C_DEV(0))
#endif
#ifndef TMP117_PARAM_ADDR
# 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
/** @} */
#ifndef TMP117_SAUL_INFO
/**
* @brief The SAUL info to register the TMP117 device driver instances with
*/
#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