nRF Connect SDK API 0.1.0
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
19#include <stddef.h>
20#include <zephyr/types.h>
21#include <nfc/ndef/record.h>
23#include <zephyr/bluetooth/bluetooth.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
30#define NFC_NDEF_LE_OOB_REC_TK_LEN 16
31
52};
53
58#define NFC_NDEF_LE_OOB_REC_APPEARANCE(value) ((uint16_t []) {value})
59
64#define NFC_NDEF_LE_OOB_REC_FLAGS(value) ((uint8_t []) {value})
65
70#define NFC_NDEF_LE_OOB_REC_LE_ROLE(value) \
71 ((enum nfc_ndef_le_oob_rec_le_role []) {value})
72
77 bt_addr_le_t *addr;
79 struct bt_le_oob_sc_data *le_sc_data;
80 uint8_t *tk_value;
81 uint16_t *appearance;
82 uint8_t *flags;
83 const char *local_name;
84};
85
106 const struct nfc_ndef_le_oob_rec_payload_desc *payload_desc, uint8_t *buff,
107 uint32_t *len);
108
124#define NFC_NDEF_LE_OOB_RECORD_DESC_DEF(name, \
125 payload_id, \
126 payload_desc) \
127 const uint8_t name##_nfc_ndef_le_oob_rec_id = (payload_id); \
128 const uint8_t name##_nfc_ndef_le_oob_rec_id_len = \
129 ((payload_id) != 0) ? 1 : 0; \
130 NFC_NDEF_GENERIC_RECORD_DESC_DEF(name, \
131 TNF_MEDIA_TYPE, \
132 &name##_nfc_ndef_le_oob_rec_id, \
133 name##_nfc_ndef_le_oob_rec_id_len, \
134 (nfc_ndef_le_oob_rec_type_field), \
135 sizeof(nfc_ndef_le_oob_rec_type_field), \
136 nfc_ndef_le_oob_rec_payload_constructor, \
137 (payload_desc))
138
144#define NFC_NDEF_LE_OOB_RECORD_DESC(NAME) NFC_NDEF_GENERIC_RECORD_DESC(NAME)
145
146#ifdef __cplusplus
147}
148#endif
149
152#endif /* NFC_NDEF_LE_OOB_REC_H_ */
nfc_ndef_le_oob_rec_le_role
LE role options.
Definition: le_oob_rec.h:35
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_PERIPH_PREFFERED
Definition: le_oob_rec.h:44
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_PERIPH_ONLY
Definition: le_oob_rec.h:37
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_CENTRAL_PREFFERED
Definition: le_oob_rec.h:49
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_OPTIONS_NUM
Definition: le_oob_rec.h:51
@ NFC_NDEF_LE_OOB_REC_LE_ROLE_CENTRAL_ONLY
Definition: le_oob_rec.h:39
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:83
uint8_t * tk_value
Definition: le_oob_rec.h:80
enum nfc_ndef_le_oob_rec_le_role * le_role
Definition: le_oob_rec.h:78
struct bt_le_oob_sc_data * le_sc_data
Definition: le_oob_rec.h:79
uint16_t * appearance
Definition: le_oob_rec.h:81
bt_addr_le_t * addr
Definition: le_oob_rec.h:77
uint8_t * flags
Definition: le_oob_rec.h:82
LE OOB record payload descriptor.
Definition: le_oob_rec.h:76