Loading...
Searching...
No Matches
gp2y10xx_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Locha Inc
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
20#ifndef GP2Y10XX_PARAMS_H
21#define GP2Y10XX_PARAMS_H
22
23#include "board.h"
24#include "saul_reg.h"
25#include "gp2y10xx.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
40#ifndef GP2Y10XX_PARAM_AOUT
41#define GP2Y10XX_PARAM_AOUT (ADC_LINE(0))
42#endif
43
47#ifndef GP2Y10XX_PARAM_ADC_RES
48#define GP2Y10XX_PARAM_ADC_RES (ADC_RES_10BIT)
49#endif
50
54#ifndef GP2Y10XX_PARAM_VREF
55#define GP2Y10XX_PARAM_VREF (3300)
56#endif
57
61#ifndef GP2Y10XX_PARAM_ILED_PIN
62#define GP2Y10XX_PARAM_ILED_PIN (GPIO_UNDEF)
63#endif
64
68#ifndef GP2Y10XX_PARAM_ILED_LEVEL
69#define GP2Y10XX_PARAM_ILED_LEVEL (GP2Y10XX_ILED_LEVEL_HIGH)
70#endif
71
75#ifndef GP2Y10XX_PARAMS
76#define GP2Y10XX_PARAMS { .aout = GP2Y10XX_PARAM_AOUT, \
77 .adc_res = GP2Y10XX_PARAM_ADC_RES, \
78 .vref = GP2Y10XX_PARAM_VREF, \
79 .iled_pin = GP2Y10XX_PARAM_ILED_PIN, \
80 .iled_level = GP2Y10XX_PARAM_ILED_LEVEL, \
81 }
82#endif
88#ifndef GP2Y10XX_SAUL_INFO
89#define GP2Y10XX_SAUL_INFO { .name = "gp2y1010" }
90#endif
91
99
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif /* GP2Y10XX_PARAMS_H */
GP2Y10xx device driver.
static const gp2y10xx_params_t gp2y10xx_params[]
GP2Y1010 configuration.
static const saul_reg_info_t gp2y10xx_saul_info[]
Additional meta information to keep in the SAUL registry.
#define GP2Y10XX_SAUL_INFO
GP2Y10xx driver SAUL registry information structures.
#define GP2Y10XX_PARAMS
GP2Y10xx driver configuration parameters.
SAUL registry interface definition.
GP2Y10xx device parameters.
Definition gp2y10xx.h:84
Additional data to collect for each entry.
Definition saul_reg.h:49