We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 347a80d commit a4780cfCopy full SHA for a4780cf
cores/arduino/zephyrCommon.cpp
@@ -328,3 +328,23 @@ void detachInterrupt(pin_size_t pinNumber)
328
{
329
setInterruptHandler(pinNumber, nullptr);
330
}
331
+
332
+#ifndef CONFIG_RNG_GENERATOR_CHOICE
333
334
+#include <zephyr/random/random.h>
335
336
+void randomSeed(unsigned long) {}
337
338
+long random(long min, long max) {
339
+ long temp;
340
341
+ sys_rand_get(&temp, sizeof(temp));
342
343
+ return temp % (max - min) + min;
344
+}
345
346
+long random(long max) {
347
+ return random(0, max);
348
349
350
+#endif
0 commit comments