OPTIGA™ Trust M
Host Library Documentation
pal_os_datastore.h File Reference

This file provides API prototypes of platform abstraction layer for datastore operations. More...

#include "optiga/pal/pal.h"
Include dependency graph for pal_os_datastore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID   (0x11)
 Identifier to store and read OPTIGA Platform Binding Shared secret on host platform. More...
 
#define OPTIGA_SHARED_SECRET_MAX_LENGTH   (0x40)
 Maximum shared secret length this value is bind with OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID. More...
 
#define OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED   (0x00)
 
#define OPTIGA_COMMS_MANAGE_CONTEXT_ID   (0x22)
 
#define OPTIGA_HIBERNATE_CONTEXT_ID   (0x33)
 
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...
 

Detailed Description

This file provides API prototypes of platform abstraction layer for datastore operations.

Author
Infineon Technologies AG

Definition in file pal_os_datastore.h.

Macro Definition Documentation

◆ OPTIGA_COMMS_MANAGE_CONTEXT_ID

#define OPTIGA_COMMS_MANAGE_CONTEXT_ID   (0x22)

Definition at line 61 of file pal_os_datastore.h.

◆ OPTIGA_HIBERNATE_CONTEXT_ID

#define OPTIGA_HIBERNATE_CONTEXT_ID   (0x33)

Definition at line 67 of file pal_os_datastore.h.

◆ OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED

#define OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED   (0x00)

Definition at line 55 of file pal_os_datastore.h.

◆ OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID

#define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID   (0x11)

Identifier to store and read OPTIGA Platform Binding Shared secret on host platform.

Definition at line 49 of file pal_os_datastore.h.

◆ OPTIGA_SHARED_SECRET_MAX_LENGTH

#define OPTIGA_SHARED_SECRET_MAX_LENGTH   (0x40)

Maximum shared secret length this value is bind with OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID.

Definition at line 52 of file pal_os_datastore.h.

Function Documentation

◆ pal_os_datastore_read()

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.

  • Reads data from any configured specific location.
  • Once the timer expires, the registered callback function gets called from the timer event handler, if the call back is not NULL.
Precondition
  • None
Note
  • None
Parameters
[in]datastore_idDatastore id from where the data should be read.
[out]p_bufferValid Pointer to output buffer
[in,out]p_buffer_lengthValid Pointer to the data buffer length to store the read data length. The input value gets updated with the actual length read from the data store.
Return values
PAL_STATUS_SUCCESSOn successful execution
PAL_STATUS_FAILUREOn failure

◆ pal_os_datastore_write()

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.

  • Writes data to any configured specific location.
Precondition
  • None
Note
  • None
Parameters
[in]datastore_idDatastore id where the data should be written.
[in]p_bufferValid pointer to the input buffer
[in]lengthLength of the data to be written
Return values
PAL_STATUS_SUCCESSOn successful execution
PAL_STATUS_FAILUREOn failure