mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
drivers/mtd_flashpage: add mtd_flashpage_t type
This commit is contained in:
parent
28fa5c72a8
commit
2fe41b1b40
@ -34,10 +34,12 @@ extern "C"
|
||||
* @brief Macro helper to initialize a mtd_t with flash-age driver
|
||||
*/
|
||||
#define MTD_FLASHPAGE_INIT_VAL(_pages_per_sector) { \
|
||||
.driver = &mtd_flashpage_driver, \
|
||||
.sector_count = FLASHPAGE_NUMOF, \
|
||||
.pages_per_sector = _pages_per_sector,\
|
||||
.page_size = FLASHPAGE_SIZE / _pages_per_sector,\
|
||||
.base = { \
|
||||
.driver = &mtd_flashpage_driver, \
|
||||
.sector_count = FLASHPAGE_NUMOF, \
|
||||
.pages_per_sector = _pages_per_sector, \
|
||||
.page_size = FLASHPAGE_SIZE / _pages_per_sector, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/**
|
||||
@ -45,6 +47,13 @@ extern "C"
|
||||
*/
|
||||
extern const mtd_desc_t mtd_flashpage_driver;
|
||||
|
||||
/**
|
||||
* @brief MTD flashpage descriptor
|
||||
*/
|
||||
typedef struct {
|
||||
mtd_dev_t base; /**< MTD generic device */
|
||||
} mtd_flashpage_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user