comparison target-utils/buzplayer/main.c @ 79:49d2684805b1

buzplayer: melody buffer implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 27 Oct 2016 04:18:38 +0000
parents 0f11da299b7d
children 9092ff68e37d
comparison
equal deleted inserted replaced
78:e3d40f49d8c4 79:49d2684805b1
1 #include "types.h" 1 #include "types.h"
2 #include "melody.h"
3
4 extern char _end[];
5
6 struct melentry *melody_buf_start, *melody_buf_tailptr;
2 7
3 main() 8 main()
4 { 9 {
5 uart_select_init(); 10 uart_select_init();
6 printf("FreeCalypso buzzer player running\n"); 11 printf("FreeCalypso buzzer player running\n");
7 print_boot_rom_info(); 12 print_boot_rom_info();
8 *(volatile u16 *)0xfffe4806 = 0xFFF3; /* enable ARMIO clock */ 13 *(volatile u16 *)0xfffe4806 = 0xFFF3; /* enable ARMIO clock */
9 timer_init(); 14 timer_init();
15 melody_buf_start = (struct melentry *) _end;
16 melody_buf_tailptr = melody_buf_start;
10 for (;;) { 17 for (;;) {
11 putchar('='); 18 putchar('=');
12 if (command_entry()) 19 if (command_entry())
13 command_dispatch(); 20 command_dispatch();
14 } 21 }