repo.or.cz
/
ExpressLRS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
makes GPIO_PIN_RST optional for the sx1276
[ExpressLRS.git]
/
src
/
lib
/
FHSS
/
random.h
blob
4409a8d2991aaa3375e24b6c909c8f217786cc0a
1
#pragma once
2
3
#include <stdint.h>
4
5
// the max value returned by rng
6
#define RNG_MAX 0x7FFF
7
8
uint16_t
rng
(
void
);
9
10
void
rngSeed
(
uint32_t
newSeed
);
11
// 0..255 returned
12
uint8_t
rng8Bit
(
void
);
13
// 0..31 returned
14
uint8_t
rng5Bit
(
void
);
15
16
// returns 0 <= x < upper where n < 256
17
uint8_t
rngN
(
uint8_t
upper
);