* Tasks
*/
kz_run(task_audio, "tAudio", 5, 0x800, 0, NULL);
- kz_run(task_display, "tDisplay", 6, 0x800, 0, NULL);
- kz_run(task_menu, "tMenu", 7, 0x800, 0, NULL);
- kz_run(task_input, "tInput", 8, 0x800, 0, NULL);
+ kz_run(task_display, "tDisplay", 5, 0x800, 0, NULL);
+ kz_run(task_menu, "tMenu", 6, 0x800, 0, NULL);
+ kz_run(task_input, "tInput", 6, 0x800, 0, NULL);
kz_run(task_command, "tCommand", 9, 0x800, 0, NULL);
kz_chpri(15); /* Í¥Àè½ç°Ì¤ò²¼¤²¤Æ¡¤¥¢¥¤¥É¥ë¥¹¥ì¥Ã¥É¤Ë°Ü¹Ô¤¹¤ë */
{ 256, 8, NULL },
{ 512, 8, NULL },
{ 1024, 8, NULL },
+ { 2048, 8, NULL },
};
#define MEMORY_AREA_NUM (sizeof(pool) / sizeof(*pool))
kz_send(MSGBOX_ID_AUDIO, 4 + siz, p);
}
+static int waitfunc(void)
+{
+ kz_wait();
+ return 1;
+}
+
static int audio_cmdproc(char *p)
{
int cmd = p[0];
case AUDIO_CMD_PLAY:
vs1011e_play_with_data(
&p[4],
- ((unsigned char)p[2] << 8) | ((unsigned char)p[3] << 0));
+ ((unsigned char)p[2] << 8) | ((unsigned char)p[3] << 0),
+ waitfunc);
break;
default:
break;
TMRINT_ENABLE();
IRQ4_ENABLE();
- /*
- * Display clear
- */
- display_clear();
- display_draw_logo( 0, 0, 2);
- display_draw_box(0, 0, 121, 31, 1);
- display_draw_text(40, 4, "KOZOS EXPBRD #00");
- display_draw_logo(nx, ny, 0);
-
uint16 prev = 0, curr = 0;
while (1) {
/*
#include "task_menu.h"
#include "task_audio.h"
+#include "task_display.h"
#include "pff.h"
#include "kozos.h"
#include "lib.h"
return 1;
}
WORD cnt;
- const int siz = 32;
+ const int siz = 1024;
do {
- puts("o");
void *buf = kz_kmalloc(siz);
pf_read(buf, siz, &cnt);
audio_play(buf, cnt);
+ kz_kmfree(buf);
+ kz_wait();
} while (cnt == siz);
return 0;
}
DIR dir;
FILINFO filinfo;
+ display_clear();
+ display_draw_logo( 0, 0, 2);
+ display_draw_box(0, 0, 121, 31, 1);
+ display_draw_text(40, 4, "KOZOS EXPBRD #00");
+
while (1) {
if (pf_mount(&fatfs)) {
continue;
}
}
#else
- while (1) {
- kz_sleep();
- }
+ display_clear();
+ display_draw_logo( 0, 0, 2);
+ display_draw_box(0, 0, 121, 31, 1);
+ display_draw_text(40, 4, "KOZOS EXPBRD #00");
+
+ kz_sleep();
#endif
return 0;
}
}
-void vs1011e_play_with_data(void *buf, int siz)
+void vs1011e_play_with_data(
+ void *buf, int siz,
+ int (*waitfunc)(void))
{
int i;
/*
spi_select(SpiTarget_VS1011E_DATA);
for (i = 0; i < siz; i++) {
while (VS1011E_CHK_DREQ()) {
+ waitfunc();
}
spi_tx(*((char *)buf + i));
}
void *buf, int siz,
int (*waitfunc)(void),
int (*readfunc)(void * buf, const int len));
-void vs1011e_play_with_data(void *buf, int siz);
+void vs1011e_play_with_data(
+ void *buf, int siz,
+ int (*waitfunc)(void));
void vs1011e_decodetime_read(uint16 * sec);
void vs1011e_decodetime_write(const uint16 sec);
void vs1011e_register_print(void);