Generation of NFC NDEF EP OOB records for NDEF messages.
More...
Generation of NFC NDEF EP OOB records for NDEF messages.
#define NFC_NDEF_EP_OOB_RECORD_DESC_DEF |
( |
|
NAME, |
|
|
|
PAYLOAD_ID, |
|
|
|
P_BLE_ADVDATA |
|
) |
| |
Value:uint8_t NAME##_ndef_ep_oob_record_id = (PAYLOAD_ID); \
uint8_t NAME##_ndef_ep_oob_record_id_length = ((PAYLOAD_ID) != 0) ? 1 : 0; \
NFC_NDEF_GENERIC_RECORD_DESC_DEF( NAME, \
&NAME##_ndef_ep_oob_record_id, \
NAME##_ndef_ep_oob_record_id_length, \
(P_BLE_ADVDATA)) \
Macro for generating a description of an NFC NDEF Bluetooth Carrier Configuration EP record.
This macro declares and initializes an instance of an NFC NDEF record description for a Bluetooth Carrier Configuration EP record.
- Note
- The record descriptor is declared as automatic variable, which implies that the NDEF message encoding (see nfc_ble_simplified_ep_oob_msg_encode) must be done in the same variable scope.
- Parameters
-
[in] | NAME | Name for accessing record descriptor. |
[in] | PAYLOAD_ID | NDEF record header Payload ID field (Limited to one byte). If 0, no ID is present in the record description. |
[in] | P_BLE_ADVDATA | Pointer to the encoded BLE advertising data structure. This data is used to create the record payload. |
Function for constructing the payload for a Bluetooth Carrier Configuration EP record.
This function encodes the record payload according to the BLE AD structure. It implements an API compatible with p_payload_constructor_t.
- Parameters
-
[in] | p_ble_advdata | Pointer to the description of the payload. |
[out] | p_buff | Pointer to payload destination. If NULL, function will calculate the expected size of the record payload. |
[in,out] | p_len | Size of available memory to write as input. Size of generated payload as output. |
- Return values
-
NRF_SUCCESS | If the record payload was encoded successfully. |
NRF_ERROR_NO_MEM | If available memory was not enough for record payload to be encoded. |
Other | If any other error occurred during record payload encoding. |