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_Generic.h                                                   *
225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* \brief Common HCI Header for the Generic HCI Management.                    *
235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* Project: NFC-FRI-1.1                                                        *
265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*                                                                             *
275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Date: Mon Mar 29 17:34:47 2010 $                                           *
285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Author: ing04880 $                                                         *
295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Revision: 1.73 $                                                           *
305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly* $Aliases: 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
355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@{*/
365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef PHHCINFC_GENERIC_H
375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_GENERIC_H
385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \name HCI
445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * File: \ref phHciNfc_Generic.h
465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@{*/
495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_GENERIC_FILEREVISION "$Revision: 1.73 $" /**< \ingroup grp_file_attributes */
505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_GENERIC_FILEALIASES  "$Aliases: 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 */
515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly***************************** Header File Inclusion ****************************
565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
5834ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly#define LOG_TAG "NFC-HCI"
5934ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly#include <cutils/log.h>
605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <phNfcIoctlCode.h>
615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include<phNfcInterface.h>
625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <phHciNfc.h>
635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly****************************** Macro Definitions *******************************
665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define Trace_buffer    phOsalNfc_DbgTraceBuffer
705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCI TRACE Macros */
725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#if defined(HCI_TRACE)&& !defined(SILENT_HCI)
735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <phOsalNfc.h>
745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <stdio.h>
755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern char phOsalNfc_DbgTraceBuffer[];
765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MAX_TRACE_BUFFER    150
775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* #define HCI_PRINT( str )  phOsalNfc_DbgTrace(str) */
785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_PRINT( str )  phOsalNfc_DbgString(str)
791f23e48e59a9d8ba8bfd60c4a4de4fb656651200Steve Block#define HCI_DEBUG(...) ALOGD(__VA_ARGS__)
8034ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly
8134ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly
8234ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly
8334ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly
845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_PRINT_BUFFER(msg,buf,len)               \
855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    {                                               \
8634ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly        snprintf(Trace_buffer,MAX_TRACE_BUFFER,"\t %s:",msg); \
875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        phOsalNfc_DbgString(Trace_buffer);              \
885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        phOsalNfc_DbgTrace(buf,len);                \
895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        phOsalNfc_DbgString("\r");                  \
905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    \
915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    }
925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <phDbgTrace.h>
945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#if defined(PHDBG_TRACES) && !defined(HCI_TRACE)
955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_PRINT( str )  PHDBG_INFO(str)
965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_DEBUG(str, arg)
975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_PRINT_BUFFER(msg,buf,len)
985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_PRINT( str )
10034ff48f6cd6595a899e05fbd56f4c84891840d3fNick Pelly#define HCI_DEBUG(...)
1015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCI_PRINT_BUFFER(msg,buf,len)
1025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif  /* #if defined(PHDBG_TRACES) */
1035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* #if defined(PHDBG_INFO) && defined (PHDBG_CRITICAL_ERROR) */
1045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif /* #if defined(HCI_TRACE) */
1065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ZERO                        0x00U
1085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef MASK_BITS
1115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define BYTE_SIZE                   0x08U
1125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCI GET and SET BITS Macros */
1145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MASK_BITS8(p,l) \
1155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                         ( ( (((uint8_t)(p))+((uint8_t)(l)))<=BYTE_SIZE )? \
1165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                          (~(0xFFU<<((p)+(l))) & (0xFFU<<(p))):(0U) )
1175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef MASK_BITS
1185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define GET_BITS8(num,p,l) \
1195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                          ( ((((uint8_t)(p))+((uint8_t)(l)))<=BYTE_SIZE)? \
1205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                           (((num)& (MASK_BITS8(p,l)))>>(p)):(0U) )
1215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
1225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define GET_BITS8(num,p,l) \
1235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                          ( ((((p)+(l))<=BYTE_SIZE))? \
1245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                           (((num)>>(p))& (~(0xFFU<<(l)))):(0U) )
1255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
1265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define SET_BITS8(num,p,l,val) \
1275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                         (  ((((uint8_t)(p))+((uint8_t)(l)))<=BYTE_SIZE)? \
1285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                           (((num)& (~MASK_BITS8(p,l)))|((val)<<(p))):(0U))
1295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
1315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    The Corresponding HCI Gate Not Supported.
1345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_HCI_GATE_NOT_SUPPORTED    (0x71U)
1365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    Invalid Command from the HCI Layer
1395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_INVALID_HCI_COMMAND       (0x72U)
1415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI Command not supported . */
1445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_COMMAND_NOT_SUPPORTED     (0x73U)
1455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    Invalide Response from the HCI Layer
1485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_INVALID_HCI_RESPONSE      (0x74U)
1505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    The Invalid Instruction type (Neither Command/Response nor Event ).
1535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_INVALID_HCI_INSTRUCTION   (0x75U)
1555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    The Invalid Instruction type (Neither Command/Response nor Event ).
1585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_INVALID_HCI_INFORMATION   (0x76U)
1605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    The Invalid HCI Sequence.
1635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_INVALID_HCI_SEQUENCE      (0x78U)
1655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hci_retval
1685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    The HCI Error Response with Response code.
1695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCSTATUS_HCI_RESPONSE(code)        (code)
1715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Length of the HCP and the HCP Message Header in Bytes */
1745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_HEADER_LEN          0x02U
1755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Length of the HCP Message Header in Bytes */
1775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MESSAGE_LEN         0x01U
1785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Header Chaining Bit Offset */
1805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_CHAINBIT_OFFSET     0x07U
1815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Header Chaining Bit Length */
1825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_CHAINBIT_LEN        0x01U
1835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Chaining Bit Values */
1855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_CHAINBIT_DEFAULT    0x01U
1865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_CHAINBIT_BEGIN      0x00U
1875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_CHAINBIT_END        HCP_CHAINBIT_DEFAULT
1885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Header Pipe ID Offset */
1905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_PIPEID_OFFSET       0x00U
1915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Header Pipe ID Length */
1925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_PIPEID_LEN          0x07U
1935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Message Header Type  Offset */
1955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_TYPE_OFFSET     0x06U
1965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Message Header Type Length */
1975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_TYPE_LEN        0x02U
1985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Message Type Values */
2005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_TYPE_COMMAND        0x00U
2015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_TYPE_EVENT          0x01U
2025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_TYPE_RESPONSE       0x02U
2035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_TYPE_RESERVED       0x03U
2045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Message Header Instruction  Offset */
2065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_INSTRUCTION_OFFSET  0x00U
2075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Message Header Instruction Length */
2085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_INSTRUCTION_LEN     0x06U
2095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Invalid Message Instruction */
2105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_MSG_INSTRUCTION_INVALID 0x3FU
2115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* HCP Packet Zero Length */
2145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define HCP_ZERO_LEN                0x00U
2155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Generic HCI Commands for all the Gates */
2195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_SET_PARAMETER                   0x01U
2205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_GET_PARAMETER                   0x02U
2215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_OPEN_PIPE                       0x03U
2225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_CLOSE_PIPE                      0x04U
2235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_GENERIC_CMD_RFU_B               0x05U
2245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_GENERIC_CMD_RFU_E               0x0FU
2255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
2275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  0x05-0x0F is Reserved for Future Use
2285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \internal HCI Administration Com mands for the Management of the Host Network */
2315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_CREATE_PIPE                     0x10U
2335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_DELETE_PIPE                     0x11U
2345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_NOTIFY_PIPE_CREATED             0x12U
2355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_NOTIFY_PIPE_DELETED             0x13U
2365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_CLEAR_ALL_PIPE                  0x14U
2375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_NOTIFY_ALL_PIPE_CLEARED         0x15U
2385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_CMD_RFU_B                       0x16U
2395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ADM_CMD_RFU_E                       0x3FU
2405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MSG_INSTRUCTION_UNKNWON             0x3FU
2425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /*
2445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  0x16-0x3F is Reserved for Future Use
2455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     */
2465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \internal HCI Generic Responses from the Gates */
2495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_OK                              0x00U
2505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_NOT_CONNECTED                 0x01U
2515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_CMD_PAR_UNKNOWN               0x02U
2525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_NOK                           0x03U
2535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_PIPES_FULL                    0x04U
2545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_REG_PAR_UNKNOWN               0x05U
2555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_PIPE_NOT_OPENED               0x06U
2565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_CMD_NOT_SUPPORTED             0x07U
2575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_INHIBITED                     0x08U
2585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_TIMEOUT                       0x09U
2595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_REG_ACCESS_DENIED             0x0AU
2605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ANY_E_PIPE_ACCESS_DENIED            0x0BU
2615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Response Error Code for RF Reader Gate */
2635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define WR_RF_ERROR                         0x10U
2645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
2665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  0x08, 0x0B-0x3F is Reserved for Future Use
2675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
2685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \internal HCI Generic Events from the Gates */
2715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define EVT_HCI_END_OF_OPERATION    0x01
2725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define EVT_POST_DATA               0x02
2735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define EVT_HOT_PLUG                0x03
2745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Maximum Buffer Size for the HCI Data */
2775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_MAX_BUFFERSIZE     (PHHAL_MAX_DATASIZE + 0x50U)
2785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_MAX_OPENPIPE       0x6FU
2805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_MAX_PIPE           0x6FU
2815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_MIN_PIPE           0x02U
2825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Maximum Payload Length of HCI. */
2855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_MAX_PACKET_DATA    0x1CU
2865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHCINFC_MAX_HCP_LEN        PHHCINFC_MAX_PACKET_DATA + 1
2875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* Maximum Payload Length of HCI. */
2915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
2945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
2955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly******************** Enumeration and Structure Definition **********************
2965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
2975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
2985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#if 1
2995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef NFCSTATUS (*pphHciNfc_Pipe_Receive_t) (
3005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                void *pContext,
3015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                void *pHwRef,
3025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                uint8_t *data,
3035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef ONE_BYTE_LEN
3045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                uint8_t length
3055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
3065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                uint16_t length
3075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
3085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                        );
3095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
3105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef pphNfcIF_Transact_t pphHciNfc_Pipe_Receive_t;
3125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
3145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \defgroup grp_hci_nfc HCI Component
3165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
3195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_HostID {
3215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HostControllerID                   = 0x00U,
3225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_TerminalHostID                     = 0x01U,
3235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_UICCHostID                         = 0x02U
3245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
3255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HostID_RFU_B                       = 0x03U,
3265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HostID_RFU_E                       = 0xBFU,
3275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HostIDProprietary_B                = 0xC0U,
3285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HostIDProprietary_E                = 0xFFU
3295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
3305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_HostID_t;
3315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_GateID{
3345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_AdminGate                          = 0x00U,
3355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
3365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_evGateIDProprietary_B              = 0x01U,
3375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_evGateIDProprietary_E              = 0x03U,
3385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
3395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_LoopBackGate                       = 0x04U,
3405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_IdentityMgmtGate                   = 0x05U,
3415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_LinkMgmtGate                       = 0x06U,
3425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
3435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_GateID_RFU_B                       = 0x07U,
3445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_GateID_RFU_E                       = 0x0FU,
3455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
3465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*  TODO: Fillin Other Gate Information */
3485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* ETSI HCI Specific RF Reader Gates */
3495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_RFReaderAGate                      = 0x13,
3505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_RFReaderBGate                      = 0x11,
3515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Proprietary Reader Gate */
3535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_ISO15693Gate                       = 0x12,
3545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_RFReaderFGate                      = 0x14,
3555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_JewelReaderGate                    = 0x15,
3565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* ETSI HCI Card RF Gates */
3585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_CETypeBGate                        = 0x21,
3595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_CETypeBPrimeGate                   = 0x22,
3605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_CETypeAGate                        = 0x23,
3615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_CETypeFGate                        = 0x24,
3625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* NFC-IP1 Gates */
3645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_NFCIP1InitRFGate                   = 0x30,
3655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_NFCIP1TargetRFGate                 = 0x31,
3665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* ETSI HCI Connectivity Gate */
3685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_ConnectivityGate                   = 0x41,
3695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /*  Device Configuration Gates */
3725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_PN544MgmtGate                      = 0x90,
3735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HostCommGate                       = 0x91,
3745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_GPIOGate                           = 0x92,
3755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_RFMgmtGate                         = 0x93,
3765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_PollingLoopGate                    = 0x94,
3775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_DownloadMgmtGate                   = 0x95,
3785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Card Emulation Managment Gates */
3805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_SwpMgmtGate                        = 0xA0,
3815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_NfcWIMgmtGate                      = 0xA1,
3825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_UnknownGate                        = 0xFF
3835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_GateID_t;
3855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_PipeID{
3885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_LINKMGMT_PIPE_ID                = 0x00U,
3895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_ADMIN_PIPE_ID                   = 0x01U,
3905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_DYNAMIC_PIPE_ID                 = 0x02U,
3915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_RESERVED_PIPE_ID                = 0x70U,
3925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_UNKNOWN_PIPE_ID                 = PHHCINFC_MAX_PIPE
3935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
3945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_evOtherGatePipeID_B                = 0x02U,
3955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_evOtherGatePipeID_E                = 0x6FU,
3965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_evGatePipeID_RFU_B                 = 0x70U,
3975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_evGatePipeID_RFU_E                 = 0x7FU,
3985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
3995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_PipeID_t;
4005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_eState {
4035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Reset              = 0x00U,
4045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Initialise,
4055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Test,
4065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Config,
4075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_IO,
4085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Select,
4095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Listen,
4105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Activate,
4115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Reactivate,
4125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Connect,
4135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Transact,
4145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Disconnect,
4155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Presence,
4165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Release,
4175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciState_Unknown
4185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_eState_t;
4195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_eMode {
4215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciMode_Reset               = 0x00U,
4225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciMode_Session,
4235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciMode_Override,
4245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciMode_Test,
4255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    hciMode_Unknown
4265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_eMode_t;
4275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_eSeq{
4305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Admin Sequence */
4315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    ADMIN_INIT_SEQ              = 0x00U,
4325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    ADMIN_SESSION_SEQ,
4335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    ADMIN_CE_SEQ,
4345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    ADMIN_REL_SEQ,
4355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    ADMIN_EVT_HOTPLUG_SEQ,
4365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Link Management Sequence */
4385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    LINK_MGMT_INIT_SEQ,
4395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    LINK_MGMT_REL_SEQ,
4405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Identity Management Sequence */
4425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    IDENTITY_INIT_SEQ,
4435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    IDENTITY_INFO_SEQ,
4445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    IDENTITY_REL_SEQ,
4455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Polling Loop Sequence */
4475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_INIT_SEQ,
4485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_DURATION_SEQ,
4495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_CONFIG_PHASE_SEQ,
4505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_TGT_DISABLE_SEQ,
4515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_RESTART_SEQ,
4525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_STOP_SEQ,
4535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    PL_REL_SEQ,
4545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Device Management Sequence */
4565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    DEV_INIT_SEQ,
4576dd948323de0f31b413c9f19a905f1c145c9c456Rob von Behren    DEV_HAL_INFO_SEQ,
4585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    DEV_CONFIG_SEQ,
4595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    DEV_REL_SEQ,
4605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Reader Management Sequence */
4625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_MGMT_INIT_SEQ,
4635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_ENABLE_SEQ,
4645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_SELECT_SEQ,
4655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_REACTIVATE_SEQ,
4665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_SW_AUTO_SEQ,
4675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_PRESENCE_CHK_SEQ,
4685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_UICC_DISPATCH_SEQ,
4695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_DESELECT_SEQ,
4705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_RESELECT_SEQ,
4715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_DISABLE_SEQ,
4725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    READER_MGMT_REL_SEQ,
4735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI NFC-IP1 Sequence */
4755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFCIP1_INIT_SEQ,
4765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    INITIATOR_SPEED_SEQ,
4775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    INITIATOR_GENERAL_SEQ,
4785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    TARGET_GENERAL_SEQ,
4795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    TARGET_SPEED_SEQ,
4805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFCIP1_REL_SEQ,
4815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* HCI Emulation Management Sequence */
4835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    EMULATION_INIT_SEQ,
4845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    EMULATION_SWP_SEQ,
4855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    EMULATION_CONFIG_SEQ,
4865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    EMULATION_REL_SEQ,
4875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_END_SEQ,
4895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    HCI_INVALID_SEQ
4905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phHciNfc_eSeq_t;
4915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_eSeqType{
4955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    RESET_SEQ                   = 0x00U,
4965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    INIT_SEQ,
4975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UPDATE_SEQ,
4985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    INFO_SEQ,
4995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    CONFIG_SEQ,
5005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    REL_SEQ,
5015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    END_SEQ
5025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phHciNfc_eSeqType_t;
5035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phHciNfc_eConfigType{
5065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    INVALID_CFG                 = 0x00U,
5075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    POLL_LOOP_CFG,
5085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SMX_WI_CFG,
5095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SMX_WI_MODE,
5105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    UICC_SWP_CFG,
5115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SWP_EVT_CFG,
5125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    SWP_PROTECT_CFG,
5135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_GENERAL_CFG,
5145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_TARGET_CFG,
5155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_CE_A_CFG,
5165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_CE_B_CFG
5175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phHciNfc_eConfigType_t;
5185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_HCP_Message{
5215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Identifies the Type and Kind of Instruction */
5225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     msg_header;
5235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Host Controller Protocol (HCP) Packet Message Payload */
5245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     payload[PHHCINFC_MAX_PACKET_DATA - 1];
5255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_HCP_Message_t;
5265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_HCP_Packet{
5295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Chaining Information and Pipe Identifier */
5305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     hcp_header;
5315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Host Controller Protocol (HCP) Packet Message or Payload */
5325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    union
5335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    {
5345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Host Controller Protocol (HCP) Packet Message */
5355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        phHciNfc_HCP_Message_t message;
5365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Host Controller Protocol (HCP) Packet Payload */
5375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        uint8_t payload[PHHCINFC_MAX_PACKET_DATA];
5385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    }msg;
5395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_HCP_Packet_t;
5405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_Gate_Info{
5445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Host Identifier  */
5455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     host_id;
5465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Gate Identifier  */
5475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     gate_id;
5485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_Gate_Info_t;
5495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_Pipe_Params{
5525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Source Gate Information for the pipe  */
5535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_Gate_Info_t    source;
5545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Destination Gate Information for the pipe  */
5555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_Gate_Info_t    dest;
5565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Pipe Identifier  */
5575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                 pipe_id;
5585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_Pipe_Params_t;
5595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_Pipe_Info{
5625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Structure containing the created dynamic pipe information */
5635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_Pipe_Params_t      pipe;
5645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Status of the previous command sent to this pipe */
5655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFCSTATUS                   prev_status;
5665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal previous message type Sent to this pipe */
5675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     sent_msg_type;
5685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Message type Received in this pipe */
5695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     recv_msg_type;
5705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal previous message sent to this pipe */
5715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     prev_msg;
5725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Index of the previous Set/Get Parameter command
5735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  sent to this pipe */
5745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     reg_index;
5755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal length of Parameter of the Set/Get Parameter
5765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  command sent to this pipe */
5775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint16_t                    param_length;
5785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Parameter of the Set/Get Parameter command
5795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  sent to this pipe */
5805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *param_info;
5815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to a Pipe specific Receive Response function */
5825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    pphHciNfc_Pipe_Receive_t    recv_resp;
5835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to a Pipe specific Receive Event function */
5845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    pphHciNfc_Pipe_Receive_t    recv_event;
5855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to a Pipe specific Receive Command function */
5865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    pphHciNfc_Pipe_Receive_t    recv_cmd;
5875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_Pipe_Info_t;
5885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phHciNfc_sContext{
5915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Layer Pointer from the upper layer for
5925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        lower layer function registration */
5935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfcLayer_sCfg_t           *p_hci_layer;
5945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to the upper layer context */
5955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_upper_context;
5965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to the Hardware Reference Sturcture */
5975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHal_sHwReference_t        *p_hw_ref;
5985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to the upper layer notification callback function */
5995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    pphNfcIF_Notification_CB_t  p_upper_notify;
6005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Structure to store the lower interface operations */
6015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sLowerIF_t            lower_interface;
6025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Execution Sequence using the HCI Context */
6035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile phHciNfc_eSeq_t    hci_seq;
6045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal State of the HCI Context */
6065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile phNfc_sState_t     hci_state;
6075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Mode of HCI Initialisation */
6095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_Init_t             init_mode;
6105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6116dd948323de0f31b413c9f19a905f1c145c9c456Rob von Behren    /** \internal Memory Information for HCI Initialisation */
6126dd948323de0f31b413c9f19a905f1c145c9c456Rob von Behren    uint8_t                     hal_mem_info[NXP_HAL_MEM_INFO_SIZE];
6135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Configuration Type */
6155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_eConfigType_t      config_type;
6165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI SmartMX Mode Configuration */
6175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHal_eSmartMX_Mode_t       smx_mode;
6185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Configuration Information */
6195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_config_params;
6205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Current RF Reader/Emulation Gate in Use */
6225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHal_eRFDevType_t          host_rf_type;
6235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Connected Target Information */
6255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHal_sRemoteDevInformation_t *p_target_info;
6265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Information of all the pipes created and opened */
6285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_Pipe_Info_t        *p_pipe_list[PHHCINFC_MAX_PIPE+1];
6295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Tag */
6315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_XchgInfo_t         *p_xchg_info;
6325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Information of the HCI Gates */
6345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Admin Management Gate Information */
6355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_admin_info;
6365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Link Management Gate Information */
6375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_link_mgmt_info;
6385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Identity Management Gate Information */
6395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_identity_info;
6405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Polling Loop Gate Information */
6415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_poll_loop_info;
6425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI NFC Device Management Information */
6435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_device_mgmt_info;
6445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI RF Reader Gates Management Information */
6455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_reader_mgmt_info;
6465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Card Application Gates and Emulation
6475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                  Information */
6485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_emulation_mgmt_info;
6495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI RF Reader A Gate Information */
6505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_reader_a_info;
6515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef TYPE_B
6525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI RF Reader B Gate Information */
6535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_reader_b_info;
6545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
6555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef TYPE_FELICA
6565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Felica Reader Gate Information */
6575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_felica_info;
6585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
6595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef TYPE_JEWEL
6605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Jewel Reader Gate Information */
6615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_jewel_info;
6625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
6635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef TYPE_ISO15693
6645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI ISO15693 Reader Gate Information */
6655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_iso_15693_info;
6665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
6675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef ENABLE_P2P
6695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI NFC-IP1 Peer to Peer Information */
6705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_nfcip_info;
6715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
6725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Secure Element Management Information */
6735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_wi_info;
6745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI UICC Information */
6755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_uicc_info;
6765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI SWP Information */
6775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_swp_info;
6785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef HOST_EMULATION
6795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Card Emulation A Gate Information */
6805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_ce_a_info;
6815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Card Emulation B Gate Information */
6825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void                        *p_ce_b_info;
6835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
6845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Packet Data to be sent to the lower layer */
6865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HCP_Packet_t       tx_packet;
6875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal HCI Packet Data to be received from the lower layer */
6885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phHciNfc_HCP_Packet_t       rx_packet;
6895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Previous Status (To Store the Error Status ) */
6915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFCSTATUS                   error_status;
6925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to HCI Send Buffer */
6945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     send_buffer[PHHCINFC_MAX_BUFFERSIZE];
6955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pointer to HCI Receive Buffer */
6965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     recv_buffer[PHHCINFC_MAX_BUFFERSIZE];
6975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Total Number of bytes to be Sent */
6995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           tx_total;
7005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Number of bytes Remaining to be Sent */
7015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           tx_remain;
7025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Number of bytes sent */
7035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           tx_sent;
7045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           rx_index;
7065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Total Number of bytes received */
7085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           rx_total;
7095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Number of bytes received */
7105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           rx_recvd;
7115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Index of the received data in the
7125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    *   response packet
7135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    */
7145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Send HCP Chaining Information */
7165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint8_t            tx_hcp_chaining;
7175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Send HCP  Fragment Index */
7185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           tx_hcp_frgmnt_index;
7195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Receive HCP Chaining Information */
7215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint8_t            rx_hcp_chaining;
7225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Receive HCP Fragment Index */
7235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint16_t           rx_hcp_frgmnt_index;
7245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal The Device under Test */
7265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint8_t            hci_mode;
7275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Wait for Response if Response is Pending  */
7285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint8_t            response_pending;
7295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Notify the Event if Notifcation is Pending  */
7305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    volatile uint8_t            event_pending;
7315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Pending Release of the detected Target */
7335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     target_release;
7345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phHciNfc_sContext_t;
7365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
7385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
7395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*********************** Function Prototype Declaration *************************
7405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly################################################################################
7415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
7425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
7455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
7475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Receive function receives the HCI Events or Response from the
7495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  corresponding peripheral device, described by the HCI Context Structure.
7505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
7525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
7535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
7545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
7555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[out] pdata                   Pointer to the response buffer that
7565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      receives the response read.
7575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in] length                   Variable that receives
7585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the number of bytes read.
7595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_PENDING           Data successfully read.
7615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
7625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      could not be interpreted properly.
7635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval Other errors                Other related errors
7645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
7665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
7685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
7695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Receive(
7705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        void                *psContext,
7715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        void                *pHwRef,
7725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        uint8_t             *pdata,
7735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef ONE_BYTE_LEN
7745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        uint8_t             length
7755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
7765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        uint16_t            length
7775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
7785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                );
7795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
7815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
7825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Send_Complete function acknowledges the completion of the HCI
7845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Commands sent to the device.
7855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
7875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
7885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
7895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
7905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Transaction information like
7915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      status and length after the
7925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      completion of the send.
7935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
7955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
7965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
7975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
7995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
8005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Send_Complete (
8015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *psContext,
8025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
8035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phNfc_sTransactionInfo_t *pInfo
8045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                       );
8055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
8075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
8085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Receive_Complete function acknowledges the completion of the HCI
8105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Event Information or Response received from the device.
8115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
8135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
8145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
8155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
8165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Transaction information like status
8175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      data and length after the completely
8185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      receiving the response .
8195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
8205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
8235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
8255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
8265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Receive_Complete (
8275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                void                    *psContext,
8285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                void                    *pHwRef,
8295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phNfc_sTransactionInfo_t *pInfo
8305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                          );
8315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
8335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
8345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Notify_Event function notifies the occurence of the HCI
8365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Event from the device.
8375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
8395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
8405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
8415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
8425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  type                    reason returned for the notification to
8435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI.
8445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Notification information like status
8455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      data,length etc from the lower layer
8465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to the HCI Layer.
8475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
8485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
8505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
8525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
8535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Notify_Event(
8545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *psContext,
8555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
8565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t                 type,
8575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pInfo
8585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    );
8595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
8615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
8625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Tag_Notify function notifies the the upper layer
8645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  with the Tag Specific Notifications .
8655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
8675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
8685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
8695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
8705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  type                    reason returned for the notification to
8715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI.
8725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Notification information like status
8735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      data,length etc from the lower layer
8745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to the HCI Layer.
8755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
8765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
8785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
8795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
8805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Tag_Notify(
8815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t     *psHciContext,
8825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
8835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t                 type,
8845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pInfo
8855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly               );
8865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
8885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
8895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Tag_Notify function notifies the the upper layer
8915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  with the Tag Specific Notifications .
8925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
8945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
8955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
8965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
8975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  type                    reason returned for the notification to
8985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI.
8995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Notification information like status
9005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      data,length etc from the lower layer
9015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to the HCI Layer.
9025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
9035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
9055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
9075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
9085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Target_Select_Notify(
9095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t     *psHciContext,
9105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
9115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t                 type,
9125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pInfo
9135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly               );
9145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
9175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
9185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Transceive_Notify function notifies the the upper layer
9205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  with the after the transceive operation.
9215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psContext               psContext is the context of
9235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
9245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
9255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
9265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  type                    reason returned for the notification to
9275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI.
9285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Notification information like status
9295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      data,length etc from the lower layer
9305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to the HCI Layer.
9315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
9325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
9345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
9355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
9365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Transceive_Notify(
9375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t     *psHciContext,
9385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
9395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t                 type,
9405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pInfo
9415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly               );
9425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
9445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
9455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Notify function calls the upper layer notification callback.
9475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pUpperNotify            pUpperNotify is the notification
9495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      callback of the upper HAL Layer.
9505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pUpperContext           pUpperContext is the context of
9515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the upper HAL Layer.
9525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
9535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
9545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  type                    type of the notification to
9555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the upper HAL layer.
9565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   completion information returned
9575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to the Upper HAL Layer.
9585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  NFCSTATUS_SUCCESS                   Notification successfully completed .
9595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  NFCSTATUS_INVALID_PARAMETER         One or more of the supplied parameters
9605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      could not be interpreted properly.
9615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Other errors                        Errors related to the HCI or lower layers
9625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
9645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
9665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
9685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
9695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Notify(
9705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    pphNfcIF_Notification_CB_t  p_upper_notify,
9715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    void                        *p_upper_context,
9725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    void                        *pHwRef,
9735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    uint8_t                     type,
9745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    void                        *pInfo
9755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly               );
9765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
9785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
9795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Release_Notify function Releases HCI and notifies
9815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  the upper layer.
9825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psHciContext            psHciContext is the context of
9845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
9855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
9865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
9875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  type                    reason returned for the notification to
9885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI.
9895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pInfo                   Notification information like status
9905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      data,length etc from the lower layer
9915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to the HCI Layer.
9925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
9935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
9945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
9955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
9965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
9975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Release_Notify(
9985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t     *psHciContext,
9995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
10005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t                 type,
10015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pInfo
10025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly               );
10035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
10075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
10085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Send_Generic_Cmd function sends the HCI Generic Commands
10105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  to the device.
10115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psHciContext            psHciContext is the context of
10135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
10145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
10155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
10165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pipe_id                 The pipe to which the command
10175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      is being sent.
10185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  cmd                     The HCI Generic command sent to a
10195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      particular pipe .
10205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_PENDING           HCI Generic Command send in progress .
10225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval
10235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  NFCSTATUS_INSUFFICIENT_RESOURCES    The memory could not be allocated
10245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      as required amount of memory
10255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      is not sufficient.
10265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
10285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
10305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
10315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Send_Generic_Cmd (
10325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phHciNfc_sContext_t *psHciContext,
10335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                void                *pHwRef,
10345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t             pipe_id,
10355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t             cmd
10365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    );
10375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
10395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
10405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Set_Param function configures the Gate specific register
10425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  with the provided value.
10435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psHciContext            psHciContext is the context of
10455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
10465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
10475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
10485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  p_pipe_info             Pointer to pipe specific information.
10495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  reg_index               Index of the register to be
10505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      configured .
10515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  p_param                 Value to the configured in
10525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      particular register.
10535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  param_length            Length of the parameter provided
10545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      for the configuration.
10555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_PENDING           HCI Set parameter in progress .
10575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval
10585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  NFCSTATUS_INVALID_HCI_INFORMATION   The Information like p_pipe_info,
10595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      p_param or param_length is invalid
10605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
10625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
10645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
10655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Set_Param (
10665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t     *psHciContext,
10675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *pHwRef,
10685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_Pipe_Info_t    *p_pipe_info,
10695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint8_t                 reg_index,
10705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                    *p_param,
10715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            uint16_t                 param_length
10725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                );
10735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
10755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
10765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Send_HCP function sends the HCI Host Control Packet
10785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Frames to the device.
10795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psHciContext            psHciContext is the context of
10815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
10825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
10835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
10845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_PENDING           HCP Frame send pending.
10865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
10875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      could not be interpreted properly.
10885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval Other errors                Other related errors
10895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
10915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
10925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
10945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
10955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Send_HCP (
10965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            phHciNfc_sContext_t *psHciContext,
10975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            void                *pHwRef
10985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                        );
10995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
11025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
11035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Build_HCPFrame function initially builds the HCP Packet Frame
11055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  with the values passed in the arguments .
11065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  hcp_packet              hcp_packet is the frame packet structure
11085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      in which the frame is populated with the
11095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      appropriate fields.
11105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  chainbit                chainbit specifies whether the following
11115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      HCP frames are chained or the frame is a
11125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      normal frame.
11135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pipe_id                 pipe_id of the pipe to which the frame has
11145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      to be sent.
11155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  msg_type                type of message sent to the pipe.
11165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  instruction             type of message instruction send to the pipe.
11175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
11195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
11215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
11245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
11255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Build_HCPFrame (
11265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phHciNfc_HCP_Packet_t *hcp_packet,
11275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t             chainbit,
11285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t             pipe_id,
11295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t             msg_type,
11305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t             instruction
11315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                      );
11325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
11345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
11355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Append_HCPFrame function Appends the HCP Packet Frame
11375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  with the values passed in the arguments .
11385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  hcp_data            hcp_data is the pointer to the HCP
11405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                  payload to which the data is to be
11415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                  appended.
11425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  hcp_index           hcp_index is the index from which
11435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                  the data source needs to be appended.
11445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  src_data            src_data that is to be appended to the
11455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                  HCP packet.
11465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  src_len             The length of the data source that is
11475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                  to be appended.
11485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
11495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
11515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
11535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
11545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly phHciNfc_Append_HCPFrame (
11555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t                 *hcp_data,
11565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint16_t                hcp_index,
11575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint8_t                 *src_data,
11585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint16_t                src_len
11595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                          );
11605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
11625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
11635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Allocate_Resource function allocates and initialises the
11655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  resource memory for the HCI layer.
11665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in] ppBuffer                 ppBuffer is the pointer to which the
11685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      resource memory is allocated.
11695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in] size                     Variable that specifies the size of
11705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the memory that needs to be created.
11715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NFCSTATUS_SUCCESS           The Resource Memory was allocated
11735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      successfully .
11745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval
11755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  NFCSTATUS_INSUFFICIENT_RESOURCES    The memory could not be allocated
11765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      as required amount of memory
11775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      is not suffient.
11785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
11805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
11825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyNFCSTATUS
11835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly phHciNfc_Allocate_Resource (
11845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                void                **ppBuffer,
11855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                uint16_t            size
11865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            );
11875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
11885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
11895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Release_Resources function releases all the resources
11915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  allocated in the HCI Layer.
11925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psHciContext            psHciContext is the context of
11945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
11955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
11975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
11985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
11995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
12005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
12015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly void
12025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly phHciNfc_Release_Resources (
12035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                phHciNfc_sContext_t **ppsHciContext
12045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                            );
12055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
12065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
12075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \ingroup grp_hci_nfc
12085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
12095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The phHciNfc_Release_Lower function initiates the release of the
12105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  lower layers.
12115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
12125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  psHciContext            psHciContext is the context of
12135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the HCI Layer.
12145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \param[in]  pHwRef                  pHwRef is the Information of
12155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *                                      the Device Interface Link .
12165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
12175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \retval NONE.
12185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
12195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
12205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
12215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyextern
12225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellyvoid
12235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick PellyphHciNfc_Release_Lower(
12245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    phHciNfc_sContext_t         *psHciContext,
12255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                    void                        *pHwRef
12265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly               );
12275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
12285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
12295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
12305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
12315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1232