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 
9 #pragma once
10 
25 #include "at24cxxx.h"
26 #include "mtd.h"
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
38 typedef struct {
43 
47 #define MTD_AT24CXXX_INIT(dev_p, params_p) \
48 (mtd_at24cxxx_t) { \
49  .base = { \
50  .driver = &mtd_at24cxxx_driver \
51  }, \
52  .at24cxxx_eeprom = (dev_p), \
53  .params = (params_p) \
54 }
55 
59 extern const mtd_desc_t mtd_at24cxxx_driver;
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
Device driver interface for AT24CXXX EEPROM units.
const mtd_desc_t mtd_at24cxxx_driver
MTD EEPROM driver for at24cxxx EEPROM.
Struct that holds initialization parameters.
Definition: at24cxxx.h:90
Struct that represents an AT24CXXX device.
Definition: at24cxxx.h:102
Device descriptor for mtd at24cxxx device.
Definition: mtd_at24cxxx.h:38
mtd_dev_t base
inherit from mtd_dev_t object
Definition: mtd_at24cxxx.h:39
const at24cxxx_params_t * params
at24cxxx parameters
Definition: mtd_at24cxxx.h:41
at24cxxx_t * at24cxxx_eeprom
at24cxxx device descriptor
Definition: mtd_at24cxxx.h:40
MTD driver interface.
Definition: mtd.h:203
MTD device descriptor.
Definition: mtd.h:111