Question about PN7160 example - SW6705

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about PN7160 example - SW6705

Jump to solution
608 Views
OilCastle
Contributor III

Hi.
I'm trying to add the SW6705 code to my Zephyr based project.


The compiler returned some warnings and I also think it looks weird.

- File
\\NXP-NCI2.0_MCUXpresso_examples\NXP-NCI2.0_LPC55S6x_examples\NfcLibrary\NxpNci20\src\NxpNci20.c
- Line number: 989

if (AnswerSize != 0)
{
    /* Flush any other notification  */
    while(Answer != 0) NxpNci_WaitForReception(Answer, sizeof(Answer), &AnswerSize, TIMEOUT_100MS);
    /* Restart the discovery loop */ 
    NxpNci_HostTransceive(NCIRestartDiscovery, sizeof(NCIRestartDiscovery), Answer, sizeof(Answer), &AnswerSize);
    NxpNci_WaitForReception(Answer, sizeof(Answer), &AnswerSize, TIMEOUT_100MS);
}
goto wait;

 

I think "while(Answer != 0)" could be a problem because that symbol is pointer, not regular variable.

uint8_t NCIRfDiscoverSelect[] = {0x21, 0x04, 0x03, 0x01, PROT_ISODEP, INTF_ISODEP};
uint8_t Answer[MAX_NCI_FRAME_SIZE];
uint16_t AnswerSize;


I'm not sure what's the intention of this code.

 

Please, someone explain to me about this.

(If I'm missing something, please let me know.)

 

 

Thank you.

 

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
583 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @OilCastle

Hope you are doing well.

That portion of code is related to Peer-to-Peer (P2P) support; this functionality is deprecated.

If not required, you can skip the code wrapped within "REMOVE_P2P_SUPPORT" macro.

Regards,
Eduardo.

View solution in original post

0 Kudos
Reply
1 Reply
584 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @OilCastle

Hope you are doing well.

That portion of code is related to Peer-to-Peer (P2P) support; this functionality is deprecated.

If not required, you can skip the code wrapped within "REMOVE_P2P_SUPPORT" macro.

Regards,
Eduardo.

0 Kudos
Reply