MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / getRandom16

Function getRandom16

libraries/randomHelpers/randomHelpers.cpp:152–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151
152uint16_t getRandom16()
153{
154 if (__randomIdx < 16)
155 {
156 __randomBuffer = getRandom32();
157 __randomIdx = 32;
158 }
159 uint16_t rv = __randomBuffer & 0xFFFF;
160 __randomBuffer >>= 16;
161 __randomIdx -= 16;
162 return rv;
163}
164
165
166uint32_t getRandom24()

Callers 1

unittestFunction · 0.85

Calls 1

getRandom32Function · 0.85

Tested by 1

unittestFunction · 0.68