Loading...
Searching...
No Matches
gp2y10xx_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Locha Inc
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "board.h"
20#include "saul_reg.h"
21#include "gp2y10xx.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
36#ifndef GP2Y10XX_PARAM_AOUT
37#define GP2Y10XX_PARAM_AOUT (ADC_LINE(0))
38#endif
39
43#ifndef GP2Y10XX_PARAM_ADC_RES
44#define GP2Y10XX_PARAM_ADC_RES (ADC_RES_10BIT)
45#endif
46
50#ifndef GP2Y10XX_PARAM_VREF
51#define GP2Y10XX_PARAM_VREF (3300)
52#endif
53
57#ifndef GP2Y10XX_PARAM_ILED_PIN
58#define GP2Y10XX_PARAM_ILED_PIN (GPIO_UNDEF)
59#endif
60
64#ifndef GP2Y10XX_PARAM_ILED_LEVEL
65#define GP2Y10XX_PARAM_ILED_LEVEL (GP2Y10XX_ILED_LEVEL_HIGH)
66#endif
67
71#ifndef GP2Y10XX_PARAMS
72#define GP2Y10XX_PARAMS { .aout = GP2Y10XX_PARAM_AOUT, \
73 .adc_res = GP2Y10XX_PARAM_ADC_RES, \
74 .vref = GP2Y10XX_PARAM_VREF, \
75 .iled_pin = GP2Y10XX_PARAM_ILED_PIN, \
76 .iled_level = GP2Y10XX_PARAM_ILED_LEVEL, \
77 }
78#endif
80
84#ifndef GP2Y10XX_SAUL_INFO
85#define GP2Y10XX_SAUL_INFO { .name = "gp2y1010" }
86#endif
87
95
103
104#ifdef __cplusplus
105}
106#endif
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:83
Additional data to collect for each entry.
Definition saul_reg.h:48