<commit_before>#include <stm32f4xx_hal.h>
#include "rng.h"

static RNG_HandleTypeDef RNGHandle;

void rng_init()
{
    __RNG_CLK_ENABLE();

    RNGHandle.Instance = RNG;
    __HAL_RNG_ENABLE(&RNGHandle);
}

uint32_t rng_randint(uint32_t min, uint32_t max)
{
    uint32_t rand=0;
    if (min==max) {
        return 0;
    }
<commit_msg>Fix RNG<commit_after>#include <stm32f4xx_hal.h>
#include "rng.h"

static RNG_HandleTypeDef RNGHandle;

void rng_init()
{
    __RNG_CLK_ENABLE();
    RNGHandle.Instance = RNG;
    HAL_RNG_Init(&RNGHandle);
}

uint32_t rng_randint(uint32_t min, uint32_t max)
{
    uint32_t rand=0;
    if (min==max) {
        return 0;
    }

{'fraction_non_alphanumeric': 0.11836115326251896, 'fraction_numerical': 0.03945371775417299, 'mean_word_length': 3.7482014388489207, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2586423', 'n_tokens_mistral': 305, 'n_tokens_neox': 289, 'n_words': 49}