IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page


Access the underlying root file system from an application

The RTOS-LNX CLIB provides the API function __fsEmuSetEnableFsEmulation() to gain access to the underlying root file system.

Calling this function in the main() function will disable the file system drive emulation for the complete process. Note that paths like A:\test.txt, backslashes etc. will no longer work, if the emulation has been turned off.

#ifdef __cplusplus
extern "C" {
#endif
void __fsEmuSetEnableFsEmulation(int enable);
#ifdef __cplusplus
}
#endif
int main (void)
{
// Disable RTOS-LNX file system emulation
__fsEmuSetEnableFsEmulation(0);
// ...
}

If the emulation should only be temporarily turned-off for the current thread to access some specific file, the __fsEmuSetEnableFsEmulationThread() API function is provided.

#ifdef __cplusplus
extern "C" {
#endif
int __fsEmuSetEnableFsEmulationThread(int enable);
#ifdef __cplusplus
}
#endif
// ...
// Disable RTOS-LNX file system emulation for current thread.
// The function returns the previous state for this thread.
oldState = __fsEmuSetEnableFsEmulationThread(0);
// ...
// Restore the old file system emulation state
__fsEmuSetEnableFsEmulationThread(oldState);
// ...





Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Tue Jul 10 2018 14:54:14 by Doxygen 1.8.13