nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
st25r3911b_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef ST25R3911B_H_
8#define ST25R3911B_H_
9
10#include <zephyr/types.h>
11
20#ifdef __cplusplus
21extern "C" {
22#endif
23
25#define ST25R3911B_MAX_TX_LEN 8191
26
28#define ST25R3911B_NO_THRESHOLD_ANTICOLLISION 0xFF
29
31#define ST25R3911B_MAX_THRESHOLD 0x0F
32
34#define ST25R3911B_FDT_ADJUST 64
35
37#define ST25R3911B_MASK_RECEIVER_MAX_FDT 0xFC0
38
40#define ST25R3911B_NRT_64FC_MAX 0x3FFFC0
41
43#define ST25R3911B_NRT_FC_MAX 0x4095BF6A000
44
46#define NFC_1FC_IN_64FC 64
47
49#define NFC_1FC_IN_4096FC 4096
50
63
67#define ST25R3911B_FC_TO_64FC(_fc) \
68 DIV_ROUND_UP((_fc), NFC_1FC_IN_64FC)
69
73#define ST25R3911B_FC_TO_4096FC(_fc) \
74 DIV_ROUND_UP((_fc), NFC_1FC_IN_4096FC)
75
85
95int st25r3911b_tx_len_set(uint16_t len);
96
126int st25r3911b_non_response_timer_set(uint16_t fc, bool long_range, bool emv);
127
143
162int st25r3911b_field_on(uint8_t collision_threshold, uint8_t peer_threshold,
163 uint8_t delay);
164
171
187int st25r3911b_fifo_reload_lvl_get(uint8_t *tx_lvl, uint8_t *rx_lvl);
188
201
202#ifdef __cplusplus
203}
204#endif
205
210#endif /* ST25R3911B_H_ */
int st25r3911b_init(void)
Initialize the NFC reader.
int st25r3911b_mask_receive_timer_set(uint32_t fc)
st25r3911b_leds
Definition st25r3911b_common.h:53
@ ST25R3911B_NFCA_LED
Definition st25r3911b_common.h:55
@ ST25R3911B_NFCF_LED
Definition st25r3911b_common.h:61
@ ST25R3911B_NFCB_LED
Definition st25r3911b_common.h:58
int st25r3911b_non_response_timer_set(uint16_t fc, bool long_range, bool emv)
Set NFC Reader No-Response timer.
int st25r3911b_fifo_reload_lvl_get(uint8_t *tx_lvl, uint8_t *rx_lvl)
Get NFC Reader FIFO reload level.
int st25r3911b_field_on(uint8_t collision_threshold, uint8_t peer_threshold, uint8_t delay)
Perform automatic collision resolution and switch on the NFC Reader field.
int st25r3911b_technology_led_set(enum st25r3911b_leds led, bool on)
Enable/disable NFC Reader technology LED.
int st25r3911b_rx_tx_disable(void)
Disable NFC Reader Receiver and Transceiver.
int st25r3911b_tx_len_set(uint16_t len)
Set the NFC Reader TX packet length.