from Utils.hpp:27
class Utils
{
public:
static int randomNumberBetween(int lowest, int highest)
{
#ifdef SIMULATOR
return lowest + (highest-lowest) * rand() / RAND_MAX;
#else
uint32_t random = (touchgfx::HAL::getInstance()->getCPUCycles() * HAL::getInstance()->getCPUCycles());
return lowest + (random % (highest-lowest));
#endif
}
};