nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
le_oob_rec.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NFC_NDEF_LE_OOB_REC_H_
8#define NFC_NDEF_LE_OOB_REC_H_
9
18#include <stddef.h>
19#include <zephyr/types.h>
20#include <nfc/ndef/record.h>
22#include <zephyr/bluetooth/bluetooth.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29#define NFC_NDEF_LE_OOB_REC_TK_LEN 16
30
52
57#define NFC_NDEF_LE_OOB_REC_APPEARANCE(value) ((uint16_t []) {value})
58
63#define NFC_NDEF_LE_OOB_REC_FLAGS(value) ((uint8_t []) {value})
64
69#define NFC_NDEF_LE_OOB_REC_LE_ROLE(value) \
70 ((enum nfc_ndef_le_oob_rec_le_role []) {value})
71
76 bt_addr_le_t *addr;
78 struct bt_le_oob_sc_data *le_sc_data;
79 uint8_t *tk_value;
80 uint16_t *appearance;
81 uint8_t *flags;
82 const char *local_name;
83};
84
105 const struct nfc_ndef_le_oob_rec_payload_desc *payload_desc, uint8_t *buff,
106 uint32_t *len);
107
123#define NFC_NDEF_LE_OOB_RECORD_DESC_DEF(name, \
124 payload_id, \
125 payload_desc) \
126 const uint8_t name##_nfc_ndef_le_oob_rec_id = (payload_id); \
127 const uint8_t name##_nfc_ndef_le_oob_rec_id_len = \
128 ((payload_id) != 0) ? 1 : 0; \
129 NFC_NDEF_GENERIC_RECORD_DESC_DEF(name, \
130 TNF_MEDIA_TYPE, \
131 &name##_nfc_ndef_le_oob_rec_id, \
132 name##_nfc_ndef_le_oob_rec_id_len, \
133 (nfc_ndef_le_oob_rec_type_field), \
134 sizeof(nfc_ndef_le_oob_rec_type_field), \
135 nfc_ndef_le_oob_rec_payload_constructor, \
136 (payload_desc))
137
143#define NFC_NDEF_LE_OOB_RECORD_DESC(NAME) NFC_NDEF_GENERIC_RECORD_DESC(NAME)
144
145#ifdef __cplusplus
146}
147#endif
148
151#endif /* NFC_NDEF_LE_OOB_REC_H_ */
nfc_ndef_le_oob_rec_le_role
LE role options.
Definition le_oob_rec.h:34
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_PERIPH_PREFFERED
Definition le_oob_rec.h:43
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_PERIPH_ONLY
Definition le_oob_rec.h:36
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_CENTRAL_PREFFERED
Definition le_oob_rec.h:48
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_OPTIONS_NUM
Definition le_oob_rec.h:50
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_CENTRAL_ONLY
Definition le_oob_rec.h:38
int nfc_ndef_le_oob_rec_payload_constructor(const struct nfc_ndef_le_oob_rec_payload_desc *payload_desc, uint8_t *buff, uint32_t *len)
Construct the payload for a Bluetooth Carrier Configuration LE Record.
const char * local_name
Definition le_oob_rec.h:82
uint8_t * tk_value
Definition le_oob_rec.h:79
enum nfc_ndef_le_oob_rec_le_role * le_role
Definition le_oob_rec.h:77
struct bt_le_oob_sc_data * le_sc_data
Definition le_oob_rec.h:78
uint16_t * appearance
Definition le_oob_rec.h:80
bt_addr_le_t * addr
Definition le_oob_rec.h:76
uint8_t * flags
Definition le_oob_rec.h:81
LE OOB record payload descriptor.
Definition le_oob_rec.h:75