Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
25
extern
"C"
{
26
#endif
27
32
#ifndef APDS99XX_PARAM_DEV
33
34
#define APDS99XX_PARAM_DEV I2C_DEV(0)
35
#endif
36
37
#ifndef APDS99XX_PARAM_ALS_STEPS
38
39
#define APDS99XX_PARAM_ALS_STEPS (64)
40
#endif
41
#ifndef APDS99XX_PARAM_ALS_GAIN
42
43
#define APDS99XX_PARAM_ALS_GAIN (APDS99XX_ALS_GAIN_1)
44
#endif
45
46
#ifndef APDS99XX_PARAM_PRX_PULSES
47
48
#define APDS99XX_PARAM_PRX_PULSES (8)
49
#endif
50
#ifndef APDS99XX_PARAM_PRX_DRIVE
51
52
#define APDS99XX_PARAM_PRX_DRIVE (APDS99XX_PRX_DRIVE_100)
53
#endif
54
#ifndef APDS99XX_PARAM_PRX_GAIN
55
56
#define APDS99XX_PARAM_PRX_GAIN (APDS99XX_PRX_GAIN_1)
57
#endif
58
#ifndef APDS99XX_PARAM_WAIT_STEPS
59
60
#define APDS99XX_PARAM_WAIT_STEPS (0)
61
#endif
62
#ifndef APDS99XX_PARAM_WAIT_LONG
63
64
#define APDS99XX_PARAM_WAIT_LONG (false)
65
#endif
66
67
#ifndef APDS99XX_PARAM_INT_PIN
68
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
89
94
static
const
apds99xx_params_t
apds99xx_params
[] =
95
{
96
APDS99XX_PARAMS
97
};
98
102
static
const
saul_reg_info_t
apds99xx_saul_info
[] =
103
{
104
APDS99XX_SAUL_INFO
105
};
106
107
#ifdef __cplusplus
108
}
109
#endif
110
111
#endif
/* APDS99XX_PARAMS_H */
112
apds99xx_params_t
APDS99XX device initialization parameters.
Definition:
apds99xx.h:326
saul_reg_info_t
Additional data to collect for each entry.
Definition:
saul_reg.h:49
apds99xx.h
saul_reg.h
SAUL registry interface definition.
apds99xx_saul_info
static const saul_reg_info_t apds99xx_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition:
apds99xx_params.h:102
apds99xx_params
static const apds99xx_params_t apds99xx_params[]
Allocate some memory to store the actual configuration.
Definition:
apds99xx_params.h:94
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17