7#ifndef NFC_NDEF_TNEP_REC_H_
8#define NFC_NDEF_TNEP_REC_H_
18#include <zephyr/types.h>
25#define NFC_NDEF_TNEP_REC_TYPE_LEN 2
88 uint8_t *buffer, uint32_t *len);
104 uint8_t *buffer, uint32_t *len);
120 uint8_t *buffer, uint32_t *len);
136#define NFC_TNEP_STATUS_RECORD_DESC_DEF(_name, _status) \
137 struct nfc_ndef_tnep_rec_status _name = { \
141 NFC_NDEF_GENERIC_RECORD_DESC_DEF(_name, TNF_WELL_KNOWN, \
143 nfc_ndef_tnep_rec_type_status, \
144 NFC_NDEF_TNEP_REC_TYPE_LEN, \
145 nfc_ndef_tnep_rec_status_payload,\
163#define NFC_TNEP_SERIVCE_SELECT_RECORD_DESC_DEF(_name, _uri_length, _uri) \
164 struct nfc_ndef_tnep_rec_svc_select _name = { \
165 .uri_len = _uri_length, \
169 NFC_NDEF_GENERIC_RECORD_DESC_DEF(_name, TNF_WELL_KNOWN, \
171 nfc_ndef_tnep_rec_type_svc_select, \
172 NFC_NDEF_TNEP_REC_TYPE_LEN, \
173 nfc_ndef_tnep_rec_svc_select_payload, \
197#define NFC_TNEP_SERIVCE_PARAM_RECORD_DESC_DEF(_name, _tnep_version, \
202 struct nfc_ndef_tnep_rec_svc_param _name = { \
203 .version = _tnep_version, \
204 .uri_length = _uri_length, \
206 .communication_mode = _mode, \
207 .min_time = _min_time, \
208 .max_time_ext = _max_time_ext, \
209 .max_size = _max_message_size, \
212 NFC_NDEF_GENERIC_RECORD_DESC_DEF(_name, TNF_WELL_KNOWN, \
214 nfc_ndef_tnep_rec_type_svc_param, \
215 NFC_NDEF_TNEP_REC_TYPE_LEN, \
216 nfc_ndef_tnep_rec_svc_param_payload, \
224#define NFC_NDEF_TNEP_RECORD_DESC(_name) NFC_NDEF_GENERIC_RECORD_DESC(_name)
int nfc_ndef_tnep_rec_status_payload(struct nfc_ndef_tnep_rec_status *payload_desc, uint8_t *buffer, uint32_t *len)
Payload constructor for the NDEF TNEP Status Record.
const uint8_t nfc_ndef_tnep_rec_type_svc_select[]
int nfc_ndef_tnep_rec_svc_select_payload(struct nfc_ndef_tnep_rec_svc_select *payload_desc, uint8_t *buffer, uint32_t *len)
Payload constructor for the TNEP Service Select Record.
const uint8_t nfc_ndef_tnep_rec_type_svc_param[]
int nfc_ndef_tnep_rec_svc_param_payload(struct nfc_ndef_tnep_rec_svc_param *payload_desc, uint8_t *buffer, uint32_t *len)
Payload constructor for the Service Parameter Record.
const uint8_t nfc_ndef_tnep_rec_type_status[]
uint8_t status
Definition tnep_rec.h:38
TNEP Status.
Definition tnep_rec.h:36
uint8_t communication_mode
Definition tnep_rec.h:62
const uint8_t * uri
Definition tnep_rec.h:59
uint8_t min_time
Definition tnep_rec.h:65
uint8_t uri_length
Definition tnep_rec.h:56
uint16_t max_size
Definition tnep_rec.h:71
uint8_t version
Definition tnep_rec.h:53
uint8_t max_time_ext
Definition tnep_rec.h:68
Service Parameters in the TNEP's Initial NDEF message.
Definition tnep_rec.h:51
uint8_t uri_len
Definition tnep_rec.h:44
const uint8_t * uri
Definition tnep_rec.h:47
Service structure.
Definition tnep_rec.h:42