From f319c70417cf5d42e25a23f89c1c043c092d4aad Mon Sep 17 00:00:00 2001 From: Ali Hozhabri Date: Wed, 12 Mar 2025 14:33:39 +0100 Subject: [PATCH] lib: stm32wb0: Call appropriate Zephyr function for using TRNG peripheral BLEPLAT_RngGetRandom16 and BLEPLAT_RngGetRandom32 are moved to hci_stm32wb0.c driver on the Zephyr side, with some modifications to use ST entropy driver on Zephyr. Modify README to include the new changes. Signed-off-by: Ali Hozhabri --- .../BLE_TransparentMode/STM32_BLE/Target/bleplat.c | 10 ---------- lib/stm32wb0/README.rst | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/stm32wb0/BLE_TransparentMode/STM32_BLE/Target/bleplat.c b/lib/stm32wb0/BLE_TransparentMode/STM32_BLE/Target/bleplat.c index b61b79b9d..de079d905 100644 --- a/lib/stm32wb0/BLE_TransparentMode/STM32_BLE/Target/bleplat.c +++ b/lib/stm32wb0/BLE_TransparentMode/STM32_BLE/Target/bleplat.c @@ -118,16 +118,6 @@ int32_t BLEPLAT_AesCMACEncryptFinish(BLEPLAT_AESCMACctxTypeDef *pAESCMACctx, } #endif /* (BLESTACK_CONTROLLER_ONLY == 0) */ -void BLEPLAT_RngGetRandom16(uint16_t* num) -{ - HW_RNG_GetRandom16(num); -} - -void BLEPLAT_RngGetRandom32(uint32_t* num) -{ - HW_RNG_GetRandom32(num); -} - uint8_t BLEPLAT_DBmToPALevel(int8_t TX_dBm) { return RADIO_DBmToPALevel(TX_dBm); diff --git a/lib/stm32wb0/README.rst b/lib/stm32wb0/README.rst index e059c5325..2a5148e1f 100644 --- a/lib/stm32wb0/README.rst +++ b/lib/stm32wb0/README.rst @@ -127,5 +127,7 @@ Patch List: Impacted file: app_conf.h - Exclude HAL_UART_MspInit and HAL_UART_MspDeInit from compilation: Impacted file: stm32wb0x_hal_msp.c + - Removed BLEPLAT_RngGetRandom16 and BLEPLAT_RngGetRandom32 functions: + Impacted file: bleplat.c - dos2unix applied - trailing white spaces removed