Home | History | Annotate | Download | only in include
      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 0x80
     50 #define NCI_INTERFACE_VS_T2T_CE 0x82 /* for Card Emulation side */
     51 
     52 /**********************************************
     53  * NCI Proprietary Parameter IDs
     54  **********************************************/
     55 #define NCI_PARAM_ID_HOST_LISTEN_MASK 0xA2
     56 #define NCI_PARAM_ID_TAGSNIFF_CFG 0xB9
     57 #define NCI_PARAM_ID_ACT_ORDER 0xC5
     58 
     59 #define NFC_SNOOZE_MODE_UART 0x01    /* Snooze mode for UART    */
     60 
     61 #define NFC_SNOOZE_ACTIVE_LOW 0x00  /* high to low voltage is asserting */
     62 
     63 /**********************************************
     64  * HCI definitions
     65  **********************************************/
     66 #define NFC_HAL_HCI_SESSION_ID_LEN 8
     67 #define NFC_HAL_HCI_SYNC_ID_LEN 2
     68 
     69 /* Card emulation RF Gate A definitions */
     70 #define NFC_HAL_HCI_CE_RF_A_UID_REG_LEN 10
     71 #define NFC_HAL_HCI_CE_RF_A_ATQA_RSP_CODE_LEN 2
     72 #define NFC_HAL_HCI_CE_RF_A_MAX_HIST_DATA_LEN 15
     73 #define NFC_HAL_HCI_CE_RF_A_MAX_DATA_RATE_LEN 3
     74 
     75 /* Card emulation RF Gate B definitions */
     76 #define NFC_HAL_HCI_CE_RF_B_PUPI_LEN 4
     77 #define NFC_HAL_HCI_CE_RF_B_ATQB_LEN 4
     78 #define NFC_HAL_HCI_CE_RF_B_HIGHER_LAYER_RSP_LEN 61
     79 #define NFC_HAL_HCI_CE_RF_B_MAX_DATA_RATE_LEN 3
     80 
     81 /* Card emulation RF Gate BP definitions */
     82 #define NFC_HAL_HCI_CE_RF_BP_MAX_PAT_IN_LEN 8
     83 #define NFC_HAL_HCI_CE_RF_BP_DATA_OUT_LEN 40
     84 
     85 /* Reader RF Gate A definitions */
     86 #define NFC_HAL_HCI_RD_RF_B_HIGHER_LAYER_DATA_LEN 61
     87 
     88 /* DH HCI Network command definitions */
     89 #define NFC_HAL_HCI_DH_MAX_DYN_PIPES 20
     90 
     91 #endif /* NFC_BRCM_DEFS_H */
     92