scd30_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Puhang Ding
3  * 2020 Nishchay Agrawal
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 "periph/i2c.h"
24 #include "scd30.h"
25 
26 #include "saul_reg.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define SCD30_I2C_ADDR 0x61
43 #ifndef SCD30_PARAM_I2C_DEV
44 #define SCD30_PARAM_I2C_DEV I2C_DEV(0)
45 #endif
46 #ifndef SCD30_PARAM_I2C_ADDR
47 #define SCD30_PARAM_I2C_ADDR SCD30_I2C_ADDR
48 #endif
49 
50 #ifndef SCD30_PARAMS
51 #define SCD30_PARAMS { .i2c_dev = SCD30_PARAM_I2C_DEV, \
52  .i2c_addr = SCD30_PARAM_I2C_ADDR }
53 #endif
54 
55 #ifndef SCD30_SAUL_INFO
56 #define SCD30_SAUL_INFO { .name = "scd30" }
57 #endif
63 static const scd30_params_t scd30_params[] =
64 {
65  SCD30_PARAMS
66 };
67 
71 #define SCD30_NUMOF ARRAY_SIZE(scd30_params)
72 
77 {
78  SCD30_SAUL_INFO
79 };
80 
81 #ifdef __cplusplus
82 }
83 #endif
Low-level I2C peripheral driver interface definition.
SAUL registry interface definition.
Device driver interface for the SCD30 sensor.
static const saul_reg_info_t scd30_saul_info[]
Configure SAUL registry entries.
Definition: scd30_params.h:76
static const scd30_params_t scd30_params[]
Configure SCD30.
Definition: scd30_params.h:63
Additional data to collect for each entry.
Definition: saul_reg.h:48
Device initialization parameters.
Definition: scd30.h:78