Files

27 lines
380 B
C
Raw Permalink Normal View History

2016-10-07 23:44:50 +02:00
#include "Random.h"
#include <stdlib.h>
2019-11-15 10:21:40 +01:00
void RandomInit(void) {
2016-10-07 23:44:50 +02:00
}
2019-11-15 10:21:40 +01:00
uint8_t RandomGetByte(void) {
2016-10-07 23:44:50 +02:00
return rand() & 0xFF;
}
2019-11-15 10:21:40 +01:00
void RandomGetBuffer(void *Buffer, uint8_t ByteCount) {
uint8_t *BufferPtr = (uint8_t *) Buffer;
2016-10-07 23:44:50 +02:00
2019-11-15 10:21:40 +01:00
while (ByteCount--) {
2016-10-07 23:44:50 +02:00
*BufferPtr++ = RandomGetByte();
}
}
2019-11-15 10:21:40 +01:00
void RandomTick(void) {
2016-10-07 23:44:50 +02:00
rand();
rand();
rand();
rand();
}