skullc-peripherals/Utility/Src/utility_rand.cpp
Erki 01a091b174
All checks were successful
continuous-integration/drone/push Build is passing
Format pass
2021-04-30 18:32:07 +03:00

28 lines
285 B
C++

//
// Created by erki on 29.04.21.
//
#include "utility_rand.hpp"
namespace
{
std::uint32_t rand_state = 0;
}
namespace Peripherals
{
void srand(const std::uint32_t& seed)
{
rand_state = seed;
}
std::uint32_t rand()
{
return rand32(rand_state);
}
}// namespace Peripherals