1 /* 2 * Copyright (c) 2019-2021, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 /** 9 * \file its_flash_nand.h 10 * 11 * \brief Implementations of the flash interface functions for a NAND flash 12 * device. See its_flash_fs_ops_t for full documentation of functions. 13 */ 14 15 #ifndef __ITS_FLASH_NAND_H__ 16 #define __ITS_FLASH_NAND_H__ 17 18 #include <stddef.h> 19 #include <stdint.h> 20 21 #include "driver/Driver_Flash.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 struct its_flash_nand_dev_t { 28 ARM_DRIVER_FLASH *driver; 29 /* Two write buffers are reserved as the metadata block and the file block 30 * write can be mixed in the file system operation. 31 */ 32 uint32_t buf_block_id_0; 33 uint32_t buf_block_id_1; 34 uint8_t *write_buf_0; 35 uint8_t *write_buf_1; 36 size_t buf_size; 37 }; 38 39 extern const struct its_flash_fs_ops_t its_flash_fs_ops_nand; 40 41 #ifdef __cplusplus 42 } 43 #endif 44 45 #endif /* __ITS_FLASH_NAND_H__ */ 46