fix(ble): fixed build error on ESP32-C6

This commit is contained in:
zhaoweiliang
2026-01-04 15:49:01 +08:00
parent e047f40baa
commit 86613d225f
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -1677,12 +1677,13 @@ static mbedtls_ecp_keypair keypair;
#include "tinycrypt/cmac_mode.h"
#include "tinycrypt/ecc_dh.h"
#if CONFIG_BT_CONTROLLER_ONLY
/* Used by uECC to get random data */
static int ecc_rand_func(uint8_t *dst, unsigned int len)
{
int offset_cnt = 0;
uint8_t *u8ptr = dst;
uint64_t random_64 = 0;
uint64_t random64 = 0;
while(len > 0) {
random64 = (uint64_t)esp_random();
@@ -1695,6 +1696,7 @@ static int ecc_rand_func(uint8_t *dst, unsigned int len)
return 1;
}
#endif // CONFIG_BT_CONTROLLER_ONLY
#endif // CONFIG_BT_LE_SM_SC
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS