Loading...
Searching...
No Matches
at24cxxx_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Otto-von-Guericke-Universität Magdeburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "periph/gpio.h"
20#include "at24cxxx_defines.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef AT24CXXX_PARAM_I2C
34#define AT24CXXX_PARAM_I2C (I2C_DEV(0))
35#endif
36#ifndef AT24CXXX_PARAM_ADDR
40#define AT24CXXX_PARAM_ADDR (AT24CXXX_DEF_DEV_ADDR)
41#endif
42#ifndef AT24CXXX_PARAM_PIN_WP
46#define AT24CXXX_PARAM_PIN_WP (GPIO_UNDEF)
47#endif
48#ifndef AT24CXXX_PARAM_EEPROM_SIZE
52#define AT24CXXX_PARAM_EEPROM_SIZE (AT24CXXX_EEPROM_SIZE)
53#endif
54#ifndef AT24CXXX_PARAM_PAGE_SIZE
58#define AT24CXXX_PARAM_PAGE_SIZE (AT24CXXX_PAGE_SIZE)
59#endif
60#ifndef AT24CXXX_PARAM_MAX_POLLS
64#define AT24CXXX_PARAM_MAX_POLLS (AT24CXXX_MAX_POLLS)
65#endif
66#ifndef AT24CXXX_PARAMS
70#define AT24CXXX_PARAMS { \
71 .i2c = AT24CXXX_PARAM_I2C, \
72 .pin_wp = AT24CXXX_PARAM_PIN_WP, \
73 .eeprom_size = AT24CXXX_PARAM_EEPROM_SIZE, \
74 .dev_addr = AT24CXXX_PARAM_ADDR, \
75 .page_size = AT24CXXX_PARAM_PAGE_SIZE, \
76 .max_polls = AT24CXXX_PARAM_MAX_POLLS \
77}
78#endif
80
84#define AT24CXXX_NUMOF ARRAY_SIZE(at24cxxx_params)
85
93
94#ifdef __cplusplus
95}
96#endif
97
Constants for various I2C EEPROM devices.
#define AT24CXXX_PARAMS
Default device configuration parameters.
Low-level GPIO peripheral driver interface definitions.
struct at24cxxx_params at24cxxx_params_t
Struct that holds initialization parameters.
Struct that holds initialization parameters.
Definition at24cxxx.h:90