]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - lfsr.h
Replace rand() with LFSR implementation
[rgblamp.git] / lfsr.h
diff --git a/lfsr.h b/lfsr.h
new file mode 100644 (file)
index 0000000..64af84e
--- /dev/null
+++ b/lfsr.h
@@ -0,0 +1,17 @@
+/*
+ * File:   lfsr.h
+ *
+ * Linear Feedback Shift Register (random number generator)
+ */
+
+
+#ifndef _LFSR_H
+#define _LFSR_H
+
+/* Initialize the LFSR generator */
+void lfsr_init(unsigned seed);
+
+/* Read the next LFSR value */
+unsigned lfsr_get();
+
+#endif