mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Use Pico-SDK RNG
This commit is contained in:
1 parent
5559d0fa68
commit
094202ff16
8 files changed
+12
-4
No files matched your search
@@ -17,6 +17,9 @@ bool mg_random(void *buf, size_t len) {
|
||||
#if MG_ARCH == MG_ARCH_ESP32
|
||||
while (len--) *p++ = (unsigned char) (esp_random() & 255);
|
||||
success = true;
|
||||
#elif MG_ARCH == MG_ARCH_RP2040
|
||||
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
||||
success = true;
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
static bool initialised = false;
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
|
||||
Reference in new issue
Block a user