pentabug/firmware/apps/ducklings.c

24 lines
731 B
C
Raw 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>
2013-08-29 23:25:46 +02:00
#define NOTE_BREAK MLDY_LENGTH, 16, NOTE_PAUSE
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,
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-29 23:25:46 +02:00
REG(music);