/* libpicosdk/rand.c - Integrate pico_rand with libmisc * * Copyright (C) 2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ #include #include uint32_t __lm_rand_uint31(void) { return get_rand_32() & UINT32_C(0x7fffffff); } uint32_t __lm_rand_uint32(void) { return get_rand_32(); } uint64_t __lm_rand_uint62(void) { return get_rand_64() & UINT64_C(0x3fffffffffffffff); } uint64_t __lm_rand_uint63(void) { return get_rand_64() & UINT64_C(0x7fffffffffffffff); } uint64_t __lm_rand_uint64(void) { return get_rand_64(); }