SimpleLink CC31xx/CC32xx Host Driver
Version 3.0.1.65
Simplifies the implementation of Internet connectivity
|
Provides file system capabilities to TI's CC31XX that can be used by both the CC31XX device and the user. More...
Functions | |
_i32 | sl_FsOpen (const _u8 *pFileName, const _u32 AccessModeAndMaxSize, _u32 *pToken) |
open file for read or write from/to storage device More... | |
_i16 | sl_FsClose (const _i32 FileHdl, const _u8 *pCeritificateFileName, const _u8 *pSignature, const _u32 SignatureLen) |
Close file in storage device. More... | |
_i32 | sl_FsRead (const _i32 FileHdl, _u32 Offset, _u8 *pData, _u32 Len) |
Read block of data from a file in storage device. More... | |
_i32 | sl_FsWrite (const _i32 FileHdl, _u32 Offset, _u8 *pData, _u32 Len) |
Write block of data to a file in storage device. More... | |
_i16 | sl_FsGetInfo (const _u8 *pFileName, const _u32 Token, SlFsFileInfo_t *pFsFileInfo) |
Get information of a file. More... | |
_i16 | sl_FsDel (const _u8 *pFileName, const _u32 Token) |
Delete specific file from a storage or all files from a storage (format) More... | |
_i32 | sl_FsCtl (SlFsCtl_e Command, _u32 Token, _u8 *pFileName, const _u8 *pData, _u16 DataLen, _u8 *pOutputData, _u16 OutputDataLen, _u32 *pNewToken) |
Controls various file system operations. More... | |
_i32 | sl_FsProgram (const _u8 *pData, _u16 Len, const _u8 *pKey, _u32 Flags) |
Enables to format and configure the device with pre-prepared configuration. More... | |
_i32 | sl_FsGetFileList (_i32 *pIndex, _u8 Count, _u8 MaxEntryLen, _u8 *pBuff, SlFileListFlags_t Flags) |
The list of file names, the files are retrieve in chunks. More... | |
Provides file system capabilities to TI's CC31XX that can be used by both the CC31XX device and the user.
_i16 sl_FsClose | ( | const _i32 | FileHdl, |
const _u8 * | pCeritificateFileName, | ||
const _u8 * | pSignature, | ||
const _u32 | SignatureLen | ||
) |
Close file in storage device.
[in] | FileHdl | Pointer to the file (assigned from sl_FsOpen) |
[in] | pCeritificateFileName | Certificate file, or NULL if irrelevant. |
[in] | pSignature | The signature is either SHA-1 or SHA-256, the certificate chain may include SHA-256 |
[in] | SignatureLen | The signature actual length |
Definition at line 250 of file fs.c.
_i32 sl_FsCtl | ( | SlFsCtl_e | Command, |
_u32 | Token, | ||
_u8 * | pFileName, | ||
const _u8 * | pData, | ||
_u16 | DataLen, | ||
_u8 * | pOutputData, | ||
_u16 | OutputDataLen, | ||
_u32 * | pNewToken | ||
) |
Controls various file system operations.
[in] | Command,the | command to execute, |
[in] | Token | Set to NULL if not relevant to the command |
[in] | pFileName | Set to NULL if not relevant to the command |
[in] | pData | The data according the command. |
[in] | DataLen | Length of data buffer |
[out] | pOutputData | Buffer for the output data |
[out] | OutputDataLen | Length of the output data buffer |
[out] | pNewToken | The new valid file token, if irrelevant can be set to NULL. |
Definition at line 585 of file fs.c.
_i16 sl_FsDel | ( | const _u8 * | pFileName, |
const _u32 | Token | ||
) |
Delete specific file from a storage or all files from a storage (format)
[in] | pFileName | File Name |
[in] | Token | File token. if irrelevant set to 0 |
Definition at line 541 of file fs.c.
_i32 sl_FsGetFileList | ( | _i32 * | pIndex, |
_u8 | Count, | ||
_u8 | MaxEntryLen, | ||
_u8 * | pBuff, | ||
SlFileListFlags_t | Flags | ||
) |
The list of file names, the files are retrieve in chunks.
[in,out] | pIndex | The first chunk should start with value of -1, afterwards the Index from the previous call should be set as input Returns current chunk intex, start the next chunk from that number |
[in] | Count | Number of entries to retrieve |
[in] | MaxEntryLen | The total size of the buffer is Count * MaxEntryLen |
[out] | pBuff | The buffer contains list of SlFileAttributes_t + file name |
[in] | Flags | Is to retrieve file attributes see SlFileAttributes_t. |
Definition at line 791 of file fs.c.
_i16 sl_FsGetInfo | ( | const _u8 * | pFileName, |
const _u32 | Token, | ||
SlFsFileInfo_t * | pFsFileInfo | ||
) |
Get information of a file.
[in] | pFileName | File name |
[in] | Token | File token. if irrelevant set to 0. |
[out] | pFsFileInfo | Returns the File's Information (SlFsFileInfo_t)
|
Definition at line 475 of file fs.c.
_i32 sl_FsOpen | ( | const _u8 * | pFileName, |
const _u32 | AccessModeAndMaxSize, | ||
_u32 * | pToken | ||
) |
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 |
AccessModeAndMaxSize possible input
SL_FS_READ - Read a file
SL_FS_WRITE - Open for write for an existing file (whole file content needs to be rewritten)
SL_FS_CREATE|maxSizeInBytes,accessModeFlags SL_FS_CREATE|SL_FS_OVERWRITE|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 steps (e.g. 3584,7680,117760)
Several access modes bits can be combined together from SlFileOpenFlags_e enum
Definition at line 157 of file fs.c.
_i32 sl_FsProgram | ( | const _u8 * | pData, |
_u16 | Len, | ||
const _u8 * | pKey, | ||
_u32 | Flags | ||
) |
Enables to format and configure the device with pre-prepared configuration.
[in] | Flags | For future use |
[in] | pKey | In case the ucf is encrypted the encryption key, otherwise NULL |
[in] | pData | The file is download in data chunks, the chunk size should be aligned to 16 bytes, if no data Set to NULL |
[in] | Len | The length of pData in bytes |
Definition at line 689 of file fs.c.
_i32 sl_FsRead | ( | const _i32 | FileHdl, |
_u32 | Offset, | ||
_u8 * | pData, | ||
_u32 | 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 |
Definition at line 305 of file fs.c.
_i32 sl_FsWrite | ( | const _i32 | FileHdl, |
_u32 | Offset, | ||
_u8 * | pData, | ||
_u32 | 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 |
Definition at line 379 of file fs.c.
struct SlFsFileInfo_t |
union SlFsFileNameIndexOrError_t |
Data Fields | ||
---|---|---|
_i32 | ErrorNumber | |
SlFsFileNameIndex_t | Index |
struct SlFsControlDeviceUsage_t |
struct SlFsControlFilesUsage_t |
struct SlFsControlGetStorageInfoResponse_t |
Data Fields | ||
---|---|---|
SlFsControlDeviceUsage_t | DeviceUsage | |
SlFsControlFilesUsage_t | FilesUsage |
struct SlFsControlGetCountersResponse_t |