pentabug/firmware/apps/ducklings.c

22 lines
622 B
C
Raw Permalink Normal View History

#include <stdlib.h>
#include <pentabug/music.h>
#include <pentabug/hal.h>
2013-08-29 23:25:46 +02:00
#include <pentabug/helper.h>
#include <pentabug/app.h>
static uint16_t notes[] = {
2013-09-04 00:57:13 +02:00
NOTE_C, NOTE_D, NOTE_E, NOTE_F, MLDY_LENGTH, 2, NOTE_G, MLDY_LENGTH, 2, NOTE_G,
NOTE_A, NOTE_A, NOTE_A, NOTE_A, MLDY_LENGTH, 3, NOTE_G, NOTE_PAUSE,
NOTE_A, NOTE_A, NOTE_A, NOTE_A, MLDY_LENGTH, 3, NOTE_G, NOTE_PAUSE,
NOTE_F, NOTE_F, NOTE_F, NOTE_F, MLDY_LENGTH, 2, NOTE_E, MLDY_LENGTH, 2, NOTE_E,
NOTE_G, NOTE_G, NOTE_G, NOTE_G, MLDY_LENGTH, 3, NOTE_C, NOTE_PAUSE,
};
2013-08-29 23:25:46 +02:00
static void music(void) {
2013-09-04 00:57:13 +02:00
play_melody(notes, ARRAY_SIZE(notes), 4, 300);
}
2013-08-29 23:25:46 +02:00
REG(music);