BeRTOS
rand.c
Go to the documentation of this file.
00001 
00039 #include "rand.h"
00040 
00044 int rand(void)
00045 {
00046     static unsigned long seed;
00047 
00048     /* Randomize seed */
00049     seed = (seed ^ 0x4BAD5A39UL) + 6513973UL;
00050 
00051     return (int)(seed>>16);
00052 }