Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
ndef.c
00001 /* 00002 * Copyright (c) 2013-2018, ARM Limited, All Rights Reserved 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00006 * not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00013 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 /** 00018 * \file ndef.c 00019 * \copyright Copyright (c) ARM Ltd 2013 00020 * \author Donatien Garnier 00021 * \details NDEF tag abstraction 00022 */ 00023 00024 00025 #include "ndef.h" 00026 00027 /** \addtogroup NDEF 00028 * @{ 00029 * \name Generic NDEF Tag 00030 * @{ 00031 */ 00032 00033 /** Initialize NDEF tag abstraction 00034 * \param pNdefTag pointer to ndef_tag_t structure to initialize 00035 * \param encode function that will be called to generate the NDEF message before sending it to the other party 00036 * \param decode function that will be called to parse the NDEF message after receiving it from the other party 00037 * \param buffer underlying buffer to use (it should be big enough so that any NDEF message you might need could be stored inside) 00038 * \param buffer_size size of the underlying buffer 00039 * \param pImpl pointer to actual implementation 00040 */ 00041 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) 00042 { 00043 pNdef->encode = encode; 00044 pNdef->decode = decode; 00045 ac_buffer_builder_init(&pNdef->bufferBldr, data, size); 00046 pNdef->pUserData = pUserData; 00047 } 00048 00049 /** Get NDEF tag implementation 00050 * \param pNdefTag pointer to ndef_tag_t structure 00051 * \return implementation 00052 */ 00053 /* 00054 void* ndef_tag_impl(ndef_tag_t* pNdefTag) 00055 { 00056 return pNdefTag->pImpl; 00057 } 00058 */ 00059 00060 /** 00061 * @} 00062 * @} 00063 * */
Generated on Tue Jul 12 2022 13:54:37 by
