Revert "Save data memory"

This reverts commit 589275a3ba.
This commit is contained in:
Thammi 2013-08-30 21:06:18 +02:00
parent 589275a3ba
commit 4de44b972d
4 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,5 @@
#include <stdlib.h>
#include <avr/pgmspace.h>
#include <pentabug/music.h>
#include <pentabug/hal.h>
#include <pentabug/helper.h>
@ -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,

View File

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

View File

@ -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;

View File

@ -2,16 +2,14 @@
#include <stdint.h>
#include <stdlib.h>
#include <avr/pgmspace.h>
#include <pentabug/hal.h>
#include <pentabug/app.h>
#include <pentabug/lifecycle.h>
#include <pentabug/music.h>
#include <pentabug/helper.h>
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;