Loading...
Searching...
No Matches
apds99xx_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Gunar Schorcht
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
15
16#include "board.h"
17#include "apds99xx.h"
18#include "saul_reg.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
28#ifndef APDS99XX_PARAM_DEV
30#define APDS99XX_PARAM_DEV I2C_DEV(0)
31#endif
32
33#ifndef APDS99XX_PARAM_ALS_STEPS
35#define APDS99XX_PARAM_ALS_STEPS (64)
36#endif
37#ifndef APDS99XX_PARAM_ALS_GAIN
39#define APDS99XX_PARAM_ALS_GAIN (APDS99XX_ALS_GAIN_1)
40#endif
41
42#ifndef APDS99XX_PARAM_PRX_PULSES
44#define APDS99XX_PARAM_PRX_PULSES (8)
45#endif
46#ifndef APDS99XX_PARAM_PRX_DRIVE
48#define APDS99XX_PARAM_PRX_DRIVE (APDS99XX_PRX_DRIVE_100)
49#endif
50#ifndef APDS99XX_PARAM_PRX_GAIN
52#define APDS99XX_PARAM_PRX_GAIN (APDS99XX_PRX_GAIN_1)
53#endif
54#ifndef APDS99XX_PARAM_WAIT_STEPS
56#define APDS99XX_PARAM_WAIT_STEPS (0)
57#endif
58#ifndef APDS99XX_PARAM_WAIT_LONG
60#define APDS99XX_PARAM_WAIT_LONG (false)
61#endif
62
63#ifndef APDS99XX_PARAM_INT_PIN
65#define APDS99XX_PARAM_INT_PIN (GPIO_PIN(0, 0))
66#endif
67
68#ifndef APDS99XX_PARAMS
69#define APDS99XX_PARAMS { \
70 .dev = APDS99XX_PARAM_DEV, \
71 .als_steps = APDS99XX_PARAM_ALS_STEPS, \
72 .als_gain = APDS99XX_PARAM_ALS_GAIN, \
73 .prx_pulses = APDS99XX_PARAM_PRX_PULSES, \
74 .prx_gain = APDS99XX_PARAM_PRX_GAIN, \
75 .prx_drive = APDS99XX_PARAM_PRX_DRIVE, \
76 .wait_steps = APDS99XX_PARAM_WAIT_STEPS, \
77 .wait_long = APDS99XX_PARAM_WAIT_LONG, \
78 .int_pin = APDS99XX_PARAM_INT_PIN, \
79 }
80#endif
81
82#ifndef APDS99XX_SAUL_INFO
83#define APDS99XX_SAUL_INFO { .name = "apds99xx" }
84#endif
86
91{
92 APDS99XX_PARAMS
93};
94
99{
100 APDS99XX_SAUL_INFO
101};
102
103#ifdef __cplusplus
104}
105#endif
106
static const apds99xx_params_t apds99xx_params[]
Allocate some memory to store the actual configuration.
static const saul_reg_info_t apds99xx_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
APDS99XX device initialization parameters.
Definition apds99xx.h:325
Additional data to collect for each entry.
Definition saul_reg.h:48