Loading...
Searching...
No Matches
ds3231_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
26#ifndef DS3231_PARAM_I2C
27#define DS3231_PARAM_I2C I2C_DEV(0)
28#endif
29#ifndef DS3231_PARAM_OPT
30#define DS3231_PARAM_OPT (DS3231_OPT_BAT_ENABLE)
31#endif
32#ifndef DS3231_PARAM_INT_PIN
33#define DS3231_PARAM_INT_PIN (GPIO_UNDEF)
34#endif
35
36#ifndef DS3231_PARAMS
37#if IS_USED(MODULE_DS3231_INT)
38#define DS3231_PARAMS { .bus = DS3231_PARAM_I2C, \
39 .opt = DS3231_PARAM_OPT, \
40 .int_pin = DS3231_PARAM_INT_PIN}
41#else /* MODULE_DS3231_INT */
42#define DS3231_PARAMS { .bus = DS3231_PARAM_I2C, \
43 .opt = DS3231_PARAM_OPT}
44#endif /* MODULE_DS3231_INT */
45#endif /* DS3231_PARAMS */
47
52{
53 DS3231_PARAMS
54};
55
56#ifdef __cplusplus
57}
58#endif
59
static const ds3231_params_t ds3231_params[]
DS3231 configuration.
Set of configuration parameters for DS3231 devices.
Definition ds3231.h:99