mtd_flashpage.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 OTA keys S.A.
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 
22 #ifndef MTD_FLASHPAGE_H
23 #define MTD_FLASHPAGE_H
24 
25 #include "mtd.h"
26 #include "periph/flashpage.h"
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
36 #define MTD_FLASHPAGE_INIT_VAL(_pages_per_sector) { \
37  .driver = &mtd_flashpage_driver, \
38  .sector_count = FLASHPAGE_NUMOF, \
39  .pages_per_sector = _pages_per_sector,\
40  .page_size = FLASHPAGE_SIZE / _pages_per_sector,\
41 }
42 
46 extern const mtd_desc_t mtd_flashpage_driver;
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* MTD_FLASHPAGE_H */
53 
Low-level flash page peripheral driver interface.
MTD driver interface.
Definition: mtd.h:75
const mtd_desc_t mtd_flashpage_driver
Flashpage MTD device operations table.