nRF5 SDK v12.1.0
Modules | Functions

Generation of NFC NDEF messages with a URI record. More...

Modules

 URI records
 Generation of NFC NDEF URI record descriptions.
 

Functions

ret_code_t nfc_uri_msg_encode (nfc_uri_id_t uri_id_code, uint8_t const *const p_uri_data, uint8_t uri_data_len, uint8_t *p_buf, uint32_t *p_len)
 Function for encoding an NFC NDEF URI message. More...
 

Detailed Description

Generation of NFC NDEF messages with a URI record.

Function Documentation

ret_code_t nfc_uri_msg_encode ( nfc_uri_id_t  uri_id_code,
uint8_t const *const  p_uri_data,
uint8_t  uri_data_len,
uint8_t *  p_buf,
uint32_t *  p_len 
)

Function for encoding an NFC NDEF URI message.

This function encodes an NFC NDEF message into a buffer.

Parameters
[in]uri_id_codeURI identifier code that defines the protocol field of the URI.
[in]p_uri_dataPointer to the URI string. The string should not contain the protocol field if the protocol was specified in uri_id_code.
[in]uri_data_lenLength of the URI string.
[out]p_bufPointer to the buffer for the message.
[in,out]p_lenSize of the available memory for the message as input. Size of the generated message as output.
Return values
NRF_SUCCESSIf the description was successfully created.
NRF_ERROR_INVALID_PARAMIf the URI string was invalid (equal to NULL).
NRF_ERROR_NO_MEMIf the predicted message size is bigger than the provided buffer space.
OtherOther codes might be returned depending on the function nfc_ndef_msg_encode.

Documentation feedback | Developer Zone | Subscribe | Updated