OPTIGA™ Trust M
Host Library Documentation
optiga_lib_types.h
Go to the documentation of this file.
1 
38 #ifndef _OPTIGA_LIB_TYPES_H_
39 #define _OPTIGA_LIB_TYPES_H_
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 #include <stdio.h>
46 #include <stdlib.h>
47 #include <string.h>
48 #include <stdint.h>
49 
51 #ifdef _OPTIGA_EXPORTS_DLLEXPORT_H_
52 
53 #ifdef OPTIGA_LIB_EXPORTS
54 #define LIBRARY_EXPORTS __declspec(dllexport)
55 #else
56 #define LIBRARY_EXPORTS __declspec(dllimport)
57 #endif // OPTIGA_LIB_EXPORTS
58 
59 #else
60 #define LIBRARY_EXPORTS
61 #endif /*_OPTIGA_EXPORTS_DLLEXPORT_H_*/
62 
65 #ifndef FALSE
66 #define FALSE (0U)
67 #endif
68 
70 #ifndef TRUE
71 #define TRUE (1U)
72 #endif
73 
75 typedef char char_t;
76 
78 typedef double double_t;
79 
81 typedef float float_t;
82 
84 typedef uint8_t bool_t;
85 
87 typedef void * hdl_t;
88 
90 typedef uint16_t optiga_lib_status_t;
91 
93 typedef void Void;
94 
96 typedef void (*upper_layer_callback_t)(void* upper_layer_ctx, optiga_lib_status_t event);
97 
99 typedef void (*callback_handler_t)(void* callback_ctx, optiga_lib_status_t event);
100 
104 typedef struct data_blob
105 {
107  uint8_t *data_ptr;
109  uint16_t length;
111 
112 
113 #ifndef _NO_STATIC_H
114 #define _STATIC_H static
115 #else
116 #define _STATIC_H
117 #endif
118 
119 #ifndef _STATIC_INLINE
120 #define _STATIC_INLINE static inline
121 #endif
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif /* _OPTIGA_LIB_TYPES_H_ */
128 
upper_layer_callback_t
void(* upper_layer_callback_t)(void *upper_layer_ctx, optiga_lib_status_t event)
typedef for application event handler
Definition: optiga_lib_types.h:96
float_t
float float_t
Typedef for a float.
Definition: optiga_lib_types.h:81
data_blob
Structure to specify a byte stream consisting of length and data pointer.
Definition: optiga_lib_types.h:105
data_blob::data_ptr
uint8_t * data_ptr
Pointer to byte array which contains the data stream.
Definition: optiga_lib_types.h:107
data_blob_t
struct data_blob data_blob_t
Structure to specify a byte stream consisting of length and data pointer.
char_t
char char_t
Typedef for one byte integer.
Definition: optiga_lib_types.h:75
hdl_t
void * hdl_t
typedef for handles
Definition: optiga_lib_types.h:87
data_blob::length
uint16_t length
Length of the byte stream.
Definition: optiga_lib_types.h:109
bool_t
uint8_t bool_t
Typedef for a boolean.
Definition: optiga_lib_types.h:84
double_t
double double_t
Typedef for a double word.
Definition: optiga_lib_types.h:78
callback_handler_t
void(* callback_handler_t)(void *callback_ctx, optiga_lib_status_t event)
typedef for event callback handler
Definition: optiga_lib_types.h:99
Void
void Void
Typedef for a void.
Definition: optiga_lib_types.h:93
optiga_lib_status_t
uint16_t optiga_lib_status_t
typedef for OPTIGA host library status
Definition: optiga_lib_types.h:90