OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
pal_os_datastore.h
Go to the documentation of this file.
1 
39 #ifndef _PAL_OS_DATASTORE_H_
40 #define _PAL_OS_DATASTORE_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #include "pal.h"
47 
49 #define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID (0x11)
50 
51 
52 // Persistant data store is not configured
53 #define OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED (0x00)
54 
55 // !!!OPTIGA_LIB_PORTING_REQUIRED
56 // Identifier to store and read OPTIGA Shielded connection manage context on host platform,
57 // If the manage context data is to be stored in volatile memory only,
58 // set OPTIGA_COMMS_MANAGE_CONTEXT_ID to OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED.
59 #define OPTIGA_COMMS_MANAGE_CONTEXT_ID (0x22)
60 
61 // !!!OPTIGA_LIB_PORTING_REQUIRED
62 // Identifier to store and read OPTIGA application context handle on host platform,
63 // If the application context data is to be stored in volatile memory only,
64 // set OPTIGA_COMMS_MANAGE_CONTEXT_ID to OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED.
65 #define OPTIGA_HIBERNATE_CONTEXT_ID (0x33)
66 
69 #define APP_CONTEXT_SIZE (0x08)
70 
92 pal_status_t pal_os_datastore_read(uint16_t datastore_id,
93  uint8_t * p_buffer,
94  uint16_t * p_buffer_length);
95 
116 pal_status_t pal_os_datastore_write(uint16_t datastore_id,
117  const uint8_t * p_buffer,
118  uint16_t length);
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* _PAL_OS_DATASTORE_H_ */
125 
This file provides the prototype declarations of platform abstraction layer.
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.
Definition: pal_os_datastore_arduino.cpp:55
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.
Definition: pal_os_datastore_arduino.cpp:109
uint16_t pal_status_t
PAL return status.
Definition: pal.h:60