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());