mtd_at24cxxx.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Otto-von-Guericke Universität
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 
23 #ifndef MTD_AT24CXXX_H
24 #define MTD_AT24CXXX_H
25 
26 #include "at24cxxx.h"
27 #include "mtd.h"
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
39 typedef struct {
44 
48 #define MTD_AT24CXXX_INIT(dev_p, params_p) \
49 (mtd_at24cxxx_t) { \
50  .base = { \
51  .driver = &mtd_at24cxxx_driver \
52  }, \
53  .at24cxxx_eeprom = (dev_p), \
54  .params = (params_p) \
55 }
56 
60 extern const mtd_desc_t mtd_at24cxxx_driver;
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* MTD_AT24CXXX_H */
67 
mtd_dev_t
MTD device descriptor.
Definition: mtd.h:58
mtd_at24cxxx_t::base
mtd_dev_t base
inherit from mtd_dev_t object
Definition: mtd_at24cxxx.h:40
mtd_at24cxxx_driver
const mtd_desc_t mtd_at24cxxx_driver
MTD EEPROM driver for at24cxxx EEPROM.
at24cxxx.h
Device driver interface for AT24CXXX EEPROM units.
mtd_desc
MTD driver interface.
Definition: mtd.h:75
mtd_at24cxxx_t
Device descriptor for mtd at24cxxx device.
Definition: mtd_at24cxxx.h:39
mtd_at24cxxx_t::params
const at24cxxx_params_t * params
at24cxxx parameters
Definition: mtd_at24cxxx.h:42
mtd.h
mtd_at24cxxx_t::at24cxxx_eeprom
at24cxxx_t * at24cxxx_eeprom
at24cxxx device descriptor
Definition: mtd_at24cxxx.h:41
at24cxxx_t
Struct that represents an AT24CXXX device.
Definition: at24cxxx.h:58
at24cxxx_params
Struct that holds initialization parameters.
Definition: at24cxxx.h:46