Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/targets/f7/cube/Src/rng.c')
-rw-r--r--firmware/targets/f7/cube/Src/rng.c70
1 files changed, 30 insertions, 40 deletions
diff --git a/firmware/targets/f7/cube/Src/rng.c b/firmware/targets/f7/cube/Src/rng.c
index dbf929ec..bab1b278 100644
--- a/firmware/targets/f7/cube/Src/rng.c
+++ b/firmware/targets/f7/cube/Src/rng.c
@@ -27,58 +27,48 @@
RNG_HandleTypeDef hrng;
/* RNG init function */
-void MX_RNG_Init(void)
-{
+void MX_RNG_Init(void) {
+ /* USER CODE BEGIN RNG_Init 0 */
- /* USER CODE BEGIN RNG_Init 0 */
+ /* USER CODE END RNG_Init 0 */
- /* USER CODE END RNG_Init 0 */
+ /* USER CODE BEGIN RNG_Init 1 */
- /* USER CODE BEGIN RNG_Init 1 */
-
- /* USER CODE END RNG_Init 1 */
- hrng.Instance = RNG;
- hrng.Init.ClockErrorDetection = RNG_CED_ENABLE;
- if (HAL_RNG_Init(&hrng) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN RNG_Init 2 */
-
- /* USER CODE END RNG_Init 2 */
+ /* USER CODE END RNG_Init 1 */
+ hrng.Instance = RNG;
+ hrng.Init.ClockErrorDetection = RNG_CED_ENABLE;
+ if(HAL_RNG_Init(&hrng) != HAL_OK) {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN RNG_Init 2 */
+ /* USER CODE END RNG_Init 2 */
}
-void HAL_RNG_MspInit(RNG_HandleTypeDef* rngHandle)
-{
+void HAL_RNG_MspInit(RNG_HandleTypeDef* rngHandle) {
+ if(rngHandle->Instance == RNG) {
+ /* USER CODE BEGIN RNG_MspInit 0 */
- if(rngHandle->Instance==RNG)
- {
- /* USER CODE BEGIN RNG_MspInit 0 */
+ /* USER CODE END RNG_MspInit 0 */
+ /* RNG clock enable */
+ __HAL_RCC_RNG_CLK_ENABLE();
+ /* USER CODE BEGIN RNG_MspInit 1 */
- /* USER CODE END RNG_MspInit 0 */
- /* RNG clock enable */
- __HAL_RCC_RNG_CLK_ENABLE();
- /* USER CODE BEGIN RNG_MspInit 1 */
-
- /* USER CODE END RNG_MspInit 1 */
- }
+ /* USER CODE END RNG_MspInit 1 */
+ }
}
-void HAL_RNG_MspDeInit(RNG_HandleTypeDef* rngHandle)
-{
-
- if(rngHandle->Instance==RNG)
- {
- /* USER CODE BEGIN RNG_MspDeInit 0 */
+void HAL_RNG_MspDeInit(RNG_HandleTypeDef* rngHandle) {
+ if(rngHandle->Instance == RNG) {
+ /* USER CODE BEGIN RNG_MspDeInit 0 */
- /* USER CODE END RNG_MspDeInit 0 */
- /* Peripheral clock disable */
- __HAL_RCC_RNG_CLK_DISABLE();
- /* USER CODE BEGIN RNG_MspDeInit 1 */
+ /* USER CODE END RNG_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_RNG_CLK_DISABLE();
+ /* USER CODE BEGIN RNG_MspDeInit 1 */
- /* USER CODE END RNG_MspDeInit 1 */
- }
+ /* USER CODE END RNG_MspDeInit 1 */
+ }
}
/* USER CODE BEGIN 1 */