Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FXAS21002 FXOS8700Q
pal_drbg.h File Reference
PAL DRBG. This file contains the real-time OS APIs and is a part of the PAL service API. More...
Go to the source code of this file.
Functions | |
palStatus_t | pal_osRandomBuffer (uint8_t *randomBuf, size_t bufSizeBytes) |
Generate random number into given buffer with given size in bytes. | |
palStatus_t | pal_osRandom32bit (uint32_t *randomInt) |
Generate a 32-bit random number. |
Detailed Description
PAL DRBG. This file contains the real-time OS APIs and is a part of the PAL service API.
It provides thread, timers, semaphores, mutexes and memory pool management APIs as well as random API.
Definition in file pal_drbg.h.
Function Documentation
palStatus_t pal_osRandom32bit | ( | uint32_t * | randomInt ) |
Generate a 32-bit random number.
- Parameters:
-
[out] randomInt A 32-bit buffer to hold the generated number.
- Note:
- `pal_init()` MUST be called before this function.
- If non-volatile entropy is expected, the entropy must be in storage when this function is called. Non-volatile entropy may be injected using `pal_plat_osEntropyInject()`.
- Returns:
- PAL_SUCCESS on success, a negative value indicating a specific error code in case of failure.
Definition at line 29 of file pal_drbg.c.
palStatus_t pal_osRandomBuffer | ( | uint8_t * | randomBuf, |
size_t | bufSizeBytes | ||
) |
Generate random number into given buffer with given size in bytes.
- Parameters:
-
[out] randomBuf A buffer to hold the generated number. [in] bufSizeBytes The size of the buffer and the size of the required random number to generate.
- Note:
- `pal_init()` MUST be called before this function.
- If non-volatile entropy is expected, the entropy must have been injected before this function is called. If entropy has not been injected to non-volatile memory, us `pal_plat_osEntropyInject()`.
- Returns:
- PAL_SUCCESS on success, a negative value indicating a specific error code in case of failure.
Definition at line 21 of file pal_drbg.c.
Generated on Tue Jul 12 2022 20:21:04 by
