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: MicroNFCBoardAPI_P2P_Client MicroNFCBoardAPI_Blink MicroNFCBoardAPI_Tag_Emulator MicroNFCBoardAPI_Tag_Reader ... more
micronfcboard.h
00001 /* 00002 MicroNFCBoard mbed API 00003 00004 Copyright (c) 2014-2015 AppNearMe Ltd 00005 00006 Licensed under the Apache License, Version 2.0 (the "License"); 00007 you may not use this file except in compliance with the License. 00008 You may obtain a copy of the License at 00009 00010 http://www.apache.org/licenses/LICENSE-2.0 00011 00012 Unless required by applicable law or agreed to in writing, software 00013 distributed under the License is distributed on an "AS IS" BASIS, 00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 See the License for the specific language governing permissions and 00016 limitations under the License. 00017 */ 00018 00019 #ifndef SRC_MICRONFCBOARD_H_ 00020 #define SRC_MICRONFCBOARD_H_ 00021 00022 #include "mbed.h" 00023 #include <cstddef> 00024 00025 #include "transport.h" 00026 00027 class MicroNFCBoard 00028 { 00029 public: 00030 MicroNFCBoard(PinName mosi, PinName miso, PinName sck, PinName cs, PinName irq); 00031 00032 void init(); 00033 00034 void setLeds(bool led1, bool led2); 00035 00036 void updateStatus(); 00037 00038 bool connected(); 00039 00040 bool type2Tag(); 00041 00042 bool type4Emulator(); 00043 00044 bool p2p(); 00045 00046 bool polling(); 00047 00048 bool ndefReadable(); 00049 00050 bool ndefWriteable(); 00051 00052 bool ndefPresent(); 00053 00054 bool ndefBusy(); 00055 00056 bool ndefSuccess(); 00057 00058 void startPolling(bool readerWriter, bool emulator, bool p2p); 00059 00060 void stopPolling(); 00061 00062 void ndefRead(); 00063 00064 void ndefWrite(); 00065 00066 bool readNdefUri(char* uri, size_t maxUriLength); 00067 00068 bool readNdefText(char* text, size_t maxTextLength); 00069 00070 void writeNdefUri(const char* uri); 00071 00072 void writeNdefText(const char* lang, const char* text); 00073 00074 protected: 00075 Transport _transport; 00076 00077 private: 00078 uint32_t _status; 00079 }; 00080 00081 #endif /* SRC_MICRONFCBOARD_H_ */
Generated on Tue Jul 12 2022 18:54:47 by
1.7.2