From fc74d91557cc32a0f8ef0fb35e5275f11e792967 Mon Sep 17 00:00:00 2001 From: David Lenfesty Date: Tue, 22 Oct 2019 10:43:08 -0600 Subject: [PATCH] Fixed an oopsie, removed a vestigial flag, and added some comments. --- lab_2/main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lab_2/main.c b/lab_2/main.c index 5c233d6..a6b09d4 100644 --- a/lab_2/main.c +++ b/lab_2/main.c @@ -7,8 +7,6 @@ #include "main.h" -bool play_flag = 0; - /* * Pin Definitions: * PB2 -> OC0A output @@ -104,19 +102,14 @@ bool play_beat() { int main(void) { + // Run initialisation functionality gpio_init(); timer_init(); - beat_t beat = { - .note = a, - .duration = 20, - .octave = 0, - }; - play_note(beat, 1); - while (1) { + // Wait for button press if (bit_is_clear(PIND, PIND2)) { // Play song until the end while(play_beat());