URI messages

nRF5 SDK v13.0.0

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_code URI identifier code that defines the protocol field of the URI.
[in] p_uri_data Pointer to the URI string. The string should not contain the protocol field if the protocol was specified in uri_id_code .
[in] uri_data_len Length of the URI string.
[out] p_buf Pointer to the buffer for the message.
[in,out] p_len Size of the available memory for the message as input. Size of the generated message as output.
Return values
NRF_SUCCESS If the description was successfully created.
NRF_ERROR_INVALID_PARAM If the URI string was invalid (equal to NULL).
NRF_ERROR_NO_MEM If the predicted message size is bigger than the provided buffer space.
Other Other codes might be returned depending on the function nfc_ndef_msg_encode .