SWRU368C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
This operation enables closing an existing file.
_i16 sl_FsClose(_i32 pFileHandle,
_u8* pCeritificateFileName,
_u8* pSignature,
_u32 SignatureLen);
Type | Parameter | In/Out | Description |
---|---|---|---|
_i32 | pFileName | In | Handle to the created file |
_u8* | pCeritificateFileName | In | Reserved for future use in secured file system. Should be NULL |
_u8* | pSignature | In | Reserved for future use in secured file system. Should be NULL |
_u32 | SignatureLen | In | Reserved for future use in secured file system. Should be NULL |
On success, zero is returned. On error, an error code is returned.
_u8 DeviceFileName[] = "MyFile.txt";
_i32 DeviceFileHandle = -1;
_i32 RetVal;
RetVal = sl_FsOpen(DeviceFileName,
FS_MODE_OPEN_READ,
NULL,
&DeviceFileHandle);
RetVal = sl_FsClose(DeviceFileHandle,
NULL,
NULL,
NULL);