hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
nbt-apdu-lib.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
8#ifndef NBT_APDU_LIB_H
9#define NBT_APDU_LIB_H
10
11#include <stddef.h>
12#include <stdint.h>
13#include <stdlib.h>
14
15#include "infineon/ifx-error.h"
16
51#ifdef NBT_APDU_LOG_ENABLE
52#define NBT_APDU_LOG(logger_object, source_information, logger_level, \
53 formatter, ...) \
54 ifx_logger_log(logger_object, source_information, logger_level, formatter, \
55 ##__VA_ARGS__)
56#define NBT_APDU_LOG_BYTES(logger_object, source_information, logger_level, \
57 delimeter_1, data, data_len, delimeter_2) \
58 ifx_logger_log_bytes(logger_object, source_information, logger_level, \
59 delimeter_1, data, data_len, delimeter_2)
60#else
61#define NBT_APDU_LOG(logger_object, source_information, logger_level, \
62 formatter, ...)
63
64#define NBT_APDU_LOG_BYTES(logger_object, source_information, logger_level, \
65 delimeter_1, data, data_len, delimeter_2)
66#endif
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
73#define LIB_NBT_APDU UINT8_C(0x33)
74
120
121#ifdef __cplusplus
122}
123
124#endif /* __cplusplus */
125#endif /* NBT_APDU_LIB_H */
Infineon specific error code creation and parsing.
#define IFX_MODULE(library_id, module_id)
Encoding of module id and library id into 2 bytes. Bit: 15 Set in macro IFX_ERROR to denote error ide...
Definition ifx-error.h:23
nbt_module_id
Enumeration defines the NBT library module IDs.
@ NBT_PARSE_RESP
NBT APDU response parser module ID.
@ NBT_BUILD_APDU_PERSO
NBT APDU personalization command builder module ID.
@ NBT_CMD_CONFIG
NBT configuration command set module ID.
@ NBT_BUILD_APDU_CONFIG
NBT APDU configuration command builder module ID.
@ NBT_BUILD_APDU
NBT APDU command builder module ID.
@ NBT_CMD
NBT operational command set module ID.
@ NBT_APDU
NBT APDU module ID.
@ NBT_CMD_PERSO
NBT personalization command set module ID.
#define LIB_NBT_APDU
apdu-nbt library module ID