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 282d95fCopy full SHA for 282d95f
cores/arduino/zephyrCommon.cpp
@@ -328,3 +328,21 @@ void detachInterrupt(pin_size_t pinNumber)
328
{
329
setInterruptHandler(pinNumber, nullptr);
330
}
331
+
332
+#ifndef CONFIG_MINIMAL_LIBC_RAND
333
334
+#include <stdlib.h>
335
336
+void randomSeed(unsigned long seed) {
337
+ srand(seed);
338
+}
339
340
+long random(long min, long max) {
341
+ return rand() % (max - min) + min;
342
343
344
+long random(long max) {
345
+ return rand() % max;
346
347
348
+#endif
0 commit comments