提交 7ac68fa3 编写于 作者: Z Zihao Yu

native,devices,audio: add SBSTAT register

* this can expose the status of the stream buffer to applications
上级 163a316f
......@@ -68,3 +68,15 @@ size_t __am_audio_write(uintptr_t reg, void *buf, size_t size) {
}
return 0;
}
size_t __am_audio_read(uintptr_t reg, void *buf, size_t size) {
switch (reg) {
case _DEVREG_AUDIO_SBSTAT: {
_DEV_AUDIO_SBSTAT_t *stat = (_DEV_AUDIO_SBSTAT_t *)buf;
stat->count = count;
stat->bufsize = SBUF_SIZE;
return size;
}
}
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册