|
OPTIGA™ Trust M
Host Library Documentation
|
Go to the documentation of this file.
39 #ifndef _OPTIGA_COMMS_H_
40 #define _OPTIGA_COMMS_H_
50 #ifdef OPTIGA_COMMS_SHIELDED_CONNECTION
52 #define OPTIGA_COMMS_DATA_OFFSET (0x05)
54 #define OPTIGA_COMMS_PRL_OVERHEAD (0x0D)
56 #define OPTIGA_COMMS_DATA_OFFSET (0x00)
57 #define OPTIGA_COMMS_PRL_OVERHEAD (0x00)
73 #ifdef OPTIGA_COMMS_SHIELDED_CONNECTION
74 uint8_t protection_level;
77 uint8_t protocol_version;
79 uint8_t manage_context_operation;
302 const uint8_t * p_tx_data,
303 uint16_t tx_data_length,
305 uint16_t * p_rx_data_len);
void(* upper_layer_callback_t)(void *upper_layer_ctx, optiga_lib_status_t event)
typedef for application event handler
This file defines the error codes for the all the layers and modules. OPTIGA host library return val...
upper_layer_callback_t upper_layer_handler
Upper layer handler.
optiga_comms_t * optiga_comms_create(callback_handler_t callback, void *context)
Provides the singleton OPTIGA instance.
This file contains the type definitions for the fundamental data types.
LIBRARY_EXPORTS optiga_lib_status_t optiga_comms_close(optiga_comms_t *p_ctx)
Closes the communication channel with OPTIGA.
LIBRARY_EXPORTS optiga_lib_status_t optiga_comms_transceive(optiga_comms_t *p_ctx, const uint8_t *p_tx_data, uint16_t tx_data_length, uint8_t *p_rx_data, uint16_t *p_rx_data_len)
Sends and receives the APDU.
struct optiga_comms optiga_comms_t
Optiga comms structure.
LIBRARY_EXPORTS optiga_lib_status_t optiga_comms_open(optiga_comms_t *p_ctx)
Opens the communication channel with OPTIGA.
uint8_t state
OPTIGA comms state.
void * p_upper_layer_ctx
Upper layer context.
uint8_t instance_init_state
Holds the instance initialization state.
LIBRARY_EXPORTS optiga_lib_status_t optiga_comms_reset(optiga_comms_t *p_ctx, uint8_t reset_type)
Resets the OPTIGA.
This file provides the prototypes for the commonly used functions and structures of OPTIGA Library.
optiga_comms_t optiga_comms
optiga communication structure
optiga_lib_status_t optiga_comms_set_callback_context(optiga_comms_t *p_optiga_comms, void *context)
Sets the callers context to OPTIGA comms instance.
void(* callback_handler_t)(void *callback_ctx, optiga_lib_status_t event)
typedef for event callback handler
void * p_pal_os_event_ctx
Pointer to the pal os event instance/context.
void optiga_comms_destroy(optiga_comms_t *optiga_comms)
Deinitializes the OPTIGA comms instance.
uint16_t optiga_lib_status_t
typedef for OPTIGA host library status
void * p_comms_ctx
Comms structure pointer.
optiga_lib_status_t optiga_comms_set_callback_handler(optiga_comms_t *p_optiga_comms, callback_handler_t handler)
Sets the callback handler to OPTIGA comms instance.