From cf587e3fd8f14f1d5b2545ccbf5752c5294f4ea7 Mon Sep 17 00:00:00 2001 From: Stuart Longland Date: Sun, 28 May 2017 11:01:32 +1000 Subject: [PATCH] attiny861 port: Clear button hit/release events at power-on. This prevents all the notes being played all at once on power-on. --- ports/attiny861/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/attiny861/main.c b/ports/attiny861/main.c index 3b3736b..58dee4f 100644 --- a/ports/attiny861/main.c +++ b/ports/attiny861/main.c @@ -198,7 +198,14 @@ int main(void) { synth.enable = 0x0; synth.mute = 0x0; + /* Turn on interrupts */ sei(); + + /* Reset button states */ + button_hit = 0; + button_release = 0; + + /* Enter main loop */ while(1) { /* Check the button states */ uint8_t b = 0;