From 3489015ff245861355f73674f79801279d95ea39 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 3 Nov 2023 11:05:59 -0600 Subject: 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 --- tk-random.h | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 tk-random.h (limited to 'tk-random.h') 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); -} - -- cgit v1.2.3