makes GPIO_PIN_RST optional for the sx1276
[ExpressLRS.git] / src / lib / FHSS / random.h
blob4409a8d2991aaa3375e24b6c909c8f217786cc0a
1 #pragma once
3 #include <stdint.h>
5 // the max value returned by rng
6 #define RNG_MAX 0x7FFF
8 uint16_t rng(void);
10 void rngSeed(uint32_t newSeed);
11 // 0..255 returned
12 uint8_t rng8Bit(void);
13 // 0..31 returned
14 uint8_t rng5Bit(void);
16 // returns 0 <= x < upper where n < 256
17 uint8_t rngN(uint8_t upper);