diff --git a/src/nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h b/src/nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h index 2624abfb..d23f474f 100644 --- a/src/nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h +++ b/src/nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h @@ -422,6 +422,9 @@ static inline bool ble_npl_hw_is_in_critical(void) #include "freertos/semphr.h" #include "freertos/task.h" #include "freertos/timers.h" +#ifdef CONFIG_BT_NIMBLE_USE_ESP_TIMER +#include "esp_timer.h" +#endif #ifdef __cplusplus extern "C" { diff --git a/src/nimconfig.h b/src/nimconfig.h index fb48423f..56dace2e 100644 --- a/src/nimconfig.h +++ b/src/nimconfig.h @@ -165,6 +165,12 @@ */ // #define CONFIG_NIMBLE_CPP_ADDR_FMT_UPPERCASE 1 +/** + * @brief Un-comment to use mbedtls instead of tinycrypt. + * @details This could save approximately 8k of flash if already using mbedtls for other functionality. + */ +// #define CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS 1 + /********************************** End Arduino user-config **********************************/ @@ -291,6 +297,14 @@ #define CONFIG_BT_CONTROLLER_ENABLED 1 #endif +#ifndef CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS +#define CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS 0 +#endif + +#ifndef MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS +#define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS (CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS) +#endif + #ifdef ESP_PLATFORM #ifndef CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY #define CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY @@ -325,6 +339,11 @@ # error Extended advertising is not supported on ESP32. # endif #endif + +#ifndef CONFIG_BT_NIMBLE_USE_ESP_TIMER +#define CONFIG_BT_NIMBLE_USE_ESP_TIMER 1 +#endif + #endif // ESP_PLATFORM #if CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV && !CONFIG_BT_NIMBLE_EXT_ADV