blob: cfcecf8ea5ca4f3c5aa90c96beeed9b4182fc81f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/**
* TrueRandom - A true random number generator for Arduino.
*
* Copyright (c) 2010 Peter Knight, Tinker.it! All rights reserved.
*/
#ifndef TrueRandom_h
#define TrueRandom_h
#include <inttypes.h>
class TrueRandomClass
{
public:
int rand();
long random();
long random(long howBig);
long random(long howsmall, long how);
int randomBit(void);
char randomByte(void);
void memfill(char* location, int size);
void mac(uint8_t* macLocation);
void uuid(uint8_t* uuidLocation);
private:
int randomBitRaw(void);
int randomBitRaw2(void);
};
extern TrueRandomClass TrueRandom;
#endif
|