This section describes functions and macros of the driver's API.
#define RNGA_QueueFull |
( |
| ) |
|
This macro returns TRUE when a new random value is ready in the queue for reading. Otherwise macro returns FALSE.
- Returns
- true (non-zero) new random value is ready in the queue and can be read,
-
false random value not available.
- Note
- Implemented as an inline macro.
- See also
- RNGA_GetVal
This macro returns a new random value from RNGA Output Register.
- Returns
- uint32 random number.
- Note
- Implemented as an inline macro.
- See also
- RNGA_QueueFull
#define RNGA_GetStatus |
( |
| ) |
|
This macro returns lower 8-bits of the status register.
- Returns
- uint8 (refer to RNG_SR [7:0] description for more details).
- Note
- Implemented as an inline macro.
#define RNGA_WaitAndGetVal |
( |
|
ptr | ) |
|
This macro waits until a new random number is generated. Afterwards random value is copied to the memory pointed by ptr.
- Parameters
-
ptr | Pointer to 32-bit random value. |
- Note
- Implemented as an inline macro.
- Warning
- Calling this macro results in programme stall for up to 256 system clock cycles.
- See also
- RNGA_GetVal
#define RNGA_SetEntropy |
( |
|
ptr | ) |
|
This macro insert entropy into the RNGA. It allows an external user to continually seed the RNGA with externally generated random data.
- Parameters
-
ptr | Pointer to memory location with eight 32-bit entropy values. |
- Note
- Implemented as an inline macro.
This macro switches RNGA into sleep mode. If module is placed in sleep mode the oscillators are disabled.
- Note
- Implemented as an inline macro.
- See also
- RNGA_Wakeup
This macro transitions RNGA from sleep mode to normal mode. The oscillators will be enabled and a new random values will be generated.
- Note
- Implemented as an inline macro.
- See also
- RNGA_Sleep
#define RNGA_Init |
( |
|
cfg, |
|
|
|
ip, |
|
|
|
callback |
|
) |
| |
This function initializes Random Number Generator Accelerator (RNGA). It also installs callback function for interrupt vector 34.
- Parameters
-
- Note
- Implemented as a function call.