feat: MEMS microphone software handling for TX15 and TX16SMK3 (#7328)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
3djc
2026-06-03 13:31:40 +10:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 13bba22a4d
commit a7d730fded
39 changed files with 1385 additions and 4 deletions
+15
View File
@@ -611,6 +611,21 @@ FRESULT f_getcwd(TCHAR *path, UINT sz_path)
return FR_OK;
}
FRESULT f_truncate(FIL* fil)
{
if (fil && fil->obj.fs) {
_simu_FIL* sf = reinterpret_cast<_simu_FIL*>(fil->obj.fs);
if (sf->stream && sf->stream->is_open()) {
sf->stream->flush();
if (!sf->stream->good()) return FR_DISK_ERR;
std::error_code ec;
fs::resize_file(sf->filepath, fil->fptr, ec);
if (ec) return FR_DISK_ERR;
}
}
return FR_OK;
}
FRESULT f_getfree(const TCHAR* path, DWORD* nclst, FATFS** fatfs)
{
// just fake that we always have some clusters free