7#ifndef NFC_TNEP_POLLER_
8#define NFC_TNEP_POLLER_
74 int (*
ndef_read)(uint8_t *ndef_buf, uint16_t ndef_len);
88 int (*
ndef_update)(
const uint8_t *ndef_buf, uint16_t ndef_len);
236 uint32_t max_ndef_area_size);
nfc_tnep_status_value
Service status - payload in TNEP Status Record.
Definition: base.h:37
int nfc_tnep_poller_svc_read(const struct nfc_tnep_buf *svc_buf)
Read the TNEP Service data.
void nfc_tnep_poller_cb_register(struct nfc_tnep_poller_cb *cb)
Register TNEP Poller callbacks.
int nfc_tnep_poller_on_ndef_read(const uint8_t *data, size_t len)
Indicate NDEF data read.
nfc_tnep_tag_type
NFC TNEP Tag Type.
Definition: poller.h:26
@ NFC_TNEP_TAG_TYPE_UNSUPPORTED
Definition: poller.h:28
@ NFC_TNEP_TAG_TYPE_T4T
Definition: poller.h:34
@ NFC_TNEP_TAG_TYPE_T2T
Definition: poller.h:31
int nfc_tnep_poller_svc_write(const struct nfc_ndef_msg_desc *msg, const struct nfc_tnep_buf *resp_buf)
Write the TNEP Service data.
const struct nfc_ndef_tnep_rec_svc_param * active_service_get(void)
Get the selected/active service.
int nfc_tnep_poller_api_set(const struct nfc_tnep_poller_ndef_api *api, enum nfc_tnep_tag_type tag_type)
Set NDEF API for the NFC TNEP Poller Device.
int nfc_tnep_poller_svc_deselect(void)
Deselect the TNEP Service.
int nfc_tnep_poller_init(const struct nfc_tnep_buf *tx_buf)
Initialize the NFC TNEP Poller Device.
int nfc_tnep_poller_on_ndef_write(void)
Indicate NDEF data write operation finish.
int nfc_tnep_poller_svc_search(const struct nfc_ndef_msg_desc *ndef_msg, struct nfc_ndef_tnep_rec_svc_param *param, uint8_t *cnt)
Search if NDEF Message contains TNEP Service Parameters Records.
int nfc_tnep_poller_svc_select(const struct nfc_tnep_buf *svc_buf, const struct nfc_ndef_tnep_rec_svc_param *svc, uint32_t max_ndef_area_size)
Select the TNEP Service.
NDEF message descriptor.
Definition: msg.h:30
Service Parameters in the TNEP's Initial NDEF message.
Definition: tnep_rec.h:51
size_t size
Definition: poller.h:163
uint8_t * data
Definition: poller.h:160
TNEP Poller buffer structure.
Definition: poller.h:158
void(* error)(int err)
Function called when an internal error in TNEP Poller library was detected.
Definition: poller.h:152
void(* svc_selected)(const struct nfc_ndef_tnep_rec_svc_param *param, const struct nfc_tnep_poller_msg *msg, bool timeout)
Function called when TNEP Service was selected.
Definition: poller.h:105
void(* svc_received)(const struct nfc_ndef_tnep_rec_svc_param *param, const struct nfc_tnep_poller_msg *msg, bool timeout)
Function called when TNEP Service was read.
Definition: poller.h:126
sys_snode_t node
Definition: poller.h:154
void(* svc_deselected)(void)
Function called when current active TNEP Service was deselected.
Definition: poller.h:112
void(* svc_sent)(const struct nfc_ndef_tnep_rec_svc_param *param, const struct nfc_tnep_poller_msg *rsp_msg, bool timeout)
Function called when TNEP Service was written.
Definition: poller.h:143
TNEP Poller callback structure.
Definition: poller.h:92
const struct nfc_ndef_msg_desc * msg
Definition: poller.h:50
enum nfc_tnep_status_value status
Definition: poller.h:45
TNEP Poller Message structure.
Definition: poller.h:43
int(* ndef_update)(const uint8_t *ndef_buf, uint16_t ndef_len)
Function used to write the NDEF Message.
Definition: poller.h:88
int(* ndef_read)(uint8_t *ndef_buf, uint16_t ndef_len)
Function used to read the NDEF Message.
Definition: poller.h:74
TNEP Poller API structure.
Definition: poller.h:60