Loading...
Searching...
No Matches
ds3231_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Freie Universität Berlin
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
18#ifndef DS3231_PARAMS_H
19#define DS3231_PARAMS_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
29#ifndef DS3231_PARAM_I2C
30#define DS3231_PARAM_I2C I2C_DEV(0)
31#endif
32#ifndef DS3231_PARAM_OPT
33#define DS3231_PARAM_OPT (DS3231_OPT_BAT_ENABLE)
34#endif
35#ifndef DS3231_PARAM_INT_PIN
36#define DS3231_PARAM_INT_PIN (GPIO_UNDEF)
37#endif
38
39#ifndef DS3231_PARAMS
40#if IS_USED(MODULE_DS3231_INT)
41#define DS3231_PARAMS { .bus = DS3231_PARAM_I2C, \
42 .opt = DS3231_PARAM_OPT, \
43 .int_pin = DS3231_PARAM_INT_PIN}
44#else /* MODULE_DS3231_INT */
45#define DS3231_PARAMS { .bus = DS3231_PARAM_I2C, \
46 .opt = DS3231_PARAM_OPT}
47#endif /* MODULE_DS3231_INT */
48#endif /* DS3231_PARAMS */
55{
56 DS3231_PARAMS
57};
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* DS3231_PARAMS_H */
static const ds3231_params_t ds3231_params[]
DS3231 configuration.
Set of configuration parameters for DS3231 devices.
Definition ds3231.h:100