nrfxlib API 3.3.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
67int nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t * p_irq_priority);
68
69
82int nfc_platform_nfcid1_default_bytes_get(uint8_t * const p_nfcid1_buff,
83 uint32_t nfcid1_buff_len);
84
85
95void nfc_platform_event_handler(nrfx_nfct_evt_t const * p_event);
96
97
117void nfc_platform_cb_request(const void * p_ctx,
118 size_t ctx_len,
119 const uint8_t * p_data,
120 size_t data_len,
121 bool copy_data);
122
141uint8_t * nfc_platform_buffer_alloc(size_t size);
142
149void nfc_platform_buffer_free(uint8_t * p_buffer);
150
151#ifdef __cplusplus
152}
153#endif
154
157#endif /* NFC_PLATFORM_H__ */
int 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.
int nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t *p_irq_priority)
Initialize platform-specific modules required by NFC.
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.