nci.h (9a64e8e0ace51b309fdcff4b4754b3649250382a) | nci.h (7e0352306f6869b442a574a8e691f126c9fe930a) |
---|---|
1/* 2 * The NFC Controller Interface is the communication protocol between an 3 * NFC Controller (NFCC) and a Device Host (DH). 4 * 5 * Copyright (C) 2011 Texas Instruments, Inc. 6 * 7 * Written by Ilan Elias <ilane@ti.com> 8 * --- 18 unchanged lines hidden (view full) --- 27 28#ifndef __NCI_H 29#define __NCI_H 30 31/* NCI constants */ 32#define NCI_MAX_NUM_MAPPING_CONFIGS 10 33#define NCI_MAX_NUM_RF_CONFIGS 10 34#define NCI_MAX_NUM_CONN 10 | 1/* 2 * The NFC Controller Interface is the communication protocol between an 3 * NFC Controller (NFCC) and a Device Host (DH). 4 * 5 * Copyright (C) 2011 Texas Instruments, Inc. 6 * 7 * Written by Ilan Elias <ilane@ti.com> 8 * --- 18 unchanged lines hidden (view full) --- 27 28#ifndef __NCI_H 29#define __NCI_H 30 31/* NCI constants */ 32#define NCI_MAX_NUM_MAPPING_CONFIGS 10 33#define NCI_MAX_NUM_RF_CONFIGS 10 34#define NCI_MAX_NUM_CONN 10 |
35#define NCI_MAX_PARAM_LEN 251 |
|
35 36/* NCI Status Codes */ 37#define NCI_STATUS_OK 0x00 38#define NCI_STATUS_REJECTED 0x01 39#define NCI_STATUS_RF_FRAME_CORRUPTED 0x02 40#define NCI_STATUS_FAILED 0x03 41#define NCI_STATUS_NOT_INITIALIZED 0x04 42#define NCI_STATUS_SYNTAX_ERROR 0x05 --- 54 unchanged lines hidden (view full) --- 97#define NCI_RF_PROTOCOL_NFC_DEP 0x05 98 99/* NCI RF Interfaces */ 100#define NCI_RF_INTERFACE_NFCEE_DIRECT 0x00 101#define NCI_RF_INTERFACE_FRAME 0x01 102#define NCI_RF_INTERFACE_ISO_DEP 0x02 103#define NCI_RF_INTERFACE_NFC_DEP 0x03 104 | 36 37/* NCI Status Codes */ 38#define NCI_STATUS_OK 0x00 39#define NCI_STATUS_REJECTED 0x01 40#define NCI_STATUS_RF_FRAME_CORRUPTED 0x02 41#define NCI_STATUS_FAILED 0x03 42#define NCI_STATUS_NOT_INITIALIZED 0x04 43#define NCI_STATUS_SYNTAX_ERROR 0x05 --- 54 unchanged lines hidden (view full) --- 98#define NCI_RF_PROTOCOL_NFC_DEP 0x05 99 100/* NCI RF Interfaces */ 101#define NCI_RF_INTERFACE_NFCEE_DIRECT 0x00 102#define NCI_RF_INTERFACE_FRAME 0x01 103#define NCI_RF_INTERFACE_ISO_DEP 0x02 104#define NCI_RF_INTERFACE_NFC_DEP 0x03 105 |
106/* NCI Configuration Parameter Tags */ 107#define NCI_PN_ATR_REQ_GEN_BYTES 0x29 108 |
|
105/* NCI Reset types */ 106#define NCI_RESET_TYPE_KEEP_CONFIG 0x00 107#define NCI_RESET_TYPE_RESET_CONFIG 0x01 108 109/* NCI Static RF connection ID */ 110#define NCI_STATIC_RF_CONN_ID 0x00 111 112/* NCI Data Flow Control */ --- 70 unchanged lines hidden (view full) --- 183/* ------------------------ */ 184#define NCI_OP_CORE_RESET_CMD nci_opcode_pack(NCI_GID_CORE, 0x00) 185struct nci_core_reset_cmd { 186 __u8 reset_type; 187} __packed; 188 189#define NCI_OP_CORE_INIT_CMD nci_opcode_pack(NCI_GID_CORE, 0x01) 190 | 109/* NCI Reset types */ 110#define NCI_RESET_TYPE_KEEP_CONFIG 0x00 111#define NCI_RESET_TYPE_RESET_CONFIG 0x01 112 113/* NCI Static RF connection ID */ 114#define NCI_STATIC_RF_CONN_ID 0x00 115 116/* NCI Data Flow Control */ --- 70 unchanged lines hidden (view full) --- 187/* ------------------------ */ 188#define NCI_OP_CORE_RESET_CMD nci_opcode_pack(NCI_GID_CORE, 0x00) 189struct nci_core_reset_cmd { 190 __u8 reset_type; 191} __packed; 192 193#define NCI_OP_CORE_INIT_CMD nci_opcode_pack(NCI_GID_CORE, 0x01) 194 |
195#define NCI_OP_CORE_SET_CONFIG_CMD nci_opcode_pack(NCI_GID_CORE, 0x02) 196struct set_config_param { 197 __u8 id; 198 __u8 len; 199 __u8 val[NCI_MAX_PARAM_LEN]; 200} __packed; 201 202struct nci_core_set_config_cmd { 203 __u8 num_params; 204 struct set_config_param param; /* support 1 param per cmd is enough */ 205} __packed; 206 |
|
191#define NCI_OP_RF_DISCOVER_MAP_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) 192struct disc_map_config { 193 __u8 rf_protocol; 194 __u8 mode; 195 __u8 rf_interface; 196} __packed; 197 198struct nci_rf_disc_map_cmd { --- 48 unchanged lines hidden (view full) --- 247 __u8 max_logical_connections; 248 __le16 max_routing_table_size; 249 __u8 max_ctrl_pkt_payload_len; 250 __le16 max_size_for_large_params; 251 __u8 manufact_id; 252 __le32 manufact_specific_info; 253} __packed; 254 | 207#define NCI_OP_RF_DISCOVER_MAP_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) 208struct disc_map_config { 209 __u8 rf_protocol; 210 __u8 mode; 211 __u8 rf_interface; 212} __packed; 213 214struct nci_rf_disc_map_cmd { --- 48 unchanged lines hidden (view full) --- 263 __u8 max_logical_connections; 264 __le16 max_routing_table_size; 265 __u8 max_ctrl_pkt_payload_len; 266 __le16 max_size_for_large_params; 267 __u8 manufact_id; 268 __le32 manufact_specific_info; 269} __packed; 270 |
271#define NCI_OP_CORE_SET_CONFIG_RSP nci_opcode_pack(NCI_GID_CORE, 0x02) 272struct nci_core_set_config_rsp { 273 __u8 status; 274 __u8 num_params; 275 __u8 params_id[0]; /* variable size array */ 276} __packed; 277 |
|
255#define NCI_OP_RF_DISCOVER_MAP_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) 256 257#define NCI_OP_RF_DISCOVER_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x03) 258 259#define NCI_OP_RF_DISCOVER_SELECT_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x04) 260 261#define NCI_OP_RF_DEACTIVATE_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x06) 262 --- 102 unchanged lines hidden --- | 278#define NCI_OP_RF_DISCOVER_MAP_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) 279 280#define NCI_OP_RF_DISCOVER_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x03) 281 282#define NCI_OP_RF_DISCOVER_SELECT_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x04) 283 284#define NCI_OP_RF_DEACTIVATE_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x06) 285 --- 102 unchanged lines hidden --- |