hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
ifx-record-bluetooth.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
9#ifndef IFX_RECORD_BLUETOOTH_H
10#define IFX_RECORD_BLUETOOTH_H
11
12#include <stddef.h>
13#include <stdint.h>
14#include "infineon/ifx-error.h"
15#include "infineon/ifx-utils.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* Macro definitions */
22/* Definitions of function identifiers */
23
27#define IFX_RECORD_BT_SET UINT8_C(0x01)
28
32#define IFX_RECORD_BT_GET UINT8_C(0x02)
33
37#define IFX_RECORD_BT_RELEASE_MEMORY UINT8_C(0x03)
38
42#define IFX_RECORD_BT_TYPE "application/vnd.bluetooth.ep.oob"
43
47typedef struct
48{
49 uint8_t data_len;
50 uint8_t *data;
52
58typedef struct
59{
60 uint8_t data_length;
61 uint8_t data_type;
62 uint8_t *data;
64
65/* public functions */
66
79
93 const uint8_t *device_addr);
94
107 ifx_record_handle_t *handle, const ifx_bt_config_field_t *device_class);
108
122 ifx_record_handle_t *handle, uint8_t config_type,
123 const ifx_bt_config_field_t *simple_pairing_hash_c);
124
140 ifx_record_handle_t *handle, uint8_t config_type,
141 const ifx_bt_config_field_t *simple_pairing_randomizer_r);
142
156 ifx_record_handle_t *handle, uint8_t config_type,
157 const ifx_bt_config_field_t *service_class_uuid);
158
173 ifx_record_handle_t *handle, uint8_t config_type,
174 const ifx_bt_config_field_t *local_name);
175
190 ifx_record_handle_t *handle, const ifx_record_eir_data_t *additional_data,
191 uint32_t count);
192
206 uint8_t *device_addr);
207
221 const ifx_record_handle_t *handle, ifx_bt_config_field_t *device_class);
222
237 const ifx_record_handle_t *handle, uint8_t *config_type,
238 ifx_bt_config_field_t *simple_pairing_hash_c);
239
256 const ifx_record_handle_t *handle, uint8_t *config_type,
257 ifx_bt_config_field_t *simple_pairing_randomizer_r);
258
273 const ifx_record_handle_t *handle, uint8_t *config_type,
274 ifx_bt_config_field_t *service_class_uuid);
275
291 uint8_t *config_type,
292 ifx_bt_config_field_t *local_name);
293
308 const ifx_record_handle_t *handle, ifx_record_eir_data_t *additional_data,
309 uint32_t *count);
310
311#ifdef __cplusplus
312}
313
314#endif /* __cplusplus */
315#endif /* IFX_RECORD_BLUETOOTH_H */
Infineon specific error code creation and parsing.
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Definition ifx-error.h:91
ifx_status_t ifx_record_bt_set_device_class(ifx_record_handle_t *handle, const ifx_bt_config_field_t *device_class)
Sets the device class in the Bluetooth carrier configuration record for the given record handle.
ifx_status_t ifx_record_bt_set_additional_eir_data(ifx_record_handle_t *handle, const ifx_record_eir_data_t *additional_data, uint32_t count)
Sets the array of additional EIR data in Bluetooth carrier configuration record for the given record ...
ifx_status_t ifx_record_bt_get_service_class_uuid(const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *service_class_uuid)
Gets the service class UUID of the Bluetooth carrier configuration record from the given record handl...
ifx_status_t ifx_record_bt_get_local_name(const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *local_name)
Gets the local name in the Bluetooth carrier configuration record from the given record handle.
ifx_status_t ifx_record_bt_set_simple_pairing_randomizer_r(ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *simple_pairing_randomizer_r)
Sets the simple pairing randomizer R in the Bluetooth carrier configuration record for the given reco...
ifx_status_t ifx_record_bt_get_simple_pairing_randomizer_r(const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *simple_pairing_randomizer_r)
Gets the simple pairing randomizer R of the Bluetooth carrier configuration record from the given rec...
ifx_status_t ifx_record_bt_set_device_addr(ifx_record_handle_t *handle, const uint8_t *device_addr)
Sets the device address in the Bluetooth carrier configuration record for the given record handle.
ifx_status_t ifx_record_bt_new(ifx_record_handle_t *handle)
Creates the Bluetooth record and handle of the created record. This handle holds values of the record...
ifx_status_t ifx_record_bt_get_simple_pairing_hash_c(const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *simple_pairing_hash_c)
Gets the simple pairing hash of the Bluetooth carrier configuration record from the given record hand...
ifx_status_t ifx_record_bt_get_additional_eir_data(const ifx_record_handle_t *handle, ifx_record_eir_data_t *additional_data, uint32_t *count)
Gets an array of additional EIR data of the Bluetooth carrier configuration record from the given rec...
ifx_status_t ifx_record_bt_get_device_class(const ifx_record_handle_t *handle, ifx_bt_config_field_t *device_class)
Gets the device class of Bluetooth carrier configuration record from the given record handle.
ifx_status_t ifx_record_bt_get_device_addr(const ifx_record_handle_t *handle, uint8_t *device_addr)
Gets the device address of the Bluetooth carrier configuration record from the given record handle.
ifx_status_t ifx_record_bt_set_simple_pairing_hash_c(ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *simple_pairing_hash_c)
Sets the simple pairing hash in the Bluetooth carrier configuration record for the given record handl...
ifx_status_t ifx_record_bt_set_service_class_uuid(ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *service_class_uuid)
Sets the service class universal unique identifier (UUID) in the Bluetooth carrier configuration reco...
ifx_status_t ifx_record_bt_set_local_name(ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *local_name)
Sets the local name in the Bluetooth carrier configuration record for the given record handle.
Provides utility functions and macros.
Defines the data structure of Bluetooth configuration field.
Structure for extended inquiry response (EIR) data object. Each EIR structure consists of an EIR Leng...
Defines the handle for specific record type.