mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(ble): fixed build error on ESP32-C5
(cherry picked from commit cd63e7ded5)
Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
This commit is contained in:
@@ -1599,13 +1599,13 @@ static const char *TAG_SM_ALG = "ble_sm_alg";
|
|||||||
#if CONFIG_BT_LE_SM_SC
|
#if CONFIG_BT_LE_SM_SC
|
||||||
#include "tinycrypt/cmac_mode.h"
|
#include "tinycrypt/cmac_mode.h"
|
||||||
#include "tinycrypt/ecc_dh.h"
|
#include "tinycrypt/ecc_dh.h"
|
||||||
|
#if CONFIG_BT_CONTROLLER_ONLY
|
||||||
/* Used by uECC to get random data */
|
/* Used by uECC to get random data */
|
||||||
static int ecc_rand_func(uint8_t *dst, unsigned int len)
|
static int ecc_rand_func(uint8_t *dst, unsigned int len)
|
||||||
{
|
{
|
||||||
int offset_cnt = 0;
|
int offset_cnt = 0;
|
||||||
uint8_t *u8ptr = dst;
|
uint8_t *u8ptr = dst;
|
||||||
uint64_t random_64 = 0;
|
uint64_t random64 = 0;
|
||||||
|
|
||||||
while(len > 0) {
|
while(len > 0) {
|
||||||
random64 = (uint64_t)esp_random();
|
random64 = (uint64_t)esp_random();
|
||||||
@@ -1618,7 +1618,7 @@ static int ecc_rand_func(uint8_t *dst, unsigned int len)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif // CONFIG_BT_CONTROLLER_ONLY
|
||||||
#endif // CONFIG_BT_LE_SM_SC
|
#endif // CONFIG_BT_LE_SM_SC
|
||||||
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
|
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user