• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef MTD_NAND_H
10 #define MTD_NAND_H
11 
12 #include "hdf_base.h"
13 #include "osal_mutex.h"
14 
15 #ifdef __cplusplus
16 #if __cplusplus
17 extern "C" {
18 #endif
19 #endif /* __cplusplus */
20 
21 enum MtdNandPageSize {
22     MTD_NAND_PAGE_SIZE_512 = 512,
23     MTD_NAND_PAGE_SIZE_2K = 2048,
24     MTD_NAND_PAGE_SIZE_4K = 4096,
25     MTD_NAND_PAGE_SIZE_8K = 8192,
26     MTD_NAND_PAGE_SIZE_16K = 16384,
27 };
28 
29 enum MtdNandEccTYpe {
30     MTD_NAND_ECC_0BIT = 0,
31     MTD_NAND_ECC_8BIT_1K = 1,
32     MTD_NAND_ECC_16BIT_1K = 2,
33     MTD_NAND_ECC_24BIT_1K = 3,
34     MTD_NAND_ECC_28BIT_1K = 4,
35     MTD_NAND_ECC_40BIT_1K = 5,
36     MTD_NAND_ECC_64BIT_1K = 6,
37 };
38 
39 #define MTD_NAND_BB_SIZE 2
40 
41 #ifdef __cplusplus
42 #if __cplusplus
43 }
44 #endif
45 #endif /* __cplusplus */
46 
47 #endif /* MTD_NAND_H */
48