pentabug/firmware/apps/example_3.c

25 lines
377 B
C
Raw Normal View History

2015-03-11 21:36:52 +01:00
#include <pentabug/hal.h>
#include <pentabug/app.h>
#include <pentabug/music.h>
static void example(void) {
if(button_clicked(LEFT)) {
set_note(NOTE_C, 4);
wait_ms(500);
set_note(NOTE_D, 4);
wait_ms(500);
stop_note();
}
if(button_clicked(RIGHT)) {
set_note(NOTE_D, 4);
wait_ms(500);
set_note(NOTE_C, 4);
wait_ms(500);
stop_note();
}
}
REG(example);