nrfxlib API 2.8.99
Loading...
Searching...
No Matches
nfc_platform.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NFC_PLATFORM_H__
8#define NFC_PLATFORM_H__
9
27#include <stdbool.h>
28#include "nrfx_nfct.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35#define NFC_PLATFORM_T2T_BUFFER_SIZE 16U
36
40#define NFC_PLATFORM_T4T_BUFFER_SIZE 259U
41
50typedef void (* nfc_lib_cb_resolve_t)(const void * p_ctx, const uint8_t * p_data);
51
67nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t * p_irq_priority);
68
69
84nrfx_err_t nfc_platform_nfcid1_default_bytes_get(uint8_t * const p_nfcid1_buff,
85 uint32_t nfcid1_buff_len);
86
87
97void nfc_platform_event_handler(nrfx_nfct_evt_t const * p_event);
98
99
119void nfc_platform_cb_request(const void * p_ctx,
120 size_t ctx_len,
121 const uint8_t * p_data,
122 size_t data_len,
123 bool copy_data);
124
140uint8_t * nfc_platform_buffer_alloc(size_t size);
141
148void nfc_platform_buffer_free(uint8_t * p_buffer);
149
150#ifdef __cplusplus
151}
152#endif
153
156#endif /* NFC_PLATFORM_H__ */
nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t *p_irq_priority)
Initialize platform-specific modules required by NFC.
nrfx_err_t nfc_platform_nfcid1_default_bytes_get(uint8_t *const p_nfcid1_buff, uint32_t nfcid1_buff_len)
Get default bytes for NFCID1.
void nfc_platform_buffer_free(uint8_t *p_buffer)
Free allocated buffer.
void nfc_platform_cb_request(const void *p_ctx, size_t ctx_len, const uint8_t *p_data, size_t data_len, bool copy_data)
Request NFC callback.
uint8_t * nfc_platform_buffer_alloc(size_t size)
Allocate buffer for NFC data exchange.
void(* nfc_lib_cb_resolve_t)(const void *p_ctx, const uint8_t *p_data)
Callback resolution function pointer.
Definition nfc_platform.h:50
void nfc_platform_event_handler(nrfx_nfct_evt_t const *p_event)
Handle NFCT events that require platform-specific actions.