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
|
||||
|
||||
@@ -880,3 +880,13 @@ uint32_t simuGetCustomSwitchColor(uint8_t idx)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(PDM_CLOCK)
|
||||
#include "boards/rm-h750/pdm_software_driver.h"
|
||||
void pdmStart() {}
|
||||
void pdmStop() {}
|
||||
bool pdmUpdateSoundLevel() { return false; }
|
||||
uint8_t pdmGetSoundLevel() { return 0; }
|
||||
bool pdmCapture() { return false; }
|
||||
uint32_t pdmConvertToPCM(int16_t*, uint32_t) { return 0; }
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user