Mbed OS Reference
Loading...
Searching...
No Matches
protocols.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013-2018, ARM Limited, All Rights Reserved
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may
6 * not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17/**
18 * \file protocols.h
19 * \copyright Copyright (c) ARM Ltd 2013
20 * \author Donatien Garnier
21 * \details List of RF protocols
22 */
23
24/** \addtogroup nfc-protocols
25 * \ingroup nfc
26 * @{
27 * \name Protocols and RF configuration
28 * @{
29 */
30
31#ifndef PROTOCOLS_H_
32#define PROTOCOLS_H_
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38#include "stack/nfc_common.h"
39
40typedef enum __RF_PROTOCOL {
41 __RF_PROTOCOL_UNKNOWN = 0,
42 //Reader
43 RF_PROTOCOL_ISO_14443_A_READER,
44 RF_PROTOCOL_ISO_14443_B_READER,
45 RF_PROTOCOL_INNOVATRON_READER,
46 RF_PROTOCOL_ISO_15693_READER,
47 RF_PROTOCOL_FELICA_READER,
48 //... add other protocols here
49 RF_PROTOCOL_ISO_14443_A_TARGET,
50 RF_PROTOCOL_ISO_14443_B_TARGET,
51 RF_PROTOCOL_INNOVATRON_TARGET,
52 RF_PROTOCOL_ISO_15693_TARGET,
53 RF_PROTOCOL_FELICA_TARGET,
54 RF_PROTOCOL_ISO_DEP_TARGET, //ISO 14443-4 transport protocol
55 RF_PROTOCOL_NFC_DEP_TARGET, //NFC-IP 1 transport protocol
56 //... add other protocols here
57
58} RF_PROTOCOL;
59
60#define RF_PROTOCOL_IS_TARGET(x) ((x)>=RF_PROTOCOL_ISO_14443_A_TARGET)
61#define RF_PROTOCOL_IS_READER(x) (!RF_PROTOCOL_IS_TARGET(x))
62
63typedef uint32_t RF_OPTION;
64//These options can be ORed
65#define RF_OPTION_NONE 0x00
66#define RF_OPTION_COMPUTE_CRC 0x01
67#define RF_OPTION_COMPUTE_PARITY 0x02
68#define RF_OPTION_CHECK_CRC 0x04
69#define RF_OPTION_CHECK_PARITY 0x08
70#define RF_OPTION_CLOSE 0x10 //Last frame
71
72typedef enum __RF_BITRATE {
73 RF_BITRATE_106K = 0x00,
74 RF_BITRATE_212K = 0x01,
75 RF_BITRATE_424K = 0x02,
76 RF_BITRATE_848K = 0x03,
77
78} RF_BITRATE;
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif /* PROTOCOLS_H_ */
85
86/**
87 * @}
88 * @}
89 * */
90