This file implements the platform abstraction layer APIs for data store. More...
#include "pal_os_datastore.h"
#define | DATA_STORE_BUFFERSIZE (0x42) |
Size of data store buffer. More... | |
#define | SHARED_SECRET_MAX_LENGTH (0x40U) |
Maximum shared secret length. More... | |
uint8_t | data_store_buffer [DATA_STORE_BUFFERSIZE] |
uint8_t | data_store_app_context_buffer [APP_CONTEXT_SIZE] |
uint8_t | optiga_platform_binding_shared_secret [SHARED_SECRET_MAX_LENGTH] = {0x00} |
pal_status_t | pal_os_datastore_read (uint16_t datastore_id, uint8_t *p_buffer, uint16_t *p_buffer_length) |
Reads data from the specified location for a given datastore_id. More... | |
pal_status_t | pal_os_datastore_write (uint16_t datastore_id, const uint8_t *p_buffer, uint16_t length) |
Writes data to the specified location for a given datastore_id. More... | |
This file implements the platform abstraction layer APIs for data store.
Copyright (c) 2019 Infineon Technologies AG
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
\endcopyright
#define DATA_STORE_BUFFERSIZE (0x42) |
Size of data store buffer.
#define SHARED_SECRET_MAX_LENGTH (0x40U) |
Maximum shared secret length.
pal_status_t pal_os_datastore_read | ( | uint16_t | datastore_id, |
uint8_t * | p_buffer, | ||
uint16_t * | p_buffer_length | ||
) |
Reads data from the specified location for a given datastore_id.
Reads data from the specified location for a given datastore_id.
[in] | datastore_id | Datastore id from where the data should be read. |
[out] | p_buffer | Valid Pointer to output buffer |
[in,out] | p_buffer_length | Valid Pointer to the data buffer length to store the read data length. The input value must be the data length to be read. |
PAL_STATUS_SUCCESS | On successful execution |
PAL_STATUS_FAILURE | On failure |
pal_status_t pal_os_datastore_write | ( | uint16_t | datastore_id, |
const uint8_t * | p_buffer, | ||
uint16_t | length | ||
) |
Writes data to the specified location for a given datastore_id.
Writes data to the specified location for a given datastore_id.
[in] | datastore_id | Datastore id where the data should be written. |
[in] | p_buffer | Valid pointer to the input buffer |
[in] | length | Length of the data to be written |
PAL_STATUS_SUCCESS | On successful execution |
PAL_STATUS_FAILURE | On failure |
uint8_t data_store_app_context_buffer[APP_CONTEXT_SIZE] |
uint8_t data_store_buffer[DATA_STORE_BUFFERSIZE] |
uint8_t optiga_platform_binding_shared_secret[SHARED_SECRET_MAX_LENGTH] = {0x00} |