34 #ifndef ENTROPY_SOURCE_ADC_NOISE_H
35 #define ENTROPY_SOURCE_ADC_NOISE_H
53 #if IS_ACTIVE(CONFIG_ENTROPY_SOURCE_ADC_RES_6BIT)
54 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_6BIT
55 #elif IS_ACTIVE(CONFIG_ENTROPY_SOURCE_ADC_RES_8BIT)
56 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_8BIT
57 #elif IS_ACTIVE(CONFIG_ENTROPY_SOURCE_ADC_RES_10BIT)
58 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_10BIT
59 #elif IS_ACTIVE(CONFIG_ENTROPY_SOURCE_ADC_RES_12BIT)
60 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_12BIT
61 #elif IS_ACTIVE(CONFIG_ENTROPY_SOURCE_ADC_RES_14BIT)
62 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_14BIT
63 #elif IS_ACTIVE(CONFIG_ENTROPY_SOURCE_ADC_RES_16BIT)
64 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_16BIT
66 #ifndef CONFIG_ENTROPY_SOURCE_ADC_RES
67 #define CONFIG_ENTROPY_SOURCE_ADC_RES ADC_RES_10BIT
78 #ifdef CONFIG_ENTROPY_SOURCE_ADC_LINE_NUM
79 #define CONFIG_ENTROPY_SOURCE_ADC_LINE ADC_LINE(CONFIG_ENTROPY_SOURCE_ADC_LINE_NUM)
81 #define CONFIG_ENTROPY_SOURCE_ADC_LINE ADC_LINE(0)
97 #if !defined(CONFIG_KCONFIG_USEMODULE_ENTROPY_SOURCE_ADC_NOISE) || defined(DOXYGEN)
98 #ifndef CONFIG_ENTROPY_SOURCE_ADC_HMIN
99 #define CONFIG_ENTROPY_SOURCE_ADC_HMIN (0)
105 #ifndef CONFIG_ENTROPY_SOURCE_ADC_HEALTH_TEST
106 #define CONFIG_ENTROPY_SOURCE_ADC_HEALTH_TEST 0
110 #ifndef CONFIG_ENTROPY_SOURCE_ADC_COND
111 #define CONFIG_ENTROPY_SOURCE_ADC_COND 0
118 #if !CONFIG_ENTROPY_SOURCE_ADC_HMIN
119 #warning The min. provided entropy must be set before using this module
Low-level ADC peripheral driver interface definitions.
static uint32_t entropy_source_adc_entropy_per_sample(void)
Static entropy per sample value for this source [bit/sample * 2^16].
int entropy_source_adc_init(void)
Initialize ADC and test structures, if tests are enabled.
int entropy_source_adc_get(uint8_t *buf, size_t len)
Generates bytes from ADC noise.
#define CONFIG_ENTROPY_SOURCE_ADC_HMIN
ADC estimated entropy per sample [2^16 * bit/sample].
Adds include for missing inttype definitions.