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
9#pragma once
10
20
21#include "board.h"
22#include "periph/gpio.h"
23#include "at24cxxx_defines.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef AT24CXXX_PARAM_I2C
37#define AT24CXXX_PARAM_I2C (I2C_DEV(0))
38#endif
39#ifndef AT24CXXX_PARAM_ADDR
43#define AT24CXXX_PARAM_ADDR (AT24CXXX_DEF_DEV_ADDR)
44#endif
45#ifndef AT24CXXX_PARAM_PIN_WP
49#define AT24CXXX_PARAM_PIN_WP (GPIO_UNDEF)
50#endif
51#ifndef AT24CXXX_PARAM_EEPROM_SIZE
55#define AT24CXXX_PARAM_EEPROM_SIZE (AT24CXXX_EEPROM_SIZE)
56#endif
57#ifndef AT24CXXX_PARAM_PAGE_SIZE
61#define AT24CXXX_PARAM_PAGE_SIZE (AT24CXXX_PAGE_SIZE)
62#endif
63#ifndef AT24CXXX_PARAM_MAX_POLLS
67#define AT24CXXX_PARAM_MAX_POLLS (AT24CXXX_MAX_POLLS)
68#endif
69#ifndef AT24CXXX_PARAMS
73#define AT24CXXX_PARAMS { \
74 .i2c = AT24CXXX_PARAM_I2C, \
75 .pin_wp = AT24CXXX_PARAM_PIN_WP, \
76 .eeprom_size = AT24CXXX_PARAM_EEPROM_SIZE, \
77 .dev_addr = AT24CXXX_PARAM_ADDR, \
78 .page_size = AT24CXXX_PARAM_PAGE_SIZE, \
79 .max_polls = AT24CXXX_PARAM_MAX_POLLS \
80}
81#endif
83
87#define AT24CXXX_NUMOF ARRAY_SIZE(at24cxxx_params)
88
96
97#ifdef __cplusplus
98}
99#endif
100
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