Loading...
Searching...
No Matches
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
9#pragma once
10
20
21#include "board.h"
22#include "periph/uart.h"
23#include "saul_reg.h"
24#include "sds011.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef SDS011_PARAM_UART_DEV
35#define SDS011_PARAM_UART_DEV (UART_DEV(1))
36#endif
37#ifndef SDS011_PARAM_PWR_PIN
38#define SDS011_PARAM_PWR_PIN (GPIO_PIN(0, 0))
39#endif
40#ifndef SDS011_PARAM_PWR_PIN_AH
41#define SDS011_PARAM_PWR_PIN_AH (true)
42#endif
43
44#ifndef SDS011_PARAMS
45#define SDS011_PARAMS { .uart = SDS011_PARAM_UART_DEV, \
46 .pwr_pin = SDS011_PARAM_PWR_PIN, \
47 .pwr_ah = SDS011_PARAM_PWR_PIN_AH, \
48 .dev_id = SDS011_DEVID_WILDCARD }
49#endif
50
51#ifndef SDS011_SAUL_INFO
52#define SDS011_SAUL_INFO { .name = "SDS011" }
53#endif
55
60{
61 SDS011_PARAMS
62};
63
68{
69 SDS011_SAUL_INFO
70};
71
72#ifdef __cplusplus
73}
74#endif
75
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:68
Low-level UART peripheral driver interface definition.