# HG changeset patch # User Mychaela Falconia # Date 1477541918 0 # Node ID 49d2684805b17c2d4f384777e4e300bf26607f12 # Parent e3d40f49d8c48334783dcc9fdb1b1588ed7fe6aa buzplayer: melody buffer implemented diff -r e3d40f49d8c4 -r 49d2684805b1 target-utils/buzplayer/main.c --- a/target-utils/buzplayer/main.c Thu Oct 27 04:04:38 2016 +0000 +++ b/target-utils/buzplayer/main.c Thu Oct 27 04:18:38 2016 +0000 @@ -1,4 +1,9 @@ #include "types.h" +#include "melody.h" + +extern char _end[]; + +struct melentry *melody_buf_start, *melody_buf_tailptr; main() { @@ -7,6 +12,8 @@ print_boot_rom_info(); *(volatile u16 *)0xfffe4806 = 0xFFF3; /* enable ARMIO clock */ timer_init(); + melody_buf_start = (struct melentry *) _end; + melody_buf_tailptr = melody_buf_start; for (;;) { putchar('='); if (command_entry()) diff -r e3d40f49d8c4 -r 49d2684805b1 target-utils/buzplayer/melody.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/target-utils/buzplayer/melody.h Thu Oct 27 04:18:38 2016 +0000 @@ -0,0 +1,4 @@ +struct melentry { + u16 tone; + u16 dur; +};