Loading...
Searching...
No Matches
apds99xx_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Gunar Schorcht
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
17#ifndef APDS99XX_PARAMS_H
18#define APDS99XX_PARAMS_H
19
20#include "board.h"
21#include "apds99xx.h"
22#include "saul_reg.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#ifndef APDS99XX_PARAM_DEV
34#define APDS99XX_PARAM_DEV I2C_DEV(0)
35#endif
36
37#ifndef APDS99XX_PARAM_ALS_STEPS
39#define APDS99XX_PARAM_ALS_STEPS (64)
40#endif
41#ifndef APDS99XX_PARAM_ALS_GAIN
43#define APDS99XX_PARAM_ALS_GAIN (APDS99XX_ALS_GAIN_1)
44#endif
45
46#ifndef APDS99XX_PARAM_PRX_PULSES
48#define APDS99XX_PARAM_PRX_PULSES (8)
49#endif
50#ifndef APDS99XX_PARAM_PRX_DRIVE
52#define APDS99XX_PARAM_PRX_DRIVE (APDS99XX_PRX_DRIVE_100)
53#endif
54#ifndef APDS99XX_PARAM_PRX_GAIN
56#define APDS99XX_PARAM_PRX_GAIN (APDS99XX_PRX_GAIN_1)
57#endif
58#ifndef APDS99XX_PARAM_WAIT_STEPS
60#define APDS99XX_PARAM_WAIT_STEPS (0)
61#endif
62#ifndef APDS99XX_PARAM_WAIT_LONG
64#define APDS99XX_PARAM_WAIT_LONG (false)
65#endif
66
67#ifndef APDS99XX_PARAM_INT_PIN
69#define APDS99XX_PARAM_INT_PIN (GPIO_PIN(0, 0))
70#endif
71
72#ifndef APDS99XX_PARAMS
73#define APDS99XX_PARAMS { \
74 .dev = APDS99XX_PARAM_DEV, \
75 .als_steps = APDS99XX_PARAM_ALS_STEPS, \
76 .als_gain = APDS99XX_PARAM_ALS_GAIN, \
77 .prx_pulses = APDS99XX_PARAM_PRX_PULSES, \
78 .prx_gain = APDS99XX_PARAM_PRX_GAIN, \
79 .prx_drive = APDS99XX_PARAM_PRX_DRIVE, \
80 .wait_steps = APDS99XX_PARAM_WAIT_STEPS, \
81 .wait_long = APDS99XX_PARAM_WAIT_LONG, \
82 .int_pin = APDS99XX_PARAM_INT_PIN, \
83 }
84#endif
85
86#ifndef APDS99XX_SAUL_INFO
87#define APDS99XX_SAUL_INFO { .name = "apds99xx" }
88#endif
95{
96 APDS99XX_PARAMS
97};
98
103{
104 APDS99XX_SAUL_INFO
105};
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* APDS99XX_PARAMS_H */
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:326
Additional data to collect for each entry.
Definition saul_reg.h:49