Snapdragon® Telematics Application Framework (TelAF) Interface Specification
Flash Access Service

API Reference


The Flash Access service APIs are applied in Firmware-Over-the-Air (FOTA) to flash MTD partitions or UBI volumes.

IPC interfaces binding

All the functions of this API are provided by the tafUpdateSvc service.

The following sample illustrates how to bind to Flash Access service.

bindings:
{
    clientExe.clientComponent.taf_flash -> tafUpdateSvc.taf_flash
}

Flash access initialization

MTD partition Flash Access

The following example illustrates reading an MTD block.

// Open MTD partition.
taf_flash_MtdOpen(partitionName, TAF_FLASH_READ_WRITE, &partitionRef);
// Read MTD block.
taf_flash_MtdReadBlock(partitionRef, blockIndex, data, &dataSize);
// Close MTD partition.
taf_flash_MtdClose(partitionRef);

UBI volume flash access

The following example illustrates writing UBI volume.

// Open UBI volume.
taf_flash_UbiOpen(volumeName, TAF_FLASH_READ_WRITE, &volumeRef);
// Write UBI volume.
taf_flash_UbiInitWrite(volumeRef, volumeSize);
taf_flash_UbiWrite(volumeRef, data, dataSize);
// Close UBI volume.
taf_flash_UbiClose(volumeRef);