nrfxlib API
0.1.0
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
31
extern
"C"
{
32
#endif
33
35
#define NFC_PLATFORM_T2T_BUFFER_SIZE 16U
36
40
#define NFC_PLATFORM_T4T_BUFFER_SIZE 259U
41
50
typedef
void (*
nfc_lib_cb_resolve_t
)(
const
void
* p_ctx,
const
uint8_t * p_data);
51
67
nrfx_err_t
nfc_platform_setup
(
nfc_lib_cb_resolve_t
nfc_lib_cb_resolve, uint8_t * p_irq_priority);
68
69
84
nrfx_err_t
nfc_platform_nfcid1_default_bytes_get
(uint8_t *
const
p_nfcid1_buff,
85
uint32_t nfcid1_buff_len);
86
87
97
void
nfc_platform_event_handler
(nrfx_nfct_evt_t
const
* p_event);
98
99
119
void
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
140
uint8_t *
nfc_platform_buffer_alloc
(
size_t
size);
141
148
void
nfc_platform_buffer_free
(uint8_t * p_buffer);
149
150
#ifdef __cplusplus
151
}
152
#endif
153
156
#endif
/* NFC_PLATFORM_H__ */
nfc_platform_setup
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.
nfc_platform_nfcid1_default_bytes_get
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.
nfc_platform_buffer_free
void nfc_platform_buffer_free(uint8_t *p_buffer)
Free allocated buffer.
nfc_platform_cb_request
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.
nfc_platform_buffer_alloc
uint8_t * nfc_platform_buffer_alloc(size_t size)
Allocate buffer for NFC data exchange.
nfc_lib_cb_resolve_t
void(* nfc_lib_cb_resolve_t)(const void *p_ctx, const uint8_t *p_data)
Callback resolution function pointer.
Definition:
nfc_platform.h:50
nfc_platform_event_handler
void nfc_platform_event_handler(nrfx_nfct_evt_t const *p_event)
Handle NFCT events that require platform-specific actions.
nfc
include
nfc_platform.h
Generated on Thu Sep 26 2024 10:53:01 for nrfxlib API by
1.9.6