Snapdragon® Telematics Application Framework (TelAF) Interface Specification
|
#include "legato.h"
Go to the source code of this file.
Macros | |
#define | IFGEN_TAF_FLASH_PROTOCOL_ID "b36da29f4d7707ec3eceaa2f60f31c0a" |
#define | IFGEN_TAF_FLASH_MSG_SIZE 16404 |
#define | TAF_FLASH_PARTITION_NAME_MAX_BYTES 128 |
#define | TAF_FLASH_MTD_PAGE_MAX_WRITE_SIZE 4096 |
#define | TAF_FLASH_MTD_PAGE_MAX_READ_SIZE 4096 |
#define | TAF_FLASH_MTD_MAX_READ_SIZE 16384 |
#define | TAF_FLASH_MTD_MAX_WRITE_SIZE 16384 |
#define | TAF_FLASH_VOLUME_NAME_MAX_BYTES 64 |
#define | TAF_FLASH_VOLUME_TYPE_MAX_BYTES 128 |
#define | TAF_FLASH_UBI_MAX_READ_SIZE 16384 |
#define | TAF_FLASH_UBI_MAX_WRITE_SIZE 16384 |
Typedefs | |
typedef struct taf_flash_Partition * | taf_flash_PartitionRef_t |
typedef struct taf_flash_Volume * | taf_flash_VolumeRef_t |
Enumerations | |
enum | taf_flash_OpenMode_t { TAF_FLASH_READ_ONLY = 1, TAF_FLASH_WRITE_ONLY = 2, TAF_FLASH_READ_WRITE = 3 } |
#define IFGEN_TAF_FLASH_PROTOCOL_ID "b36da29f4d7707ec3eceaa2f60f31c0a" |
#define IFGEN_TAF_FLASH_MSG_SIZE 16404 |
#define TAF_FLASH_PARTITION_NAME_MAX_BYTES 128 |
Maximum partition name length with null character(s).
#define TAF_FLASH_MTD_PAGE_MAX_WRITE_SIZE 4096 |
Maximum byte size for buffer to write data to an MTD page.
#define TAF_FLASH_MTD_PAGE_MAX_READ_SIZE 4096 |
Maximum byte size for buffer to read data from an MTD page.
#define TAF_FLASH_MTD_MAX_READ_SIZE 16384 |
Maximum byte size for buffer to read data from MTD partition.
#define TAF_FLASH_MTD_MAX_WRITE_SIZE 16384 |
Maximum byte size for buffer to write data to MTD partition.
#define TAF_FLASH_VOLUME_NAME_MAX_BYTES 64 |
Maximum volume name length with null character(s).
#define TAF_FLASH_VOLUME_TYPE_MAX_BYTES 128 |
Maximum volume type length with null character(s).
#define TAF_FLASH_UBI_MAX_READ_SIZE 16384 |
Maximum byte size for buffer to read data from UBI volume.
#define TAF_FLASH_UBI_MAX_WRITE_SIZE 16384 |
Maximum byte size for buffer to write data to UBI volume.
typedef struct taf_flash_Partition* taf_flash_PartitionRef_t |
The reference of a partition.
typedef struct taf_flash_Volume* taf_flash_VolumeRef_t |
The reference of a volume.
enum taf_flash_OpenMode_t |
LE_SHARED bool ifgen_taf_flash_HasLocalBinding | ( | void | ) |
Get if this client bound locally.
LE_SHARED void ifgen_taf_flash_InitCommonData | ( | void | ) |
Init data that is common across all threads
LE_SHARED void ifgen_taf_flash_CleanupCommonData | ( | le_msg_SessionRef_t | _ifgen_sessionRef | ) |
Cleanup the data of a session
LE_SHARED le_result_t ifgen_taf_flash_OpenSession | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
bool | isBlocking | ||
) |
Perform common initialization and open a session
LE_SHARED void ifgen_taf_flash_Init | ( | le_msg_SessionRef_t | _ifgen_sessionRef | ) |
Initiates flash access reference map and memory pool.
LE_SHARED le_result_t ifgen_taf_flash_MtdOpen | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
const char *LE_NONNULL | partitionName, | ||
taf_flash_OpenMode_t | mode, | ||
taf_flash_PartitionRef_t * | partitionRefPtr | ||
) |
Opens an MTD partition for read and write.
[in] | partitionName | MTD partition name. |
[in] | mode | Opening mode. |
[out] | partitionRefPtr | The MTD partition reference. |
LE_SHARED le_result_t ifgen_taf_flash_MtdClose | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef | ||
) |
Closes an MTD partition.
[in] | partitionRef | The MTD partition reference. |
LE_SHARED le_result_t ifgen_taf_flash_MtdInformation | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t * | blocksNumberPtr, | ||
uint32_t * | badBlocksNumberPtr, | ||
uint32_t * | blockSizePtr, | ||
uint32_t * | pageSizePtr | ||
) |
Gets an information about the given MTD partition.
[in] | partitionRef | The MTD partition reference. |
[out] | blocksNumberPtr | Total blocks number. |
[out] | badBlocksNumberPtr | Bad blocks number. |
[out] | blockSizePtr | Block size. |
[out] | pageSizePtr | Page size. |
LE_SHARED le_result_t ifgen_taf_flash_MtdEraseBlock | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t | blockIndex | ||
) |
Erases an MTD block.
[in] | partitionRef | The MTD partition reference. |
[in] | blockIndex | Logical block index. |
LE_SHARED le_result_t ifgen_taf_flash_MtdReadPage | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t | pageIndex, | ||
uint8_t * | readDataPtr, | ||
size_t * | readDataSizePtr | ||
) |
Reads an MTD page.
[in] | partitionRef | The MTD partition reference. |
[in] | pageIndex | Page index. |
[out] | readDataPtr | Buffer read from the MTD page. |
[in,out] | readDataSizePtr |
LE_SHARED le_result_t ifgen_taf_flash_MtdWritePage | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t | pageIndex, | ||
const uint8_t * | writeDataPtr, | ||
size_t | writeDataSize | ||
) |
Writes MTD page.
[in] | partitionRef | The MTD partition reference. |
[in] | pageIndex | Page index. |
[in] | writeDataPtr | Buffer to be written to the MTD block. |
[in] | writeDataSize |
LE_SHARED le_result_t ifgen_taf_flash_MtdRead | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t | offset, | ||
uint8_t * | readDataPtr, | ||
size_t * | readDataSizePtr | ||
) |
Reads an MTD partition.
[in] | partitionRef | The MTD partition reference. |
[in] | offset | The MTD partition offset. |
[out] | readDataPtr | Buffer read from the MTD page. |
[in,out] | readDataSizePtr |
LE_SHARED le_result_t ifgen_taf_flash_MtdWrite | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t | offset, | ||
const uint8_t * | writeDataPtr, | ||
size_t | writeDataSize | ||
) |
Writes MTD partition.
[in] | partitionRef | The MTD partition reference. |
[in] | offset | The MTD partition offset. |
[in] | writeDataPtr | Buffer to be written to the MTD block. |
[in] | writeDataSize |
LE_SHARED le_result_t ifgen_taf_flash_MtdErase | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef | ||
) |
Erases MTD partition.
[in] | partitionRef | The MTD partition reference. |
LE_SHARED bool ifgen_taf_flash_MtdIsBlockGood | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_PartitionRef_t | partitionRef, | ||
uint32_t | blockIndex | ||
) |
Checks if an MTD block is good.
[in] | partitionRef | The MTD partition reference. |
[in] | blockIndex | Logical block index. |
LE_SHARED le_result_t ifgen_taf_flash_UbiOpen | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
const char *LE_NONNULL | volumeName, | ||
taf_flash_OpenMode_t | mode, | ||
taf_flash_VolumeRef_t * | volumeRefPtr | ||
) |
Opens UBI volume for read and write.
[in] | volumeName | UBI volume name. |
[in] | mode | Opening mode. |
[out] | volumeRefPtr | The UBI volume reference. |
LE_SHARED le_result_t ifgen_taf_flash_UbiClose | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_VolumeRef_t | volumeRef | ||
) |
Closes UBI volume.
[in] | volumeRef | The UBI volume reference. |
LE_SHARED le_result_t ifgen_taf_flash_UbiInformation | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_VolumeRef_t | volumeRef, | ||
uint32_t * | lebNumberPtr, | ||
uint32_t * | freeLebNumberPtr, | ||
uint32_t * | volumeSizePtr | ||
) |
Gets UBI volume information.
[in] | volumeRef | The UBI volume reference. |
[out] | lebNumberPtr | Total logical erase blocks number. |
[out] | freeLebNumberPtr | Free logical erase blocks number. |
[out] | volumeSizePtr | Volume size. |
LE_SHARED le_result_t ifgen_taf_flash_UbiRead | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_VolumeRef_t | volumeRef, | ||
uint32_t | offset, | ||
uint8_t * | readDataPtr, | ||
size_t * | readDataSizePtr | ||
) |
Reads UBI volume.
[in] | volumeRef | The UBI volume reference. |
[in] | offset | The UBI volume offset. |
[out] | readDataPtr | Buffer read from UBI volume. |
[in,out] | readDataSizePtr |
LE_SHARED le_result_t ifgen_taf_flash_UbiInitWrite | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_VolumeRef_t | volumeRef, | ||
int64_t | writeBytes | ||
) |
Initiates write size of UBI volume.
[in] | volumeRef | The UBI volume reference. |
[in] | writeBytes | The number of bytes set to write to UBI volume. |
LE_SHARED le_result_t ifgen_taf_flash_UbiWrite | ( | le_msg_SessionRef_t | _ifgen_sessionRef, |
taf_flash_VolumeRef_t | volumeRef, | ||
const uint8_t * | writeDataPtr, | ||
size_t | writeDataSize | ||
) |
Writes data to UBI volume.
[in] | volumeRef | The UBI volume reference. |
[in] | writeDataPtr | Buffer to be written to UBI volume. |
[in] | writeDataSize |