sds011_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 HAW-Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef SDS011_PARAMS_H
20 #define SDS011_PARAMS_H
21 
22 #include "board.h"
23 #include "periph/uart.h"
24 #include "saul_reg.h"
25 #include "sds011.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #ifndef SDS011_PARAM_UART_DEV
36 #define SDS011_PARAM_UART_DEV (UART_DEV(1))
37 #endif
38 #ifndef SDS011_PARAM_PWR_PIN
39 #define SDS011_PARAM_PWR_PIN (GPIO_PIN(0, 0))
40 #endif
41 #ifndef SDS011_PARAM_PWR_PIN_AH
42 #define SDS011_PARAM_PWR_PIN_AH (true)
43 #endif
44 
45 #ifndef SDS011_PARAMS
46 #define SDS011_PARAMS { .uart = SDS011_PARAM_UART_DEV, \
47  .pwr_pin = SDS011_PARAM_PWR_PIN, \
48  .pwr_ah = SDS011_PARAM_PWR_PIN_AH, \
49  .dev_id = SDS011_DEVID_WILDCARD }
50 #endif
51 
52 #ifndef SDS011_SAUL_INFO
53 #define SDS011_SAUL_INFO { .name = "SDS011" }
54 #endif
55 
61 {
62  SDS011_PARAMS
63 };
64 
69 {
70  SDS011_SAUL_INFO
71 };
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* SDS011_PARAMS_H */
78 
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
sds011_params_t
Configuration parameters for SDS011 Laser Dust Sensor.
Definition: sds011.h:69
uart.h
Low-level UART peripheral driver interface definition.
sds011_params
static const sds011_params_t sds011_params[]
SDS011 configuration.
Definition: sds011_params.h:60
saul_reg.h
SAUL registry interface definition.
sds011_saul_info
saul_reg_info_t sds011_saul_info[]
Allocate and configure entries to the SAUL registry.
Definition: sds011_params.h:68
sds011.h
Interface for controlling SDS011 Laser Dust Sensor.