2013-08-26 20:39:15 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <pentabug/music.h>
|
2013-08-29 19:21:06 +02:00
|
|
|
#include <pentabug/hal.h>
|
2013-08-29 23:25:46 +02:00
|
|
|
#include <pentabug/helper.h>
|
|
|
|
#include <pentabug/app.h>
|
2013-08-26 20:39:15 +02:00
|
|
|
|
2013-08-29 23:25:46 +02:00
|
|
|
#define NOTE_BREAK MLDY_LENGTH, 16, NOTE_PAUSE
|
2013-08-26 20:39:15 +02:00
|
|
|
|
|
|
|
static uint16_t notes[] = {
|
2013-08-29 23:25:46 +02:00
|
|
|
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,
|
|
|
|
NOTE_F, NOTE_F, NOTE_F, NOTE_F, MLDY_LENGTH, 2, NOTE_E, MLDY_LENGTH, 2, NOTE_E, NOTE_BREAK,
|
|
|
|
NOTE_D, NOTE_D, NOTE_D, NOTE_D, MLDY_LENGTH, 1, NOTE_C, NOTE_BREAK,
|
2013-08-26 20:39:15 +02:00
|
|
|
NOTE_PAUSE, NOTE_PAUSE, NOTE_PAUSE,
|
|
|
|
};
|
|
|
|
|
2013-08-29 23:25:46 +02:00
|
|
|
static void music(void) {
|
|
|
|
play_melody(notes, ARRAY_SIZE(notes), 4, 500);
|
2013-08-26 20:39:15 +02:00
|
|
|
}
|
|
|
|
|
2013-08-29 23:25:46 +02:00
|
|
|
REG(music);
|