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
pn512_internal.h
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 pn512_internal.h 00019 * \copyright Copyright (c) ARM Ltd 2013 00020 * \author Donatien Garnier 00021 */ 00022 00023 #ifndef PN512_INTERNAL_H_ 00024 #define PN512_INTERNAL_H_ 00025 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif 00029 00030 #include "stack/nfc_common.h" 00031 #include "transceiver/transceiver_internal.h" 00032 00033 #include "pn512.h" 00034 #include "pn512_callback.h" 00035 00036 //Public 00037 void pn512_set_protocols(nfc_transceiver_t *pTransceiver, nfc_tech_t initiators, nfc_tech_t targets, polling_options_t options); 00038 void pn512_poll(nfc_transceiver_t *pTransceiver); 00039 void pn512_set_crc(nfc_transceiver_t *pTransceiver, bool crc_out, bool crc_in); 00040 void pn512_set_timeout(nfc_transceiver_t *pTransceiver, int timeout); 00041 void pn512_set_transceive_options(nfc_transceiver_t *pTransceiver, bool transmit, bool receive, bool repoll); 00042 void pn512_set_transceive_framing(nfc_transceiver_t *pTransceiver, nfc_framing_t framing); 00043 void pn512_set_write(nfc_transceiver_t *pTransceiver, ac_buffer_t *pWriteBuf); 00044 ac_buffer_t *pn512_get_read(nfc_transceiver_t *pTransceiver); 00045 size_t pn512_get_last_byte_length(nfc_transceiver_t *pTransceiver); 00046 void pn512_set_last_byte_length(nfc_transceiver_t *pTransceiver, size_t lastByteLength); 00047 void pn512_set_first_byte_align(nfc_transceiver_t *pTransceiver, size_t firstByteAlign); 00048 void pn512_abort(nfc_transceiver_t *pTransceiver); 00049 void pn512_transceive(nfc_transceiver_t *pTransceiver); 00050 void pn512_close(nfc_transceiver_t *pTransceiver); 00051 void pn512_sleep(nfc_transceiver_t *pTransceiver, bool sleep); 00052 00053 void pn512_transceiver_callback(pn512_t *pPN512, nfc_err_t ret); 00054 00055 static inline void pn512_rf_callback(pn512_t *pPN512, nfc_err_t ret) 00056 { 00057 pPN512->rf.cb(pPN512, ret); 00058 } 00059 00060 static inline void pn512_poll_callback(pn512_t *pPN512, nfc_err_t ret) 00061 { 00062 pPN512->poll.cb(pPN512, ret); 00063 } 00064 00065 static inline void pn512_anticollision_callback(pn512_t *pPN512, nfc_err_t ret) 00066 { 00067 pPN512->anticollision.cb(pPN512, ret); 00068 } 00069 00070 static inline void pn512_transceive_callback(pn512_t *pPN512, nfc_err_t ret) 00071 { 00072 pPN512->transceive.cb(pPN512, ret); 00073 } 00074 00075 00076 00077 #ifdef __cplusplus 00078 } 00079 #endif 00080 00081 #endif /* PN512_INTERNAL_H_ */
Generated on Tue Jul 12 2022 13:54:41 by
