15d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
25d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Copyright (C) 2010 NXP Semiconductors
35d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
45d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Licensed under the Apache License, Version 2.0 (the "License");
55d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * you may not use this file except in compliance with the License.
65d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * You may obtain a copy of the License at
75d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
85d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *      http://www.apache.org/licenses/LICENSE-2.0
95d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Unless required by applicable law or agreed to in writing, software
115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * distributed under the License is distributed on an "AS IS" BASIS,
125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * See the License for the specific language governing permissions and
145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * limitations under the License.
155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*!
185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* =========================================================================== *
195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \file  phHciNfc_SWP .h                                                          *
225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief HCI wired interface gate Management Routines.                        *
235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* Project: NFC-FRI-1.1                                                        *
265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Date: Fri Aug 14 17:01:28 2009 $                                                                   *
285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Author: ing04880 $                                                                 *
295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Revision: 1.15 $                                                               *
305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Aliases: NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $                                                                *
315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* =========================================================================== *
335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef PHHCINFC_SWP_H
355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_SWP_H
365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \name HCI
395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * File: \ref phHciNfc_SWP.h
415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@{*/
445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_SWPRED_FILEREVISION "$Revision: 1.15 $" /**< \ingroup grp_file_attributes */
455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_SWPREDINTERFACE_FILEALIASES  "$Aliases: NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $"   /**< \ingroup grp_file_attributes */
465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/****************************** Header File Inclusion *****************************/
495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <phHciNfc_Generic.h>
505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/******************************* Macro Definitions ********************************/
525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Kb/sec */
545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define UICC_REF_BITRATE            (106U)
555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define UICC_MAX_CONNECT_RETRY      (0x02U)
565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* SWP switch mode event parameters */
585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define UICC_SWITCH_MODE_OFF        (0x00U)
595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define UICC_SWITCH_MODE_DEFAULT    (0x01U)
605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define UICC_SWITCH_MODE_ON         (0x02U)
615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/******************** Enumeration and Structure Definition ***********************/
635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_SWP_Seq{
655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SWP_INVALID_SEQUENCE = 0x00U,
665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SWP_MODE_SEQ,
675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SWP_STATUS_SEQ,
685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SWP_END_SEQ
695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_SWP_Seq_t;
705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_SWP_Status{
725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_NOT_CONNECTED          =   0x00U,
735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_CONNECTION_ONGOING,
745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_CONNECTED,
755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_CONNECTION_LOST,
765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_DISCONNECTION_ONGOING,
775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_CONNECTION_FAILED
785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_SWP_Status_t;
795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Information structure for  SWP  Gate */
825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_SWP_Info{
835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Pointer to SWP gate pipe information */
855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_Pipe_Info_t            *p_pipe_info;
865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* SWP gate pipe Identified             */
875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                         pipe_id;
885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /*Current internal Sequence type        */
895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_SWP_Seq_t              current_seq;
905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /*Current next Sequence ID          */
915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_SWP_Seq_t              next_seq;
925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_SWP_Status_t           uicc_status;
945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                         uicc_bitrate;
965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phHciNfc_SWP_Info_t;
985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/************************ Function Prototype Declaration *************************/
1005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*!
1015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \brief Allocates the resources required for  SWP gate management.
1025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * This function Allocates necessary resources as requiered by SWP gate management
1045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \param[in]  psHciContext            psHciContext is the pointer to HCI Layer
1065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \retval NFCSTATUS_SUCCESS           Function execution is successful
1085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \retval NFCSTATUS_INVALID_PARAMETER One or more of the given inputs are not valid
1105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
1125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
1135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Init_Resources(phHciNfc_sContext_t  *psHciContext);
1145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
1165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
1175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief Allocates the resources required for  SWP gate management.
1195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function Allocates necessary resources as requiered by SWP gate management
1215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext            psHciContext is the pointer to HCI Layer
1235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS           Function execution is successful
1255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER One or more of the given inputs are not valid
1275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
1285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
1305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
1315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWPMgmt_Initialise(
1325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phHciNfc_sContext_t     *psHciContext,
1335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                void                    *pHwRef
1345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                         );
1355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
1375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
1385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief updates SWP gate specific pipe information .
1405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function  intialises gate specific informations like pipe id,
1425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* event handler and response handler etc.
1435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext          psHciContext is the pointer to HCI Layer
1455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pipeID                pipeID of the SWP management Gate
1465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pPipeInfo             Update the pipe Information of the SWP
1475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                   Management Gate.
1485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS           Function execution is successful
1505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER One or more of the given inputs are not valid
1525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
1535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
1545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
1555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Update_PipeInfo(
1565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                  phHciNfc_sContext_t     *psHciContext,
1575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                  uint8_t                 pipeID,
1585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                  phHciNfc_Pipe_Info_t    *pPipeInfo
1595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                  );
1605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
1615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
1625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief updates SWP gate specific pipe information .
1645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function  intialises gate specific informations like pipe id,
1665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* event handler and response handler etc.
1675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext            psHciContext is the pointer to HCI Layer
1695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS           Function execution is successful
1715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER One or more of the given inputs are not valid
1735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
1745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
1765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
1775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Get_PipeID(
1785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                       phHciNfc_sContext_t        *psHciContext,
1795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                       uint8_t                    *ppipe_id
1805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                       );
1815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
1835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
1845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief Enables /disables SWP mode .
1865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function  enables/disables SWP link associated with UICC.
1885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
1915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pHwRef                    pHwRef is underlying Hardware context.
1935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  enable_type               0 means disable ,1 means enable SWP link.
1955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
1965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
1975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
1985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
1995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
2005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
2015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Configure_Default(
2025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *psHciHandle,
2035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *pHwRef,
2045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t     enable_type
2055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        );
2065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
2095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief Enables /disables SWP mode .
2115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function  enables/disables SWP link associated with UICC.
2135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
2165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pHwRef                    pHwRef is underlying Hardware context.
2185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  mode                      TRUE Enable Protection.
2205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
2215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
2235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
2245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
2255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
2265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Protection(
2275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *psHciHandle,
2285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *pHwRef,
2295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t     mode
2305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        );
2315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
2355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief To send the switch mode event
2375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function send an event to change the switch mode.
2395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
2425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pHwRef                    pHwRef is underlying Hardware context.
2445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  uicc_mode                 UICC_SWITCH_MODE_OFF
2465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                       UICC_SWITCH_MODE_DEFAULT
2475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                       UICC_SWITCH_MODE_ON
2485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
2495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
2515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
2525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
2535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
2545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Configure_Mode(
2555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                              void              *psHciHandle,
2565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                              void              *pHwRef,
2575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                              uint8_t           uicc_mode
2585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                          );
2595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
2625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief To get the status of the UICC
2645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function reads the status of the UICC. The status value can be any
2665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* of the values present in the \ref phHciNfc_SWP_Status_t
2675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
2705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pHwRef                    pHwRef is underlying Hardware context.
2725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
2735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
2755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
2765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
2775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
2785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Get_Status(
2795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *psHciHandle,
2805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *pHwRef
2815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        );
2825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
2855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief To get the bitrate
2875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function reads the bitrate
2895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
2925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pHwRef                    pHwRef is underlying Hardware context.
2945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
2955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
2965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
2975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
2985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
2995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
3005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Get_Bitrate(
3015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *psHciHandle,
3025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void        *pHwRef
3035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        );
3045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
3065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
3075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief To update the sequence
3095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function reads the bitrate
3115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
3145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  SWP_seq                   SWP sequence.
3165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
3185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
3195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
3205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
3215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
3225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Update_Sequence(
3235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phHciNfc_sContext_t     *psHciContext,
3245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phHciNfc_eSeqType_t     SWP_seq
3255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                             );
3265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
3285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \ingroup grp_hci_nfc
3295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief To configure default mode and the default status.
3315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* This function configures default status and default mode.
3335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  psHciContext              psHciContext is pointer to HCI Layer
3365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  pHwRef                    pHwRef is underlying Hardware context.
3375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \param[in]  ps_emulation_cfg          emulation configuration info.
3385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_SUCCESS             Function execution is successful
3415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
3425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \retval NFCSTATUS_INVALID_PARAMETER   One or more of the given inputs are not valid
3435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
3445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
3455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
3465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_SWP_Config_Sequence(
3475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t     *psHciContext,
3485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
3495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHal_sEmulationCfg_t   *ps_emulation_cfg
3505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        );
3515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif /* #ifndef PHHCINFC_SWP_H */
3545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
356