Loading...
Searching...
No Matches
at24cxxx_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Otto-von-Guericke-Universität Magdeburg
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
19#ifndef AT24CXXX_PARAMS_H
20#define AT24CXXX_PARAMS_H
21
22#include "board.h"
23#include "periph/gpio.h"
24#include "at24cxxx_defines.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef AT24CXXX_PARAM_I2C
38#define AT24CXXX_PARAM_I2C (I2C_DEV(0))
39#endif
40#ifndef AT24CXXX_PARAM_ADDR
44#define AT24CXXX_PARAM_ADDR (AT24CXXX_DEF_DEV_ADDR)
45#endif
46#ifndef AT24CXXX_PARAM_PIN_WP
50#define AT24CXXX_PARAM_PIN_WP (GPIO_UNDEF)
51#endif
52#ifndef AT24CXXX_PARAM_EEPROM_SIZE
56#define AT24CXXX_PARAM_EEPROM_SIZE (AT24CXXX_EEPROM_SIZE)
57#endif
58#ifndef AT24CXXX_PARAM_PAGE_SIZE
62#define AT24CXXX_PARAM_PAGE_SIZE (AT24CXXX_PAGE_SIZE)
63#endif
64#ifndef AT24CXXX_PARAM_MAX_POLLS
68#define AT24CXXX_PARAM_MAX_POLLS (AT24CXXX_MAX_POLLS)
69#endif
70#ifndef AT24CXXX_PARAMS
74#define AT24CXXX_PARAMS { \
75 .i2c = AT24CXXX_PARAM_I2C, \
76 .pin_wp = AT24CXXX_PARAM_PIN_WP, \
77 .eeprom_size = AT24CXXX_PARAM_EEPROM_SIZE, \
78 .dev_addr = AT24CXXX_PARAM_ADDR, \
79 .page_size = AT24CXXX_PARAM_PAGE_SIZE, \
80 .max_polls = AT24CXXX_PARAM_MAX_POLLS \
81}
82#endif
88#define AT24CXXX_NUMOF ARRAY_SIZE(at24cxxx_params)
89
97
98#ifdef __cplusplus
99}
100#endif
101
102#endif /* AT24CXXX_PARAMS_H */
Constants for various I2C EEPROM devices.
#define AT24CXXX_PARAMS
Default device configuration parameters.
Low-level GPIO peripheral driver interface definitions.
Struct that holds initialization parameters.
Definition at24cxxx.h:91