From 7cb4fe0944b839f28dfd96a88a772cd6a8b58019 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 2 Nov 2023 17:16:25 -0600 Subject: reorganized project files (part 1) (just moved files, didn't change the contents yet, and nothing will work without updating #includes and build scripts and stuff) --- fsm/pcint.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fsm/pcint.h (limited to 'fsm/pcint.h') diff --git a/fsm/pcint.h b/fsm/pcint.h new file mode 100644 index 0000000..cd7ba02 --- /dev/null +++ b/fsm/pcint.h @@ -0,0 +1,15 @@ +// fsm-pcint.h: PCINT (Pin Change Interrupt) functions for SpaghettiMonster. +// Copyright (C) 2017-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +volatile uint8_t irq_pcint = 0; // pin change interrupt happened? +//static volatile uint8_t button_was_pressed; +#define BP_SAMPLES 32 +volatile uint8_t button_last_state; +uint8_t button_is_pressed(); +inline void PCINT_on(); +inline void PCINT_off(); +void PCINT_inner(uint8_t pressed); + -- cgit v1.2.3