aboutsummaryrefslogtreecommitdiff
path: root/tk-random.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-03 11:05:59 -0600
committerSelene ToyKeeper2023-11-03 11:05:59 -0600
commit3489015ff245861355f73674f79801279d95ea39 (patch)
tree87f188f4f407ae83fd98ff3e4ed0bcf81b4ae9d5 /tk-random.h
parentmoved ATTINY and MODEL_NUMBER into $target/arch and $target/model, (diff)
downloadanduril-3489015ff245861355f73674f79801279d95ea39.tar.gz
anduril-3489015ff245861355f73674f79801279d95ea39.tar.bz2
anduril-3489015ff245861355f73674f79801279d95ea39.zip
renamed tk*.h to arch/*.h or fsm/*.h (part 1)
to get them out of the root dir, and to start cleaning up mcu/arch code
Diffstat (limited to 'tk-random.h')
-rw-r--r--tk-random.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/tk-random.h b/tk-random.h
deleted file mode 100644
index ad65660..0000000
--- a/tk-random.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// tk-random.h: Smaller pseudo-random function(s).
-// Copyright (C) 2015-2023 Selene ToyKeeper
-// SPDX-License-Identifier: GPL-3.0-or-later
-#pragma once
-
-uint8_t pgm_rand() {
- static uint16_t offset = 255;
- // loop through ROM space, but avoid the first 256 bytes
- // because the beginning tends to have a big ramp which
- // doesn't look very random at all
- offset = ((offset + 1) & 0x3ff) | 0x0100;
- return pgm_read_byte(offset);
-}
-