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 
10 #pragma once
11 
23 #include "board.h"
24 #include "jc42.h"
25 #include "periph/i2c.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #ifndef JC42_PARAM_I2C_DEV
36 #define JC42_PARAM_I2C_DEV I2C_DEV(0)
37 #endif
38 #ifndef JC42_PARAM_ADDR
39 #define JC42_PARAM_ADDR (0x18)
40 #endif
41 #ifndef JC42_PARAM_SPEED
42 #define JC42_PARAM_SPEED I2C_SPEED_FAST
43 #endif
44 
45 #ifndef JC42_PARAMS
46 #define JC42_PARAMS { .i2c = JC42_PARAM_I2C_DEV, \
47  .speed = JC42_PARAM_SPEED, \
48  .addr = JC42_PARAM_ADDR }
49 #endif
50 #ifndef JC42_SAUL_INFO
51 #define JC42_SAUL_INFO { .name= "jc42" }
52 #endif
58 static const jc42_params_t jc42_params[] =
59 {
60  JC42_PARAMS
61 };
62 
67 {
68  JC42_SAUL_INFO
69 };
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
Low-level I2C peripheral driver interface definition.
Driver for jc42 compliant temperature sensors.
static const saul_reg_info_t jc42_saul_info[]
Configure SAUL registry entries.
Definition: jc42_params.h:66
static const jc42_params_t jc42_params[]
Configure JC42.
Definition: jc42_params.h:58
Device initialization parameters.
Definition: jc42.h:62
Additional data to collect for each entry.
Definition: saul_reg.h:48