Fix for HCI credit management in NCI2.0 mode:
- Updated initial HCI credit value according to NCI specification. - Change NFC Features field in CORE_INIT_RSP structure to a bitfield - Change the flag that used for HCI static connection check.
This commit is contained in:
Родитель
b91e44963d
Коммит
f49c299399
|
@ -1759,21 +1759,28 @@ NFCSTATUS phNciNfc_GetNfccFeatures(void *pNciCtx,
|
|||
}
|
||||
else if(NULL != pNfccFeatures)
|
||||
{
|
||||
/* Get NFCC features from Init response message */
|
||||
pNfccFeatures->DiscConfigInfo.DiscFreqConfig = (pNciContext->InitRspParams.NfccFeatures.DiscConfSuprt &
|
||||
PHNCINFC_DISCFREQCONFIG_BITMASK);
|
||||
pNfccFeatures->DiscConfigInfo.DiscConfigMode = ((pNciContext->InitRspParams.NfccFeatures.DiscConfSuprt &
|
||||
PHNCINFC_DISCCONFIGMODE_BITMASK) >> 1);
|
||||
pNfccFeatures->RoutingInfo.TechnBasedRouting = ((pNciContext->InitRspParams.NfccFeatures.RoutingType &
|
||||
PHNCINFC_TECHNBASEDRTNG_BITMASK) >> 1);
|
||||
pNfccFeatures->RoutingInfo.ProtocolBasedRouting = ((pNciContext->InitRspParams.NfccFeatures.RoutingType &
|
||||
PHNCINFC_PROTOBASEDRTNG_BITMASK) >> 2);
|
||||
pNfccFeatures->RoutingInfo.AidBasedRouting = ((pNciContext->InitRspParams.NfccFeatures.RoutingType &
|
||||
PHNCINFC_AIDBASEDRTNG_BITMASK) >> 3);
|
||||
pNfccFeatures->PowerStateInfo.BatteryOffState = (pNciContext->InitRspParams.NfccFeatures.PwrOffState &
|
||||
PHNCINFC_BATTOFFSTATE_BITMASK);
|
||||
pNfccFeatures->PowerStateInfo.SwitchOffState = ((pNciContext->InitRspParams.NfccFeatures.PwrOffState &
|
||||
PHNCINFC_SWITCHOFFSTATE_BITMASK) >> 1);
|
||||
phNciNfc_sCoreNfccFeatures_t* nfccFeaturesRaw = &pNciContext->InitRspParams.NfccFeatures;
|
||||
|
||||
//
|
||||
// NCI 2.0, Section 4.2, CORE_INIT_RSP, 'NFCC Features' field
|
||||
//
|
||||
pNfccFeatures->DiscConfigInfo.DiscFreqConfig =
|
||||
(nfccFeaturesRaw->DiscoveryConfiguration & PHNCINFC_DISCOVERY_FREQUENCY_CONFIG_SUPPORTED_MASK) >> PHNCINFC_DISCOVERY_FREQUENCY_CONFIG_SUPPORTED_OFFSET;
|
||||
pNfccFeatures->DiscConfigInfo.DiscConfigMode =
|
||||
(nfccFeaturesRaw->DiscoveryConfiguration & PHNCINFC_DISCOVERY_CONFIG_MODE_MASK) >> PHNCINFC_DISCOVERY_CONFIG_MODE_OFFSET;
|
||||
|
||||
pNfccFeatures->RoutingInfo.TechnBasedRouting =
|
||||
(nfccFeaturesRaw->RoutingType & PHNCINFC_TECH_BASED_ROUTING_MASK) >> PHNCINFC_TECH_BASED_ROUTING_OFFSET;
|
||||
pNfccFeatures->RoutingInfo.ProtocolBasedRouting =
|
||||
(nfccFeaturesRaw->RoutingType & PHNCINFC_PROTO_BASED_ROUTING_MASK) >> PHNCINFC_PROTO_BASED_ROUTING_OFFSET;
|
||||
pNfccFeatures->RoutingInfo.AidBasedRouting =
|
||||
(nfccFeaturesRaw->RoutingType & PHNCINFC_AID_BASED_ROUTING_MASK) >> PHNCINFC_AID_BASED_ROUTING_OFFSET;
|
||||
|
||||
pNfccFeatures->PowerStateInfo.BatteryOffState =
|
||||
(nfccFeaturesRaw->PwrOffState & PHNCINFC_BATTERY_OFF_STATE_MASK) >> PHNCINFC_BATTERY_OFF_STATE_OFFSET;
|
||||
pNfccFeatures->PowerStateInfo.SwitchOffState =
|
||||
(nfccFeaturesRaw->PwrOffState & PHNCINFC_SWITCH_OFF_STATE_MASK) >> PHNCINFC_SWITCH_OFF_STATE_OFFSET;
|
||||
|
||||
/* Store the Manufacturer ID */
|
||||
pNfccFeatures->ManufacturerId = pNciContext->InitRspParams.ManufacturerId;
|
||||
/* Store the Manufacturer specific info */
|
||||
|
|
|
@ -12,7 +12,6 @@ static NFCSTATUS phNciNfc_Init(void *pContext);
|
|||
static NFCSTATUS phNciNfc_ProcessInitRsp(void *pContext, NFCSTATUS wStatus);
|
||||
static NFCSTATUS phNciNfc_ProcessInitRspNci1x(void *pContext, NFCSTATUS wStatus);
|
||||
static NFCSTATUS phNciNfc_ProcessInitRspNci2x(void *pContext, NFCSTATUS wStatus);
|
||||
static void phNciNfc_DelayForCreditNtfCb(void* pContext, uint8_t bCredits, NFCSTATUS status);
|
||||
static NFCSTATUS phNciNfc_CompleteInitSequence(void *pContext, NFCSTATUS wStatus);
|
||||
|
||||
static NFCSTATUS phNciNfc_DelayForResetNtfProc(void* pContext, NFCSTATUS wStatus);
|
||||
|
@ -166,7 +165,7 @@ static NFCSTATUS phNciNfc_ProcessInitRspNci2x(void *pContext, NFCSTATUS Status)
|
|||
wStatus = NFCSTATUS_SUCCESS;
|
||||
|
||||
/*NFCC Features*/
|
||||
pInitRsp->NfccFeatures.DiscConfSuprt = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.DiscoveryConfiguration = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.RoutingType = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.PwrOffState = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.Byte3 = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
|
@ -217,25 +216,18 @@ static NFCSTATUS phNciNfc_ProcessInitRspNci2x(void *pContext, NFCSTATUS Status)
|
|||
Offset += bLen + 2;
|
||||
}
|
||||
|
||||
if (wStatus == NFCSTATUS_SUCCESS && pInitRsp->DataHCIPktPayloadLen > 0)
|
||||
if (wStatus == NFCSTATUS_SUCCESS && (pInitRsp->NfccFeatures.DiscoveryConfiguration & PHNCINFC_HCI_NETWORK_SUPPORTED_MASK))
|
||||
{
|
||||
/*Note: The HciContext will be created once back in phLibNfc_InitializeProcess*/
|
||||
wStatus = phNciNfc_CreateConn(UNASSIGNED_DESTID, phNciNfc_e_NFCEE);
|
||||
if (wStatus == NFCSTATUS_SUCCESS)
|
||||
{
|
||||
wStatus = phNciNfc_UpdateConnInfo(UNASSIGNED_DESTID, phNciNfc_e_NFCEE,
|
||||
wStatus = phNciNfc_UpdateConnInfo(
|
||||
UNASSIGNED_DESTID,
|
||||
phNciNfc_e_NFCEE,
|
||||
CONNHCITYPE_STATIC,
|
||||
pInitRsp->DataHCINumCredits,
|
||||
pInitRsp->DataHCIPktPayloadLen);
|
||||
|
||||
if (wStatus == NFCSTATUS_SUCCESS &&
|
||||
pInitRsp->DataHCIPktPayloadLen > 0 &&
|
||||
pInitRsp->DataHCINumCredits == 0)
|
||||
{
|
||||
wStatus = phNciNfc_RegForConnCredits(CONNHCITYPE_STATIC,
|
||||
&phNciNfc_DelayForCreditNtfCb,
|
||||
pNciContext, PHNCINFC_MIN_WAITCREDIT_TO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,7 +281,7 @@ static NFCSTATUS phNciNfc_ProcessInitRspNci1x(void *pContext, NFCSTATUS Status)
|
|||
wStatus = NFCSTATUS_SUCCESS;
|
||||
|
||||
/*NFCC Features*/
|
||||
pInitRsp->NfccFeatures.DiscConfSuprt = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.DiscoveryConfiguration = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.RoutingType = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.PwrOffState = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
pInitRsp->NfccFeatures.Byte3 = pNciContext->RspBuffInfo.pBuff[Offset++];
|
||||
|
@ -389,40 +381,6 @@ static NFCSTATUS phNciNfc_ProcessInitRspNci1x(void *pContext, NFCSTATUS Status)
|
|||
return wStatus;
|
||||
}
|
||||
|
||||
static void phNciNfc_DelayForCreditNtfCb(void* pContext, uint8_t bCredits, NFCSTATUS status)
|
||||
{
|
||||
pphNciNfc_Context_t pNciContext = (pphNciNfc_Context_t)pContext;
|
||||
phNciNfc_TransactInfo_t tTranscInfo;
|
||||
NFCSTATUS wStatus = NFCSTATUS_SUCCESS;
|
||||
|
||||
PH_LOG_NCI_FUNC_ENTRY();
|
||||
|
||||
if ((NFCSTATUS_SUCCESS != status) || (0 == bCredits))
|
||||
{
|
||||
/* setting generic WaitCreditTimeout event to enable processing of state machine even in failure case */
|
||||
wStatus = NFCSTATUS_CREDIT_TIMEOUT;
|
||||
PH_LOG_NCI_CRIT_STR("Credits Update from NciNfc_Init Module Failed");
|
||||
phNciNfc_Notify(pNciContext, wStatus, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (NULL != pNciContext && phNciNfc_IsVersion2x(pNciContext))
|
||||
{
|
||||
tTranscInfo.pContext = (void*)pNciContext;
|
||||
tTranscInfo.pbuffer = (void*)&pNciContext->ResetInfo.ResetTypeRsp;
|
||||
tTranscInfo.wLength = sizeof(pNciContext->ResetInfo.ResetTypeRsp);
|
||||
phNciNfc_Notify(pNciContext, wStatus, (void *)&tTranscInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
wStatus = NFCSTATUS_INVALID_STATE;
|
||||
phNciNfc_Notify(pNciContext, wStatus, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
PH_LOG_NCI_FUNC_EXIT();
|
||||
}
|
||||
|
||||
static void phNciNfc_ResetNtfDelayCb(uint32_t dwTimerId, void *pContext)
|
||||
{
|
||||
pphNciNfc_Context_t pNciContext = (pphNciNfc_Context_t)pContext;
|
||||
|
|
|
@ -8,16 +8,6 @@
|
|||
|
||||
#include <phNfcStatus.h>
|
||||
|
||||
#define PHNCINFC_DISCFREQCONFIG_BITMASK (0x01)
|
||||
#define PHNCINFC_DISCCONFIGMODE_BITMASK (0x06)
|
||||
|
||||
#define PHNCINFC_TECHNBASEDRTNG_BITMASK (0x02)
|
||||
#define PHNCINFC_PROTOBASEDRTNG_BITMASK (0x04)
|
||||
#define PHNCINFC_AIDBASEDRTNG_BITMASK (0x08)
|
||||
|
||||
#define PHNCINFC_BATTOFFSTATE_BITMASK (0x01)
|
||||
#define PHNCINFC_SWITCHOFFSTATE_BITMASK (0x02)
|
||||
|
||||
extern phNciNfc_SequenceP_t gphNciNfc_InitSequence[];
|
||||
extern phNciNfc_SequenceP_t gphNciNfc_ReleaseSequence[];
|
||||
extern phNciNfc_SequenceP_t gphNciNfc_NfccResetSequence[];
|
||||
extern phNciNfc_SequenceP_t gphNciNfc_NfccResetSequence[];
|
||||
|
|
|
@ -637,48 +637,72 @@ typedef enum phNciNfc_CoreNfceeProtoInterfaces
|
|||
/**
|
||||
* \ingroup grp_nci_nfc_core
|
||||
*
|
||||
* \brief Struct to hold NFCC features supported by NFCC
|
||||
* \brief 'NFCC Features' field in CORE_INIT_RSP, 4 Octets
|
||||
* \brief NCI2.0, Section 4.2, Table 10: NFC Features
|
||||
*/
|
||||
typedef struct phNciNfc_sCoreNfccFeatures
|
||||
{
|
||||
uint8_t DiscConfSuprt; /**<Discovery configuration supported */
|
||||
#if 0
|
||||
union {
|
||||
uint8_t DiscConfSuprt;
|
||||
struct {
|
||||
uint32_t DiscFreqConf:1; /**<1b Discovery Frequency Configuration is supported by NFCC in RF_DISCOVER_CMD*/
|
||||
uint32_t DiscConfMode:2; /**<00b => Only DH Configures NFCC, 01b: NFCEE and DH both can configure NFCC*/
|
||||
uint32_t RFU:5; /**<RFU and set to 0*/
|
||||
}DiscConfigInfo;
|
||||
}Byte0
|
||||
#endif
|
||||
uint8_t RoutingType; /**<Listen mode routing types supported by NFCC */
|
||||
#if 0
|
||||
union {
|
||||
uint8_t RoutingType; /**<If no routing type is supported then NFCC does not support listen
|
||||
based routing*/
|
||||
struct {
|
||||
uint32_t RFU:1; /**<RFU and set to 0*/
|
||||
uint32_t TechBased:1; /**<Technology Based routing, if set to 1*/
|
||||
uint32_t ProtoBased:1; /**<Protocol Based routing, if set to 1*/
|
||||
uint32_t AidBased:1; /**<AID Based routing, if set to 1*/
|
||||
uint32_t RFU4:4; /**<RFU and set to 0*/
|
||||
}RoutingTypeInfo;
|
||||
}Byte1
|
||||
#endif
|
||||
uint8_t PwrOffState; /**<Power states supported by NFCC */
|
||||
#if 0
|
||||
union {
|
||||
uint8_t PwrOffState;
|
||||
struct {
|
||||
uint32_t BattOff:1; /**<Battery Off state supported if set to 1*/
|
||||
uint32_t SwtchOff:1; /**<Switch Off state supported if set to 1*/
|
||||
}PwrOffStateInfo;
|
||||
}Byte2
|
||||
#endif
|
||||
uint8_t Byte3; /**< Reserved for proprietary capabilities */
|
||||
uint8_t DiscoveryConfiguration; /**< Octet 0: Discovery configurations supported */
|
||||
uint8_t RoutingType; /**< Octet 1: Listen mode routing types supported by NFCC */
|
||||
uint8_t PwrOffState; /**< Octet 2: Power states supported by NFCC */
|
||||
uint8_t Byte3; /**< Octet 3: Reserved for proprietary capabilities */
|
||||
}phNciNfc_sCoreNfccFeatures_t, *pphNciNfc_sCoreNfccFeatures_t; /**< Pointer to #phNciNfc_sCoreNfccFeatures_t */
|
||||
|
||||
/**
|
||||
* \ingroup grp_nci_nfc_core
|
||||
*
|
||||
* \brief NCI2.0, Section 4.2, Table 10: NFC Features
|
||||
* \brief Bit mapping for values in the payload
|
||||
*/
|
||||
typedef enum phNciNfc_CoreNfccFeatures_Bitmasks
|
||||
{
|
||||
// Octet 0
|
||||
PHNCINFC_DISCOVERY_FREQUENCY_CONFIG_SUPPORTED_MASK = 0b00000001,
|
||||
PHNCINFC_DISCOVERY_CONFIG_MODE_MASK = 0b00000110,
|
||||
PHNCINFC_HCI_NETWORK_SUPPORTED_MASK = 0b00001000,
|
||||
// RFU = 0b11110000,
|
||||
|
||||
// Octet 1
|
||||
PHNCINFC_TECH_BASED_ROUTING_MASK = 0b00000010,
|
||||
PHNCINFC_PROTO_BASED_ROUTING_MASK = 0b00000100,
|
||||
PHNCINFC_AID_BASED_ROUTING_MASK = 0b00001000,
|
||||
// RFU = 0b11110001,
|
||||
|
||||
// Octet 2
|
||||
PHNCINFC_BATTERY_OFF_STATE_MASK = 0b00000001,
|
||||
PHNCINFC_SWITCH_OFF_STATE_MASK = 0b00000010,
|
||||
// RFU = 0b11111100,
|
||||
|
||||
// Octet 3
|
||||
// RFU
|
||||
} phNciNfc_CoreNfccFeatures_Bitmasks_t;
|
||||
|
||||
/**
|
||||
* \ingroup grp_nci_nfc_core
|
||||
*
|
||||
* \brief NCI2.0, Section 4.2, Table 10: NFC Features
|
||||
* \brief Bit offsets for values in the payload
|
||||
*/
|
||||
typedef enum phNciNfc_CoreNfccFeatures_BitOffsets
|
||||
{
|
||||
// Octet 0
|
||||
PHNCINFC_DISCOVERY_FREQUENCY_CONFIG_SUPPORTED_OFFSET= 0,
|
||||
PHNCINFC_DISCOVERY_CONFIG_MODE_OFFSET = 1,
|
||||
PHNCINFC_HCI_NETWORK_SUPPORTED_OFFSET = 3,
|
||||
|
||||
// Octet 1
|
||||
PHNCINFC_TECH_BASED_ROUTING_OFFSET = 1,
|
||||
PHNCINFC_PROTO_BASED_ROUTING_OFFSET = 2,
|
||||
PHNCINFC_AID_BASED_ROUTING_OFFSET = 3,
|
||||
|
||||
// Octet 2
|
||||
PHNCINFC_BATTERY_OFF_STATE_OFFSET = 0,
|
||||
PHNCINFC_SWITCH_OFF_STATE_OFFSET = 1,
|
||||
|
||||
// Octet 3
|
||||
// RFU
|
||||
} phNciNfc_CoreNfccFeatures_BitOffsets_t;
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup grp_nci_nfc_core
|
||||
|
|
|
@ -47,7 +47,7 @@ void phNciNfc_PrintCoreSetConfigCmdDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_X32MSG("Value:", (uint32_t)pBuff[bIndex+2]);
|
||||
}
|
||||
else if (pBuff[bIndex+1] > 1) {
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
WppLogHex((void*)&pBuff[bIndex+2], (uint16_t)pBuff[bIndex+1]));
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void phNciNfc_PrintCoreSetConfigCmdDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_X32MSG("Value:", (uint32_t)pBuff[bIndex+3]);
|
||||
}
|
||||
else if (pBuff[bIndex+2] > 1) {
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
WppLogHex((void*)&pBuff[bIndex+3], (uint16_t)pBuff[bIndex+2]));
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ void phNciNfc_PrintRfParamUpdateCmdDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_X32MSG("Value:", (uint32_t)pBuff[bIndex+2]);
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
WppLogHex((void*)&pBuff[bIndex+2], (uint16_t)pBuff[bIndex+1]));
|
||||
}
|
||||
|
||||
|
@ -331,30 +331,30 @@ void phNciNfc_PrintCoreInitNci1xRspDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_STR("Discovery Configuration Mode:");
|
||||
|
||||
PHNCINFC_VALIDATE_PACKET_LENGTH(bIndex+4, wLen);
|
||||
tNfccFeatures.DiscConfSuprt = pBuff[bIndex++];
|
||||
tNfccFeatures.DiscoveryConfiguration = pBuff[bIndex++];
|
||||
tNfccFeatures.RoutingType = pBuff[bIndex++];
|
||||
tNfccFeatures.PwrOffState = pBuff[bIndex++];
|
||||
tNfccFeatures.Byte3 = pBuff[bIndex++];
|
||||
|
||||
if (tNfccFeatures.DiscConfSuprt & 0x01) {
|
||||
if (tNfccFeatures.DiscoveryConfiguration & PHNCINFC_DISCOVERY_FREQUENCY_CONFIG_SUPPORTED_MASK) {
|
||||
PH_LOG_NCI_INFO_STR("Discovery Frequency supported");
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_STR("Discovery Frequency value is ignored");
|
||||
}
|
||||
|
||||
if ((tNfccFeatures.DiscConfSuprt & 0x06) == 0x00) {
|
||||
if ((tNfccFeatures.DiscoveryConfiguration & PHNCINFC_DISCOVERY_CONFIG_MODE_MASK) == 0x00) {
|
||||
PH_LOG_NCI_INFO_STR("DH is the only entity that configures the NFCC");
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_STR("NFCC can receive configurations from the DH and other NFCEEs");
|
||||
}
|
||||
|
||||
PH_LOG_NCI_INFO_STR("Technology based routing %s", (tNfccFeatures.RoutingType & 0x02) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Protocol based routing %s", (tNfccFeatures.RoutingType & 0x04) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("AID based routing %s", (tNfccFeatures.RoutingType & 0x08) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Battery Off state %s", (tNfccFeatures.PwrOffState & 0x01) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Switched Off state %s", (tNfccFeatures.PwrOffState & 0x02) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Technology based routing %s", (tNfccFeatures.RoutingType & PHNCINFC_TECH_BASED_ROUTING_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Protocol based routing %s", (tNfccFeatures.RoutingType & PHNCINFC_PROTO_BASED_ROUTING_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("AID based routing %s", (tNfccFeatures.RoutingType & PHNCINFC_AID_BASED_ROUTING_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Battery Off state %s", (tNfccFeatures.PwrOffState & PHNCINFC_BATTERY_OFF_STATE_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Switched Off state %s", (tNfccFeatures.PwrOffState & PHNCINFC_SWITCH_OFF_STATE_MASK) ? "supported" : "not supported");
|
||||
|
||||
PHNCINFC_VALIDATE_PACKET_LENGTH(bIndex+1, wLen);
|
||||
bNumInterfaces = pBuff[bIndex++];
|
||||
|
@ -406,30 +406,37 @@ void phNciNfc_PrintCoreInitNci2xRspDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_STR("Discovery Configuration Mode:");
|
||||
|
||||
PHNCINFC_VALIDATE_PACKET_LENGTH(bIndex + 4, wLen);
|
||||
tNfccFeatures.DiscConfSuprt = pBuff[bIndex++];
|
||||
tNfccFeatures.DiscoveryConfiguration = pBuff[bIndex++];
|
||||
tNfccFeatures.RoutingType = pBuff[bIndex++];
|
||||
tNfccFeatures.PwrOffState = pBuff[bIndex++];
|
||||
tNfccFeatures.Byte3 = pBuff[bIndex++];
|
||||
|
||||
if (tNfccFeatures.DiscConfSuprt & 0x01) {
|
||||
if (tNfccFeatures.DiscoveryConfiguration & PHNCINFC_DISCOVERY_FREQUENCY_CONFIG_SUPPORTED_MASK) {
|
||||
PH_LOG_NCI_INFO_STR("Discovery Frequency supported");
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_STR("Discovery Frequency value is ignored");
|
||||
}
|
||||
|
||||
if ((tNfccFeatures.DiscConfSuprt & 0x06) == 0x00) {
|
||||
if ((tNfccFeatures.DiscoveryConfiguration & PHNCINFC_DISCOVERY_CONFIG_MODE_MASK) == 0x00) {
|
||||
PH_LOG_NCI_INFO_STR("DH is the only entity that configures the NFCC");
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_STR("NFCC can receive configurations from the DH and other NFCEEs");
|
||||
}
|
||||
|
||||
PH_LOG_NCI_INFO_STR("Technology based routing %s", (tNfccFeatures.RoutingType & 0x02) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Protocol based routing %s", (tNfccFeatures.RoutingType & 0x04) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("AID based routing %s", (tNfccFeatures.RoutingType & 0x08) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Battery Off state %s", (tNfccFeatures.PwrOffState & 0x01) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Switched Off state %s", (tNfccFeatures.PwrOffState & 0x02) ? "supported" : "not supported");
|
||||
if ((tNfccFeatures.DiscoveryConfiguration & PHNCINFC_HCI_NETWORK_SUPPORTED_MASK) == 0x00) {
|
||||
PH_LOG_NCI_INFO_STR("NFCC does not implement the HCI network");
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_STR("NFCC implements the HCI network as defined in ETSI_102622");
|
||||
}
|
||||
|
||||
PH_LOG_NCI_INFO_STR("Technology based routing %s", (tNfccFeatures.RoutingType & PHNCINFC_TECH_BASED_ROUTING_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Protocol based routing %s", (tNfccFeatures.RoutingType & PHNCINFC_PROTO_BASED_ROUTING_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("AID based routing %s", (tNfccFeatures.RoutingType & PHNCINFC_AID_BASED_ROUTING_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Battery Off state %s", (tNfccFeatures.PwrOffState & PHNCINFC_BATTERY_OFF_STATE_MASK) ? "supported" : "not supported");
|
||||
PH_LOG_NCI_INFO_STR("Switched Off state %s", (tNfccFeatures.PwrOffState & PHNCINFC_SWITCH_OFF_STATE_MASK) ? "supported" : "not supported");
|
||||
|
||||
PHNCINFC_VALIDATE_PACKET_LENGTH(bIndex + 1, wLen);
|
||||
PH_LOG_NCI_INFO_X32MSG("Max Logical Connections:", (uint32_t)pBuff[bIndex++]);
|
||||
|
@ -527,7 +534,7 @@ void phNciNfc_PrintCoreGetConfigRspDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_X32MSG("Value:", (uint32_t)pBuff[bIndex + 2]);
|
||||
}
|
||||
else {
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
WppLogHex((void*)&pBuff[bIndex + 2], (uint16_t)pBuff[bIndex + 1]));
|
||||
}
|
||||
}
|
||||
|
@ -540,7 +547,7 @@ void phNciNfc_PrintCoreGetConfigRspDescription(uint8_t *pBuff, uint16_t wLen)
|
|||
PH_LOG_NCI_INFO_X32MSG("Value:", (uint32_t)pBuff[bIndex + 3]);
|
||||
}
|
||||
else if (pBuff[bIndex + 2] > 0) {
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
PH_LOG_NCI_INFO_HEXDUMP("Value: %!HEXDUMP!",
|
||||
WppLogHex((void*)&pBuff[bIndex + 3], (uint16_t)pBuff[bIndex + 2]));
|
||||
}
|
||||
}
|
||||
|
@ -1104,7 +1111,7 @@ void phNciNfc_PrintPacketDescription(
|
|||
{
|
||||
PH_LOG_NCI_INFO_STR("Message type: Response");
|
||||
PH_LOG_NCI_INFO_STR("GID: %!phNciNfc_CoreGid!", pHeaderInfo->Group_ID);
|
||||
|
||||
|
||||
switch (pHeaderInfo->Group_ID)
|
||||
{
|
||||
case phNciNfc_e_CoreNciCoreGid:
|
||||
|
|
Загрузка…
Ссылка в новой задаче