1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 #ifndef TRUE
12 #define TRUE 1
13 #endif
14 #ifndef FALSE
15 #define FALSE 0
16 #endif
17 
18 /***********************************************************************/
19 /* TargetCore Configuration                                            */
20 /***********************************************************************/
21 #define INC_TARGETCORE FALSE  // TRUE iff linking with TargetCore
22 #define NVRAM_INC FALSE       // TRUE to include NVRAM storage
23 #define INC_ERR_STRINGS FALSE // TRUE to include error strings
24 #define INC_MEASURE_MOD FALSE // TRUE to include measurement module
25 
26 // Parameter errors are detected if TRUE (Checks for parameter errors,
27 // writing to a closed file, etc. Reduces performance as a consequence).
28 #define OS_PARM_CHECK FALSE // TRUE or FALSE
29 
30 // Fatal errors are detected if TRUE (Checks for NULL pointers, etc.
31 // Reduces performance as a consequence).
32 #define OS_FATAL_CHECK TRUE // TRUE or FALSE
33 
34 /***********************************************************************/
35 /* Kernel Configuration                                                */
36 /***********************************************************************/
37 #define USE_LITE_KERNEL TRUE            // tasks, FIFO semaphores, timers only
38 #define INC_KERNEL FALSE                // TRUE to include kernel
39 
40 // Promotes all but OS_TIMED_OUT and OS_WOULD_BLOCK errors to fatal errs
41 #define OS_MAKE_FATAL TRUE // TRUE or FALSE
42 
43 /***********************************************************************/
44 /* File System Configuration                                           */
45 /***********************************************************************/
46 #define FILE_AIO_INC FALSE /* task-driven asynchronous file I/O */
47 
48 // Turn on UTF8 checking and UTF8 <-> UTF16 conversions for TFAT (only
49 // when VFAT enabled)
50 #define UTF_ENABLED FALSE
51 
52 // Flag to allow FS encryption/decryption
53 #define FS_CRYPT FALSE
54 
55 // File System Selection: set to TRUE to include
56 #define INC_XFS FALSE      // TargetXFS
57 
58 // TargetFTL Selection: set to TRUE to include
59 #define INC_FTL_NDM_SLC TRUE  // TargetFTL-NDM on NDM SLC
60 #define INC_FTL_NDM_MLC FALSE // TargetFTL-NDM on NDM MLC
61 
62 // Tool/Test Configuration
63 #define INC_RAM_DVRS FALSE // TRUE to include FS RAM drivers
64 #define FS_DVR_TEST FALSE  // TRUE to run FS driver test
65 #define INC_PAGE_FTL TRUE  // TRUE to include page-based FTL
66 
67 /***********************************************************************/
68 /* Private Module Assert/Debug Configuration                           */
69 /***********************************************************************/
70 #define FS_ASSERT TRUE    // TRUE enables filesys PfAssert()
71 #define FAT_DEBUG FALSE   // TRUE for TargetFAT debug output
72 #define XFS_DEBUG FALSE   // TRUE for TargetXFS debug output
73 
74 
75 /***********************************************************************/
76 /* Symbols derived from configuration above. Do not edit.              */
77 /***********************************************************************/
78 
79 #define INC_FS (INC_FFS || INC_FAT || INC_XFS || INC_RFS || INC_ZFS)
80 
81 #define INC_FTL_NDM (INC_FTL_NDM_SLC || INC_FTL_NDM_MLC || INC_FTL_NOR_WR1)
82 
83 #define INC_NDM (INC_FFS_NDM_SLC || INC_FFS_NDM_MLC || INC_FTL_NDM_SLC || INC_FTL_NDM_MLC)
84 
85 #ifdef __cplusplus
86 }
87 #endif
88