1menu "Hardware Abstraction Layer (HAL) and Low Level (LL)"
2    choice HAL_DEFAULT_ASSERTION_LEVEL
3        bool "Default HAL assertion level"
4        default HAL_ASSERTION_EQUALS_SYSTEM
5        help
6            Set the assert behavior / level for HAL component.
7            HAL component assert level can be set separately,
8            but the level can't exceed the system assertion level.
9            e.g. If the system assertion is disabled, then the HAL
10            assertion can't be enabled either. If the system assertion
11            is enable, then the HAL assertion can still be disabled
12            by this Kconfig option.
13
14        config HAL_ASSERTION_EQUALS_SYSTEM
15            bool "Same as system assertion level"
16        config HAL_ASSERTION_DISABLE
17            bool "Disabled"
18            depends on COMPILER_OPTIMIZATION_ASSERTION_LEVEL >= 0
19        config HAL_ASSERTION_SILENT
20            bool "Silent"
21            depends on COMPILER_OPTIMIZATION_ASSERTION_LEVEL >= 1
22        config HAL_ASSERTION_ENABLE
23            bool "Enabled"
24            depends on COMPILER_OPTIMIZATION_ASSERTION_LEVEL >= 2
25    endchoice
26
27    config HAL_DEFAULT_ASSERTION_LEVEL
28        int
29        default COMPILER_OPTIMIZATION_ASSERTION_LEVEL if HAL_ASSERTION_EQUALS_SYSTEM
30        default 0 if HAL_ASSERTION_DISABLE
31        default 1 if HAL_ASSERTION_SILENT
32        default 2 if HAL_ASSERTION_ENABLE
33
34    choice HAL_LOG_LEVEL
35        bool "HAL layer log verbosity"
36        default HAL_LOG_LEVEL_INFO
37        # If LOG component is linked, one of the following configuration symbol will be defined.
38        # Else, none will be defined, in that case, we need this HAL_LOG_LEVEL symbol.
39        depends on !LOG_DEFAULT_LEVEL_NONE && !LOG_DEFAULT_LEVEL_ERROR && !LOG_DEFAULT_LEVEL_WARN && \
40            !LOG_DEFAULT_LEVEL_INFO && !LOG_DEFAULT_LEVEL_DEBUG && !LOG_DEFAULT_LEVEL_VERBOSE
41
42        help
43            Specify how much output to see in HAL logs.
44
45        config HAL_LOG_LEVEL_NONE
46            bool "No output"
47        config HAL_LOG_LEVEL_ERROR
48            bool "Error"
49        config HAL_LOG_LEVEL_WARN
50            bool "Warning"
51        config HAL_LOG_LEVEL_INFO
52            bool "Info"
53        config HAL_LOG_LEVEL_DEBUG
54            bool "Debug"
55        config HAL_LOG_LEVEL_VERBOSE
56            bool "Verbose"
57    endchoice
58
59    config HAL_LOG_LEVEL
60        int
61        default 0 if HAL_LOG_LEVEL_NONE
62        default 1 if HAL_LOG_LEVEL_ERROR
63        default 2 if HAL_LOG_LEVEL_WARN
64        default 3 if HAL_LOG_LEVEL_INFO
65        default 4 if HAL_LOG_LEVEL_DEBUG
66        default 5 if HAL_LOG_LEVEL_VERBOSE
67
68    config HAL_SYSTIMER_USE_ROM_IMPL
69        bool "Use ROM implementation of SysTimer HAL driver"
70        depends on ESP_ROM_HAS_HAL_SYSTIMER
71        default y
72        help
73            Enable this flag to use HAL functions from ROM instead of ESP-IDF.
74
75            If keeping this as "n" in your project, you will have less free IRAM.
76            If making this as "y" in your project, you will increase free IRAM,
77            but you will lose the possibility to debug this module, and some new
78            features will be added and bugs will be fixed in the IDF source
79            but cannot be synced to ROM.
80
81    config HAL_WDT_USE_ROM_IMPL
82        bool "Use ROM implementation of WDT HAL driver"
83        depends on ESP_ROM_HAS_HAL_WDT
84        default y
85        help
86            Enable this flag to use HAL functions from ROM instead of ESP-IDF.
87
88            If keeping this as "n" in your project, you will have less free IRAM.
89            If making this as "y" in your project, you will increase free IRAM,
90            but you will lose the possibility to debug this module, and some new
91            features will be added and bugs will be fixed in the IDF source
92            but cannot be synced to ROM.
93
94    config HAL_SPI_MASTER_FUNC_IN_IRAM
95        bool
96        depends on SPI_MASTER_ISR_IN_IRAM
97        help
98            Enable this option to place SPI master hal layer functions into IRAM.
99
100    config HAL_SPI_SLAVE_FUNC_IN_IRAM
101        bool
102        depends on SPI_SLAVE_ISR_IN_IRAM
103        help
104            Enable this option to place SPI slave hal layer functions into IRAM.
105
106    config HAL_ECDSA_GEN_SIG_CM
107        bool "Enable countermeasure for ECDSA signature generation"
108        default n
109        # ToDo - IDF-11051
110        help
111            Enable this option to apply the countermeasure for ECDSA signature operation
112            This countermeasure masks the real ECDSA sign operation
113            under dummy sign operations to add randomness in the generated power signature.
114
115endmenu
116