mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
modules: mbedtls: Provide mbedtls_hardware_poll() conditionally
This is a follow-up to commit c7327f5f70.
Wrap implementation of the `mbedtls_hardware_poll()` function in
`#if defined(CONFIG_MBEDTLS_ZEPHYR_ENTROPY)` so that the function
is provided only when that option is activated.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
committed by
Stephanos Ioannidis
parent
6a93975dd7
commit
010730aff6
@@ -45,6 +45,7 @@ static void init_heap(void)
|
||||
#define init_heap(...)
|
||||
#endif /* CONFIG_MBEDTLS_ENABLE_HEAP && MBEDTLS_MEMORY_BUFFER_ALLOC_C */
|
||||
|
||||
#if defined(CONFIG_MBEDTLS_ZEPHYR_ENTROPY)
|
||||
static const struct device *const entropy_dev =
|
||||
DEVICE_DT_GET_OR_NULL(DT_CHOSEN(zephyr_entropy));
|
||||
|
||||
@@ -80,6 +81,7 @@ int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_MBEDTLS_ZEPHYR_ENTROPY */
|
||||
|
||||
static int _mbedtls_init(const struct device *device)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user