hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
ifx-record-bluetooth-le.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_LE_H
10#define IFX_RECORD_BLUETOOTH_LE_H
11
12#include <stddef.h>
13#include <stdint.h>
14#include "infineon/ifx-utils.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* Macro definitions */
21/* Definitions of function identifiers */
22
26#define IFX_RECORD_BLE_GET UINT8_C(0x01)
27
31#define IFX_RECORD_BLE_SET UINT8_C(0x02)
32
36#define IFX_RECORD_BLE_RELEASE_MEMORY UINT8_C(0x03)
37
41#define IFX_RECORD_BLE_TYPE "application/vnd.bluetooth.le.oob"
42
46#define IFX_RECORD_TYPE_LEN_BLE_DEV_ADDR UINT8_C(0x1)
47
48/* enum definitions */
49
53typedef enum
54{
55 IFX_PUBLIC_DEVICE_ADDRESS,
56 IFX_RANDOM_DEVICE_ADDRESS
58
59/* Structure definitions*/
60
65typedef struct
66{
67 uint8_t data_len;
68 uint8_t *data;
70
76typedef struct
77{
78 uint8_t data_length;
79 uint8_t data_type;
80 uint8_t *data;
82
83/* public functions */
84
98
115 ifx_record_handle_t *handle, const uint8_t *device_addr,
116 ifx_ble_device_addr_type device_addr_type);
117
130 const ifx_ble_config_field_t *role);
131
145 ifx_record_handle_t *handle,
146 const ifx_ble_config_field_t *security_manager_tk_val);
147
161 ifx_record_handle_t *handle,
162 const ifx_ble_config_field_t *secure_conn_confirmation_val);
163
177 ifx_record_handle_t *handle,
178 const ifx_ble_config_field_t *secure_conn_random_val);
179
192 ifx_record_handle_t *handle, const ifx_ble_config_field_t *appearance);
193
206 const ifx_ble_config_field_t *flags);
207
223 ifx_record_handle_t *handle, uint8_t config_type,
224 const ifx_ble_config_field_t *local_name);
225
241 ifx_record_handle_t *handle, const ifx_record_ad_data_t *additional_data,
242 uint32_t count);
243
261 const ifx_record_handle_t *handle, uint8_t *device_addr,
262 ifx_ble_device_addr_type *device_addr_type);
263
279
295 const ifx_record_handle_t *handle,
296 ifx_ble_config_field_t *security_manager_tk_val);
297
313 const ifx_record_handle_t *handle,
314 ifx_ble_config_field_t *secure_conn_confirmation_val);
315
331 const ifx_record_handle_t *handle,
332 ifx_ble_config_field_t *secure_conn_random_val);
333
348 ifx_ble_config_field_t *appearance);
349
365
383 uint8_t *config_type,
384 ifx_ble_config_field_t *local_name);
385
403 const ifx_record_handle_t *handle, ifx_record_ad_data_t *additional_data,
404 uint32_t *count);
405
406#ifdef __cplusplus
407}
408
409#endif /* __cplusplus */
410#endif /* IFX_RECORD_BLUETOOTH_LE_H */
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_ble_set_secure_conn_random(ifx_record_handle_t *handle, const ifx_ble_config_field_t *secure_conn_random_val)
Sets the secure connections random value in the Bluetooth low energy carrier configuration record for...
ifx_status_t ifx_record_ble_get_additional_ad_data(const ifx_record_handle_t *handle, ifx_record_ad_data_t *additional_data, uint32_t *count)
Gets the array of additional AD data of the Bluetooth low energy carrier configuration record from th...
ifx_status_t ifx_record_ble_get_flags(const ifx_record_handle_t *handle, ifx_ble_config_field_t *flags)
Gets the flags of the Bluetooth low energy carrier configuration record from the given record handle.
ifx_status_t ifx_record_ble_get_secure_conn_random(const ifx_record_handle_t *handle, ifx_ble_config_field_t *secure_conn_random_val)
Gets the secure connections random value of the Bluetooth low energy carrier configuration record fro...
ifx_status_t ifx_record_ble_get_local_name(const ifx_record_handle_t *handle, uint8_t *config_type, ifx_ble_config_field_t *local_name)
Gets the local name of the Bluetooth low energy carrier configuration record from the given record ha...
ifx_status_t ifx_record_ble_set_device_addr(ifx_record_handle_t *handle, const uint8_t *device_addr, ifx_ble_device_addr_type device_addr_type)
Sets the device address in the Bluetooth low energy (BLE) carrier configuration record for the given ...
ifx_status_t ifx_record_ble_get_role(const ifx_record_handle_t *handle, ifx_ble_config_field_t *role)
Gets the low energy (LE) role of the Bluetooth low energy carrier configuration record from the given...
ifx_status_t ifx_record_ble_set_flags(ifx_record_handle_t *handle, const ifx_ble_config_field_t *flags)
Sets the flags in the Bluetooth low energy carrier configuration record for the given record handle.
ifx_ble_device_addr_type
Enumeration defines the bluetooth low energy device address type.
ifx_status_t ifx_record_ble_get_appearance(const ifx_record_handle_t *handle, ifx_ble_config_field_t *appearance)
Gets the appearance of the Bluetooth low energy carrier configuration record from the given record ha...
ifx_status_t ifx_record_ble_get_security_tk_val(const ifx_record_handle_t *handle, ifx_ble_config_field_t *security_manager_tk_val)
Gets the security manager TK value of the Bluetooth low energy carrier configuration record from the ...
ifx_status_t ifx_record_ble_set_local_name(ifx_record_handle_t *handle, uint8_t config_type, const ifx_ble_config_field_t *local_name)
Sets the local name in the Bluetooth low energy carrier configuration record for the given record han...
ifx_status_t ifx_record_ble_set_security_tk_val(ifx_record_handle_t *handle, const ifx_ble_config_field_t *security_manager_tk_val)
Sets the security manager temporary key (TK) value in the Bluetooth low energy carrier configuration ...
ifx_status_t ifx_record_ble_set_role(ifx_record_handle_t *handle, const ifx_ble_config_field_t *role)
Sets the low energy (LE) role in the Bluetooth low energy carrier configuration record for the given ...
ifx_status_t ifx_record_ble_new(ifx_record_handle_t *handle)
Creates the Bluetooth low energy carrier configuration record and handle of the created record....
ifx_status_t ifx_record_ble_get_secure_conn_confirm(const ifx_record_handle_t *handle, ifx_ble_config_field_t *secure_conn_confirmation_val)
Gets the secure connections confirmation value of the Bluetooth low energy carrier configuration reco...
ifx_status_t ifx_record_ble_set_additional_ad_data(ifx_record_handle_t *handle, const ifx_record_ad_data_t *additional_data, uint32_t count)
Sets the array of additional AD data in the Bluetooth low energy carrier configuration record for the...
ifx_status_t ifx_record_ble_get_device_addr(const ifx_record_handle_t *handle, uint8_t *device_addr, ifx_ble_device_addr_type *device_addr_type)
Gets the device address of the Bluetooth low energy carrier configuration record from the given recor...
ifx_status_t ifx_record_ble_set_appearance(ifx_record_handle_t *handle, const ifx_ble_config_field_t *appearance)
Sets an appearance in the Bluetooth low energy carrier configuration record for the given record hand...
ifx_status_t ifx_record_ble_set_secure_conn_confirm(ifx_record_handle_t *handle, const ifx_ble_config_field_t *secure_conn_confirmation_val)
Sets the secure connections confirmation value in the Bluetooth low energy carrier configuration reco...
Provides utility functions and macros.
Structure defines the data structure of bluetooth low energy record such as data length and actual co...
Structure defines advertising and scan response data (AD) format. Each AD structure consists of an AD...
Defines the handle for specific record type.