![]() |
Mbed OS Reference
|
Data Structures | |
| struct | __ndef_msg |
Generic NDEF Tag | |
| typedef nfc_err_t(* | ndef_encode_fn_t) (ndef_msg_t *pTag, ac_buffer_builder_t *pBufferBldr, void *pUserData) |
| Function called to generate the tag's content on read (target mode) | |
| typedef nfc_err_t(* | ndef_decode_fn_t) (ndef_msg_t *pTag, ac_buffer_t *pBuffer, void *pUserData) |
| Function called to decode the tag's content on write (target mode) or read (reader mode) | |
| void | ndef_msg_init (ndef_msg_t *pNdef, ndef_encode_fn_t encode, ndef_decode_fn_t decode, uint8_t *data, size_t size, void *pUserData) |
| Initialize NDEF tag abstraction. | |
| typedef nfc_err_t(* ndef_encode_fn_t) (ndef_msg_t *pTag, ac_buffer_builder_t *pBufferBldr, void *pUserData) |
Function called to generate the tag's content on read (target mode)
| pTag | pointer to ndef_tag_t instance |
| pBufferBldr | buffer in which to store the generated content |
| pUserData | User data pointer passed to ndef_msg_init |
| typedef nfc_err_t(* ndef_decode_fn_t) (ndef_msg_t *pTag, ac_buffer_t *pBuffer, void *pUserData) |
Function called to decode the tag's content on write (target mode) or read (reader mode)
| pTag | pointer to ndef_tag_t instance |
| pBuffer | buffer containing the tag's content |
| pUserData | User data pointer passed to ndef_msg_init |
| void ndef_msg_init | ( | ndef_msg_t * | pNdef, |
| ndef_encode_fn_t | encode, | ||
| ndef_decode_fn_t | decode, | ||
| uint8_t * | data, | ||
| size_t | size, | ||
| void * | pUserData | ||
| ) |
Initialize NDEF tag abstraction.
| pNdef | pointer to ndef_tag_t structure to initialize |
| encode | function that will be called to generate the NDEF message before sending it to the other party |
| decode | function that will be called to parse the NDEF message after receiving it from the other party |
| data | underlying buffer to use (it should be big enough so that any NDEF message you might need could be stored inside) |
| size | size of the underlying buffer |
| pUserData | User data pointer to pass to callbacks. |