SST: Unpack tfm_sst_buf_t for read and write APIs
This patch updates the read and write SST APIs to use
the data, offset and size attributes instead of
tfm_sst_buf_t structure.
Change-Id: Ie3d872c3b1d17b49a54f419d8d6ec164c66b544c
Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
diff --git a/interface/include/tfm_sst_api.h b/interface/include/tfm_sst_api.h
index 58d9333..6ffd25b 100644
--- a/interface/include/tfm_sst_api.h
+++ b/interface/include/tfm_sst_api.h
@@ -114,15 +114,18 @@
* \param[in] token_size Must be set to 0, reserved for future use.
* Token size. In case the token is not provided
* the token size has to be 0.
- * \param[out] data Pointer to data vector \ref tfm_sst_buf_t to store
- * data, size and offset
+ * \param[in] size Size of the data to read
+ * \param[in] offset Offset within asset to start to read
+ * \param[out] data Pointer to data vector to store data
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
enum tfm_sst_err_t tfm_sst_read(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- struct tfm_sst_buf_t* data);
+ uint32_t size,
+ uint32_t offset,
+ uint8_t *data);
/**
* \brief Writes data into an asset referenced by asset UUID.
@@ -136,15 +139,19 @@
* \param[in] token_size Must be set to 0, reserved for future use.
* Token size. In case the token is not provided
* the token size has to be 0.
- * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
- * contains the data to write
+ * \param[in] size Size of the data to start to write
+ * \param[in] offset Offset within asset to write the data
+ * \param[in] data Pointer to data vector which contains the data to
+ * write
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
enum tfm_sst_err_t tfm_sst_write(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- struct tfm_sst_buf_t* data);
+ uint32_t size,
+ uint32_t offset,
+ const uint8_t *data);
/**
* \brief Deletes the asset referenced by the asset UUID.