Landtiger LPC1768 C BigLib 1
A self made, custom C library for the LandTiger board.
 
Loading...
Searching...
No Matches
prng.h
Go to the documentation of this file.
1#ifndef __PRNG_H
2#define __PRNG_H
3
4#include "types.h"
5
6// PUBLIC TYPES
7
8typedef enum
9{
13
14// PUBLIC FUNCTIONS
15
19void PRNG_Set(u32 seed);
20
22void PRNG_Release(void);
23
26u32 PRNG_Next(void);
27
32u32 PRNG_Range(u32 min, u32 max);
33
34#endif
u32 PRNG_Next(void)
Generates the next pseudo-random number.
Definition prng.c:38
void PRNG_Release(void)
Releases the HW entropy sources used to seed the PRNG.
Definition prng.c:29
u32 PRNG_Range(u32 min, u32 max)
Generates a pseudo-random number in the given range, inclusive.
Definition prng.c:49
PRNG_Config
Definition prng.h:9
@ PRNG_USE_AUTO_SEED
PRNG automatically seeds itself using an hardware entropy source.
Definition prng.h:11
void PRNG_Set(u32 seed)
Initializes the PRNG by seeding it with the given seed. Use PRNG_USE_AUTO_SEED to seed it automatical...
Definition prng.c:7
uint32_t u32
Definition types.h:6