Loading...
Searching...
No Matches
sds011_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "periph/uart.h"
20#include "saul_reg.h"
21#include "sds011.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#ifndef SDS011_PARAM_UART_DEV
32#define SDS011_PARAM_UART_DEV (UART_DEV(1))
33#endif
34#ifndef SDS011_PARAM_PWR_PIN
35#define SDS011_PARAM_PWR_PIN (GPIO_PIN(0, 0))
36#endif
37#ifndef SDS011_PARAM_PWR_PIN_AH
38#define SDS011_PARAM_PWR_PIN_AH (true)
39#endif
40
41#ifndef SDS011_PARAMS
42#define SDS011_PARAMS { .uart = SDS011_PARAM_UART_DEV, \
43 .pwr_pin = SDS011_PARAM_PWR_PIN, \
44 .pwr_ah = SDS011_PARAM_PWR_PIN_AH, \
45 .dev_id = SDS011_DEVID_WILDCARD }
46#endif
47
48#ifndef SDS011_SAUL_INFO
49#define SDS011_SAUL_INFO { .name = "SDS011" }
50#endif
52
57{
58 SDS011_PARAMS
59};
60
65{
66 SDS011_SAUL_INFO
67};
68
69#ifdef __cplusplus
70}
71#endif
72
SAUL registry interface definition.
Interface for controlling SDS011 Laser Dust Sensor.
static const sds011_params_t sds011_params[]
SDS011 configuration.
saul_reg_info_t sds011_saul_info[]
Allocate and configure entries to the SAUL registry.
Additional data to collect for each entry.
Definition saul_reg.h:48
Configuration parameters for SDS011 Laser Dust Sensor.
Definition sds011.h:65
Low-level UART peripheral driver interface definition.