1 /******************************************************************************
2  *
3  *  Copyright (C) 2012-2014 Broadcom Corporation
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may 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,
13  *  WITHOUT 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 
19 /******************************************************************************
20  *
21  *  This file contains the Broadcom-specific defintions that are shared
22  *  between HAL, nfc stack, adaptation layer and applications.
23  *
24  ******************************************************************************/
25 
26 #ifndef NFC_BRCM_DEFS_H
27 #define NFC_BRCM_DEFS_H
28 
29 /**********************************************
30  * NCI Message Proprietary  Group       - F
31  **********************************************/
32 #define NCI_MSG_GET_BUILD_INFO 0x04
33 #define NCI_MSG_HCI_NETWK 0x05
34 #define NCI_MSG_POWER_LEVEL 0x08
35 #define NCI_MSG_UICC_READER_ACTION 0x0A
36 /* reset HCI network/close all pipes (S,D) register */
37 #define NCI_MSG_GET_NV_DEVICE 0x24
38 #define NCI_MSG_LPTD 0x25
39 #define NCI_MSG_EEPROM_RW 0x29
40 #define NCI_MSG_GET_PATCH_VERSION 0x2D
41 #define NCI_MSG_SECURE_PATCH_DOWNLOAD 0x2E
42 
43 /* Secure Patch Download definitions (patch type definitions) */
44 #define NCI_SPD_TYPE_HEADER 0x00
45 
46 /**********************************************
47  * NCI Interface Types
48  **********************************************/
49 #define NCI_INTERFACE_VS_MIFARE NCI_PROTOCOL_MIFARE
50 #define NCI_INTERFACE_VS_T2T_CE 0x82 /* for Card Emulation side */
51 
52 #define NFC_SNOOZE_MODE_UART 0x01    /* Snooze mode for UART    */
53 
54 #define NFC_SNOOZE_ACTIVE_LOW 0x00  /* high to low voltage is asserting */
55 
56 /**********************************************
57  * HCI definitions
58  **********************************************/
59 #define NFC_HAL_HCI_SESSION_ID_LEN 8
60 #define NFC_HAL_HCI_SYNC_ID_LEN 2
61 
62 /* Card emulation RF Gate A definitions */
63 #define NFC_HAL_HCI_CE_RF_A_UID_REG_LEN 10
64 #define NFC_HAL_HCI_CE_RF_A_ATQA_RSP_CODE_LEN 2
65 #define NFC_HAL_HCI_CE_RF_A_MAX_HIST_DATA_LEN 15
66 #define NFC_HAL_HCI_CE_RF_A_MAX_DATA_RATE_LEN 3
67 
68 /* Card emulation RF Gate B definitions */
69 #define NFC_HAL_HCI_CE_RF_B_PUPI_LEN 4
70 #define NFC_HAL_HCI_CE_RF_B_ATQB_LEN 4
71 #define NFC_HAL_HCI_CE_RF_B_HIGHER_LAYER_RSP_LEN 61
72 #define NFC_HAL_HCI_CE_RF_B_MAX_DATA_RATE_LEN 3
73 
74 /* Card emulation RF Gate BP definitions */
75 #define NFC_HAL_HCI_CE_RF_BP_MAX_PAT_IN_LEN 8
76 #define NFC_HAL_HCI_CE_RF_BP_DATA_OUT_LEN 40
77 
78 /* Reader RF Gate A definitions */
79 #define NFC_HAL_HCI_RD_RF_B_HIGHER_LAYER_DATA_LEN 61
80 
81 /* DH HCI Network command definitions */
82 #define NFC_HAL_HCI_DH_MAX_DYN_PIPES 20
83 
84 #endif /* NFC_BRCM_DEFS_H */
85