![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Data Structures | |
| struct | wsfEsfAttributes_t |
| File attributes data type. More... | |
| struct | wsfEfsControl_t |
| File control block data type. More... | |
| struct | wsfEfsFileInfo_t |
| File Listing Information. More... | |
| struct | wsfEfsMedia_t |
| Media Control data type. More... | |
Macros | |
| #define | WSF_EFS_MAX_FILES 6 |
| Max Number of Files and Media. | |
| #define | WSF_EFS_MAX_MEDIA 4 |
| Max Number of Media. | |
| #define | WSF_EFS_FILE_OFFSET_ANY 0xFFFFFFFF |
| Offset to WsfEfsAddFile indicating any file offset can be used. | |
| #define | WSF_EFS_NAME_LEN 16 |
| File name length in bytes. | |
| #define | WSF_EFS_VERSION_LEN 16 |
| File version length in bytes. | |
| #define | WSF_EFS_USER_CMD 0x80 |
| Media Specific Command Identifiers reserved for applications begin at 0x80. | |
Typedefs | |
| typedef uint16_t | wsfEfsHandle_t |
| File handle data type. | |
| typedef uint8_t | wsfMediaInitFunc_t(void) |
| Media Init function, called when media is registered. More... | |
| typedef uint8_t | wsfMediaEraseFunc_t(uint32_t address, uint32_t size) |
| Media Erase function. More... | |
| typedef uint8_t | wsfMediaReadFunc_t(uint8_t *pBuf, uint32_t address, uint32_t size) |
| Media Read function. More... | |
| typedef uint8_t | wsfMediaWriteFunc_t(const uint8_t *pBuf, uint32_t address, uint32_t size) |
| Media Write function. More... | |
| typedef uint8_t | wsfMediaHandleCmdFunc_t(uint8_t cmd, uint32_t param) |
| Media Specific Command handler. More... | |
| typedef const wsfEfsMedia_t * | pWsfEfsMedia_t |
| Pointer to Media Control data type. | |
Functions | |
| void | WsfEfsInit (void) |
| Initialise the embedded file system. More... | |
| wsfEfsHandle_t | WsfEfsAddFile (uint32_t maxSize, uint8_t media, wsfEsfAttributes_t *pAttr, uint32_t offset) |
| Create a file in the embedded file system. More... | |
| uint8_t | WsfEfsRemoveFile (wsfEfsHandle_t handle) |
| Deletes a file in the embedded file system. More... | |
| uint8_t | WsfEfsErase (wsfEfsHandle_t handle) |
| Clears the contents of a file without deleting the file. More... | |
| uint8_t | WsfEfsGetAttributes (wsfEfsHandle_t handle, wsfEsfAttributes_t *pAttr) |
| Gets the attributes of a file. More... | |
| uint8_t | WsfEfsSetAttributes (wsfEfsHandle_t handle, wsfEsfAttributes_t *pInfo) |
| Updates the attributes of a file. More... | |
| uint16_t | WsfEfsGet (wsfEfsHandle_t handle, uint32_t offset, uint8_t *pBuffer, uint16_t len) |
| Copies data from a file. More... | |
| uint16_t | WsfEfsPut (wsfEfsHandle_t handle, uint32_t offset, const uint8_t *pBuffer, uint16_t len) |
| Writes data to a file. More... | |
| uint8_t | WsfEfsRegisterMedia (const wsfEfsMedia_t *pMediaCtrl, uint8_t mediaID) |
| Registers a File Storage Medium with the Embedded File System. More... | |
| wsfEfsControl_t * | WsfEfsGetFileByHandle (wsfEfsHandle_t handle) |
| Returns the file control block for the given handle. More... | |
| char * | WsfEfsGetFileName (wsfEfsHandle_t handle) |
| Get the name of a file. More... | |
| char * | WsfEfsGetFileVersion (wsfEfsHandle_t handle) |
| Get the version of a file. More... | |
| uint32_t | WsfEfsGetFileSize (wsfEfsHandle_t handle) |
| Get the size of a file. More... | |
| uint32_t | WsfEfsGetFileMaxSize (wsfEfsHandle_t handle) |
| Get the number of bytes of memory reserved for use by a file. More... | |
| uint8_t | WsfEfsGetFileType (wsfEfsHandle_t handle) |
| Get the type of a file. More... | |
| uint16_t | WsfEfsGetFilePermissions (wsfEfsHandle_t handle) |
| Get the permissions of a file. More... | |
| uint8_t | WsfEfsMediaSpecificCommand (wsfEfsHandle_t handle, uint8_t cmd, uint32_t param) |
| Execute a media specific command on a file. More... | |
Status Codes | |
| #define | WSF_EFS_SUCCESS 0 |
| Success. | |
| #define | WSF_EFS_FAILURE 1 |
| Failure. | |
| #define | WSF_EFS_GET_FAILED 0xFFFF |
| Get operation failure. | |
| #define | WSF_EFS_PUT_FAILED 0xFFFF |
| PUT operation failure. | |
Invalid Parameter Identifiers | |
| #define | WSF_EFS_INVALID_HANDLE 0xFFFF |
| Invalid Handle. | |
| #define | WSF_EFS_INVALID_OFFSET 0xFFFFFFFF |
| Invalid Offset. | |
| #define | WSF_EFS_INVALID_SIZE 0xFFFFFFFF |
| Invalid Size. | |
| #define | WSF_EFS_INVALID_MEDIA 0xFF |
| Invalid Media. | |
File Types | |
| #define | WSF_EFS_FILE_TYPE_BULK 0 |
| Bulk File Type. | |
| #define | WSF_EFS_FILE_TYPE_STREAM 1 |
| Stream File Type. | |
File Permissions | |
| #define | WSF_EFS_REMOTE_PERMISSIONS_MASK 0xFF |
| Remote Permissions. | |
| #define | WSF_EFS_REMOTE_GET_PERMITTED 0x01 |
| Remote Get Permitted. | |
| #define | WSF_EFS_REMOTE_PUT_PERMITTED 0x02 |
| Remote Put Permitted. | |
| #define | WSF_EFS_REMOTE_ERASE_PERMITTED 0x04 |
| Remote Erase Permitted. | |
| #define | WSF_EFS_REMOTE_VERIFY_PERMITTED 0x08 |
| Remote Verify Permitted. | |
| #define | WSF_EFS_LOCAL_GET_PERMITTED 0x0100 |
| Local Get Permitted. | |
| #define | WSF_EFS_LOCAL_PUT_PERMITTED 0x0200 |
| Local Put Permitted. | |
| #define | WSF_EFS_LOCAL_ERASE_PERMITTED 0x0400 |
| Local Erase Permitted. | |
| #define | WSF_EFS_REMOTE_VISIBLE 0x0800 |
| File Visible via Remote WDXS. | |
Standard Media Specific Command Identifiers | |
| #define | WSF_EFS_WDXS_PUT_COMPLETE_CMD 0x00 |
| Put Complete. | |
| #define | WSF_EFS_VALIDATE_CMD 0x01 |
| Validate Req for the file. | |
| typedef uint8_t wsfMediaInitFunc_t(void) |
| void WsfEfsInit | ( | void | ) |
Initialise the embedded file system.
| wsfEfsHandle_t WsfEfsAddFile | ( | uint32_t | maxSize, |
| uint8_t | media, | ||
| wsfEsfAttributes_t * | pAttr, | ||
| uint32_t | offset | ||
| ) |
Create a file in the embedded file system.
| maxSize | Max length in bytes of of the file. |
| media | Identifier of the media where the file is stored. |
| pAttr | Attributes of the file |
| offset | Offset address of the file in the memory space. |
| uint8_t WsfEfsRemoveFile | ( | wsfEfsHandle_t | handle | ) |
Deletes a file in the embedded file system.
| handle | Handle identifying the file. |
| uint8_t WsfEfsErase | ( | wsfEfsHandle_t | handle | ) |
Clears the contents of a file without deleting the file.
| handle | Handle identifying the file. |
| uint8_t WsfEfsGetAttributes | ( | wsfEfsHandle_t | handle, |
| wsfEsfAttributes_t * | pAttr | ||
| ) |
Gets the attributes of a file.
| handle | Handle identifying the file. |
| pAttr | Pointer to memory to store the attributes. |
| uint8_t WsfEfsSetAttributes | ( | wsfEfsHandle_t | handle, |
| wsfEsfAttributes_t * | pInfo | ||
| ) |
Updates the attributes of a file.
| handle | Handle identifying the file. |
| pInfo | Pointer to memory to with the updated attributes. |
| uint16_t WsfEfsGet | ( | wsfEfsHandle_t | handle, |
| uint32_t | offset, | ||
| uint8_t * | pBuffer, | ||
| uint16_t | len | ||
| ) |
Copies data from a file.
| handle | Handle identifying the file. |
| offset | Offset into the file to begin copying from. |
| pBuffer | Location to copy the data to. |
| len | Number of bytes to copy into pBuffer. |
| uint16_t WsfEfsPut | ( | wsfEfsHandle_t | handle, |
| uint32_t | offset, | ||
| const uint8_t * | pBuffer, | ||
| uint16_t | len | ||
| ) |
Writes data to a file.
| handle | Handle identifying the file. |
| offset | Offset into the file to begin writing to. |
| pBuffer | Data to write to the file. |
| len | Number of bytes to write to the file. |
| uint8_t WsfEfsRegisterMedia | ( | const wsfEfsMedia_t * | pMediaCtrl, |
| uint8_t | mediaID | ||
| ) |
Registers a File Storage Medium with the Embedded File System.
| pMediaCtrl | Pointer to the media control structure. |
| mediaID | User specified identifier of the media. |
| wsfEfsControl_t* WsfEfsGetFileByHandle | ( | wsfEfsHandle_t | handle | ) |
Returns the file control block for the given handle.
| handle | Handle of the file |
| char* WsfEfsGetFileName | ( | wsfEfsHandle_t | handle | ) |
Get the name of a file.
| handle | File Handle. |
| char* WsfEfsGetFileVersion | ( | wsfEfsHandle_t | handle | ) |
Get the version of a file.
| handle | File Handle. |
| uint32_t WsfEfsGetFileSize | ( | wsfEfsHandle_t | handle | ) |
Get the size of a file.
| handle | File Handle. |
| uint32_t WsfEfsGetFileMaxSize | ( | wsfEfsHandle_t | handle | ) |
Get the number of bytes of memory reserved for use by a file.
| handle | File Handle. |
| uint8_t WsfEfsGetFileType | ( | wsfEfsHandle_t | handle | ) |
Get the type of a file.
| handle | File Handle. |
| uint16_t WsfEfsGetFilePermissions | ( | wsfEfsHandle_t | handle | ) |
Get the permissions of a file.
| handle | File Handle. |
| uint8_t WsfEfsMediaSpecificCommand | ( | wsfEfsHandle_t | handle, |
| uint8_t | cmd, | ||
| uint32_t | param | ||
| ) |
Execute a media specific command on a file.
| handle | File Handle. |
| cmd | Media specific command identifier. |
| param | Command specific parameter. |