changeset 79:49d2684805b1

buzplayer: melody buffer implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 27 Oct 2016 04:18:38 +0000
parents e3d40f49d8c4
children eb5960dc258c
files target-utils/buzplayer/main.c target-utils/buzplayer/melody.h
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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())
--- /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;
+};