OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
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 #ifndef _OPTIGA_EXPORTS_DLLEXPORT_H_
52 #define _OPTIGA_EXPORTS_DLLEXPORT_H_
53 
54 #if defined(WIN32) || defined(_WIN32)
55 
56 #ifdef OPTIGA_LIB_EXPORTS
57 #define LIBRARY_EXPORTS __declspec(dllexport)
58 #elif defined(OPTIGA_LIB_EXCLUDE_IMPORT)
59 #define LIBRARY_EXPORTS
60 #else
61 #define LIBRARY_EXPORTS __declspec(dllimport)
62 #endif // OPTIGA_LIB_EXPORTS
63 
64 #else
65 #define LIBRARY_EXPORTS
66 #endif //WIN32
67 
68 #endif /*_OPTIGA_EXPORTS_DLLEXPORT_H_*/
69 
72 #ifndef FALSE
73 #define FALSE (0U)
74 #endif
75 
77 #ifndef TRUE
78 #define TRUE (1U)
79 #endif
80 
82 typedef char char_t;
83 
85 typedef double double_t;
86 
88 typedef float float_t;
89 
91 typedef uint8_t bool_t;
92 
94 typedef void * hdl_t;
95 
97 typedef uint16_t optiga_lib_status_t;
98 
100 typedef void Void;
101 
103 typedef void (*upper_layer_callback_t)(void* upper_layer_ctx, optiga_lib_status_t event);
104 
106 typedef void (*callback_handler_t)(void* callback_ctx, optiga_lib_status_t event);
107 
111 typedef struct data_blob
112 {
114  uint8_t *data_ptr;
116  uint16_t length;
117 } data_blob_t;
118 
119 
120 #ifndef _NO_STATIC_H
121 #define _STATIC_H static
122 #else
123 #define _STATIC_H
124 #endif
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif /* _OPTIGA_LIB_TYPES_H_ */
131 
struct data_blob data_blob_t
Structure to specify a byte stream consisting of length and data pointer.
void Void
Typedef for a void.
Definition: optiga_lib_types.h:100
uint8_t * data_ptr
Pointer to byte array which contains the data stream.
Definition: optiga_lib_types.h:114
uint8_t bool_t
Typedef for a boolean.
Definition: optiga_lib_types.h:91
void * hdl_t
typedef for handles
Definition: optiga_lib_types.h:94
double double_t
Typedef for a double word.
Definition: optiga_lib_types.h:85
Structure to specify a byte stream consisting of length and data pointer.
Definition: optiga_lib_types.h:111
char char_t
Typedef for one byte integer.
Definition: optiga_lib_types.h:82
void(* upper_layer_callback_t)(void *upper_layer_ctx, optiga_lib_status_t event)
typedef for application event handler
Definition: optiga_lib_types.h:103
uint16_t length
Length of the byte stream.
Definition: optiga_lib_types.h:116
float float_t
Typedef for a float.
Definition: optiga_lib_types.h:88
uint16_t optiga_lib_status_t
typedef for OPTIGA host library status
Definition: optiga_lib_types.h:97
void(* callback_handler_t)(void *callback_ctx, optiga_lib_status_t event)
typedef for event callback handler
Definition: optiga_lib_types.h:106