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