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:
co-authored by
Claude Sonnet 4.6
parent
13bba22a4d
commit
a7d730fded
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user