2 * Copyright (C) 2010 NXP Semiconductors
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 * \file phNfcLlcpTypes.h
\r
19 * \brief NFC LLCP public types
\r
26 #ifndef PHNFCLLCPTYPES_H /* */
\r
27 #define PHNFCLLCPTYPES_H /* */
\r
29 #include <phNfcTypes.h>
\r
30 #include <phLibNfcStatus.h>
\r
32 /*=========== CONSTANTS ===========*/
\r
35 * \name LLCP default parameters.
\r
37 * Definitions for use when wanting to use default LLCP parameter values.
\r
41 #define PHFRINFC_LLCP_MIU_DEFAULT 128 /**< Default MIU value (in bytes).*/
\r
42 #define PHFRINFC_LLCP_WKS_DEFAULT 1 /**< Default WKS value (bitfield).*/
\r
43 #define PHFRINFC_LLCP_LTO_DEFAULT 10 /**< Default LTO value (in step of 10ms).*/
\r
44 #define PHFRINFC_LLCP_RW_DEFAULT 1 /**< Default RW value (in frames).*/
\r
45 #define PHFRINFC_LLCP_OPTION_DEFAULT 0 /**< Default OPTION value (in frames).*/
\r
46 #define PHFRINFC_LLCP_MIUX_DEFAULT 0 /**< Default MIUX value (in bytes) */
\r
47 #define PHFRINFC_LLCP_SN_MAX_LENGTH 255 /**< Max length value for the Service Name */
\r
48 #define PHFRINFC_LLCP_RW_MAX 15 /**< Max RW value (in frames).*/
\r
52 * \name LLCP config parameters.
\r
54 * Definitions used for internal LLCP configuration.
\r
58 #define PHFRINFC_LLCP_NB_SOCKET_MAX 10 /**< Max.number of simultaneous sockets */
\r
63 * \name Fixed value for ERROR op code.
\r
67 #define PHFRINFC_LLCP_ERR_DISCONNECTED 0x00
\r
68 #define PHFRINFC_LLCP_ERR_FRAME_REJECTED 0x01
\r
69 #define PHFRINFC_LLCP_ERR_BUSY_CONDITION 0x02
\r
70 #define PHFRINFC_LLCP_ERR_NOT_BUSY_CONDITION 0x03
\r
74 * \name Fixed value for DM op code.
\r
78 #define PHFRINFC_LLCP_DM_OPCODE_DISCONNECTED 0x00
\r
79 #define PHFRINFC_LLCP_DM_OPCODE_SAP_NOT_ACTIVE 0x01
\r
80 #define PHFRINFC_LLCP_DM_OPCODE_SAP_NOT_FOUND 0x02
\r
81 #define PHFRINFC_LLCP_DM_OPCODE_CONNECT_REJECTED 0x03
\r
82 #define PHFRINFC_LLCP_DM_OPCODE_CONNECT_NOT_ACCEPTED 0x20
\r
83 #define PHFRINFC_LLCP_DM_OPCODE_SOCKET_NOT_AVAILABLE 0x21
\r
86 /*========== ENUMERATES ===========*/
\r
88 /* Enum reperesents the different LLCP Link status*/
\r
89 typedef enum phFriNfc_LlcpMac_eLinkStatus
\r
91 phFriNfc_LlcpMac_eLinkDefault,
\r
92 phFriNfc_LlcpMac_eLinkActivated,
\r
93 phFriNfc_LlcpMac_eLinkDeactivated
\r
94 }phFriNfc_LlcpMac_eLinkStatus_t;
\r
96 /* Enum represents the different Socket types */
\r
97 typedef enum phFriNfc_LlcpTransport_eSocketType
\r
99 phFriNfc_LlcpTransport_eDefaultType,
\r
100 phFriNfc_LlcpTransport_eConnectionOriented,
\r
101 phFriNfc_LlcpTransport_eConnectionLess
\r
102 }phFriNfc_LlcpTransport_eSocketType_t;
\r
105 /*========== STRUCTURES ===========*/
\r
107 typedef struct phFriNfc_LlcpTransport_sSocketOptions
\r
109 /** The remote Maximum Information Unit Extension (NOTE: this is MIUX, not MIU !)*/
\r
112 /** The Receive Window size (4 bits)*/
\r
115 }phFriNfc_LlcpTransport_sSocketOptions_t;
\r
117 typedef struct phFriNfc_Llcp_sLinkParameters
\r
119 /** The remote Maximum Information Unit (NOTE: this is MIU, not MIUX !)*/
\r
122 /** The remote Well-Known Services*/
\r
125 /** The remote Link TimeOut (in 1/100s)*/
\r
128 /** The remote options*/
\r
131 } phFriNfc_Llcp_sLinkParameters_t;
\r