![]() |
SimpleLink Host Driver
0.0.5.1
|
Functions | |
long | sl_FsOpen (unsigned char *pFileName, unsigned long AccessModeAndMaxSize, unsigned long *pToken, long *pFileHandle) |
open file for read or write from/to storage device More... | |
int | sl_FsClose (long FileHdl, unsigned char *pCeritificateFileName, unsigned char *pSignature, unsigned long SignatureLen) |
close file in storage device More... | |
long | sl_FsRead (long FileHdl, unsigned long Offset, unsigned char *pData, unsigned long Len) |
read block of data from a file in storage device More... | |
long | sl_FsWrite (long FileHdl, unsigned long Offset, unsigned char *pData, unsigned long Len) |
write block of data to a file in storage device More... | |
int | sl_FsGetInfo (unsigned char *pFileName, unsigned long Token, SlFsFileInfo_t *pFsFileInfo) |
get info on a file More... | |
int | sl_FsDel (unsigned char *pFileName, unsigned long Token) |
delete specific file from a storage or all files from a storage (format) More... | |
int sl_FsClose | ( | long | FileHdl, |
unsigned char * | pCeritificateFileName, | ||
unsigned char * | pSignature, | ||
unsigned long | SignatureLen | ||
) |
close file in storage device
[in] | FileHdl | Pointer to the file (assigned from sl_FsOpen) |
[in] | pCeritificateFileName,NULL | terminated |
[in] | pSignature | |
[in] | SignatureLen |
int sl_FsDel | ( | unsigned char * | pFileName, |
unsigned long | Token | ||
) |
delete specific file from a storage or all files from a storage (format)
[in] | pFileName | File's Name |
[in] | Token | File's token |
int sl_FsGetInfo | ( | unsigned char * | pFileName, |
unsigned long | Token, | ||
SlFsFileInfo_t * | pFsFileInfo | ||
) |
get info on a file
[in] | pFileName | File's name |
[in] | Token | File's token |
[out] | pFsFileInfo | Returns the File's Information: flags,file size, allocated size and Tokens |
long sl_FsOpen | ( | unsigned char * | pFileName, |
unsigned long | AccessModeAndMaxSize, | ||
unsigned long * | pToken, | ||
long * | pFileHandle | ||
) |
open file for read or write from/to storage device
[in] | pFileName | File Name buffer pointer |
[in] | AccessModeAndMaxSize | Options: As described below |
[in] | pToken | input Token for read, output Token for write |
[out] | pFileHandle | Pointing on the file and used for read and write commands to the file |
AccessModeAndMaxSize possible input
FS_MODE_OPEN_READ - Read a file
FS_MODE_OPEN_WRITE - Open for write for an existing file
FS_MODE_OPEN_CREATE(maxSizeInBytes,accessModeFlags) - Open for creating a new file. Max file size is defined in bytes.
For optimal FS size, use max size in 4K-512 bytes (e.g. 3584,7680)
Several access modes can be combined together from SlFileOpenFlags_e
long sl_FsRead | ( | long | FileHdl, |
unsigned long | Offset, | ||
unsigned char * | pData, | ||
unsigned long | Len | ||
) |
read block of data from a file in storage device
[in] | FileHdl | Pointer to the file (assigned from sl_FsOpen) |
[in] | Offset | Offset to specific read block |
[out] | pData | Pointer for the received data |
[in] | Len | Length of the received data |
long sl_FsWrite | ( | long | FileHdl, |
unsigned long | Offset, | ||
unsigned char * | pData, | ||
unsigned long | Len | ||
) |
write block of data to a file in storage device
[in] | FileHdl | Pointer to the file (assigned from sl_FsOpen) |
[in] | Offset | Offset to specific block to be written |
[in] | pData | Pointer the transmitted data to the storage device |
[in] | Len | Length of the transmitted data |