diff --git a/firmware/apps/ducklings.c b/firmware/apps/ducklings.c index cf6f1c2..4059009 100644 --- a/firmware/apps/ducklings.c +++ b/firmware/apps/ducklings.c @@ -1,7 +1,5 @@ #include -#include - #include #include #include @@ -9,7 +7,7 @@ #define NOTE_BREAK MLDY_LENGTH, 16, NOTE_PAUSE -static const uint16_t notes[] PROGMEM = { +static uint16_t notes[] = { NOTE_C, NOTE_D, NOTE_E, NOTE_F, MLDY_LENGTH, 2, NOTE_G, MLDY_LENGTH, 2, NOTE_G, NOTE_BREAK, NOTE_A, NOTE_A, NOTE_A, NOTE_A, MLDY_LENGTH, 2, NOTE_G, NOTE_BREAK, NOTE_A, NOTE_A, NOTE_A, NOTE_A, MLDY_LENGTH, 2, NOTE_G, NOTE_BREAK, diff --git a/firmware/include/pentabug/music.h b/firmware/include/pentabug/music.h index 6404b0e..7937412 100644 --- a/firmware/include/pentabug/music.h +++ b/firmware/include/pentabug/music.h @@ -25,7 +25,7 @@ void set_note(uint16_t note, uint8_t octave); // plays a melody consisting of the array of tunes of length len with speed ms for each tune -void play_melody(const uint16_t melody[], size_t len, uint8_t octave, int speed); +void play_melody(uint16_t melody[], size_t len, uint8_t octave, int speed); // stop the currently playing note void stop_note(void); diff --git a/firmware/lib/music.c b/firmware/lib/music.c index 4e0b3b4..1d5b7fa 100644 --- a/firmware/lib/music.c +++ b/firmware/lib/music.c @@ -29,7 +29,7 @@ void stop_note(void) { stop_timer(); } -void play_melody(const uint16_t notes[], size_t len, uint8_t octave, int speed) { +void play_melody(uint16_t notes[], size_t len, uint8_t octave, int speed) { int pause = speed / 20; uint8_t length = 4; diff --git a/firmware/main.c b/firmware/main.c index d79d760..2ceac37 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -2,16 +2,14 @@ #include #include -#include - #include #include #include #include #include -static const uint16_t up_mldy[] PROGMEM = { NOTE_C, NOTE_D, MLDY_LENGTH, 2, NOTE_F, NOTE_PAUSE }; -static const uint16_t down_mldy[] PROGMEM = { NOTE_F, NOTE_E, MLDY_LENGTH, 2, NOTE_C, NOTE_PAUSE }; +static uint16_t up_mldy[] = { NOTE_C, NOTE_D, MLDY_LENGTH, 2, NOTE_F, NOTE_PAUSE }; +static uint16_t down_mldy[] = { NOTE_F, NOTE_E, MLDY_LENGTH, 2, NOTE_C, NOTE_PAUSE }; static inline void run_app(struct app_t* app) { app_should_stop = 0;