jc42_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Koen Zandberg <koen@bergzand.net>
3  * 2017 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef JC42_PARAMS_H
22 #define JC42_PARAMS_H
23 
24 #include "board.h"
25 #include "jc42.h"
26 #include "periph/i2c.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #ifndef JC42_PARAM_I2C_DEV
37 #define JC42_PARAM_I2C_DEV I2C_DEV(0)
38 #endif
39 #ifndef JC42_PARAM_ADDR
40 #define JC42_PARAM_ADDR (0x18)
41 #endif
42 #ifndef JC42_PARAM_SPEED
43 #define JC42_PARAM_SPEED I2C_SPEED_FAST
44 #endif
45 
46 #ifndef JC42_PARAMS
47 #define JC42_PARAMS { .i2c = JC42_PARAM_I2C_DEV, \
48  .speed = JC42_PARAM_SPEED, \
49  .addr = JC42_PARAM_ADDR }
50 #endif
51 #ifndef JC42_SAUL_INFO
52 #define JC42_SAUL_INFO { .name= "jc42" }
53 #endif
54 
59 static const jc42_params_t jc42_params[] =
60 {
61  JC42_PARAMS
62 };
63 
68 {
69  JC42_SAUL_INFO
70 };
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif /* JC42_PARAMS_H */
77 
jc42.h
Driver for jc42 compliant temperature sensors.
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
jc42_saul_info
static const saul_reg_info_t jc42_saul_info[]
Configure SAUL registry entries.
Definition: jc42_params.h:67
jc42_params
static const jc42_params_t jc42_params[]
Configure JC42.
Definition: jc42_params.h:59
jc42_params_t
Device initialization parameters.
Definition: jc42.h:65
i2c.h
Low-level I2C peripheral driver interface definition.