AppNearMe µNFC stack for the NXP PN532 chip License: You can use the stack free of charge to prototype with mbed; if you want to use the stack with your commercial product, get in touch!

Dependents:   IOT_sensor_nfc AppNearMe_MuNFC_PN532_Test p2p_nfc_test NFCMoodLamp ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers appnearme_ndef.h Source File

appnearme_ndef.h

00001 /*
00002     appnearme_ndef.h 
00003   Copyright (c) Donatien Garnier 2012
00004   donatien.garnier@appnearme.com
00005   http://www.appnearme.com/
00006 */
00007 
00008 
00009 #ifndef APPNEARME_NDEF_H_
00010 #define APPNEARME_NDEF_H_
00011 
00012 #ifdef __cplusplus
00013 extern "C" {
00014 #endif
00015 
00016 #include "core/fwk.h"
00017 #include "core/buffer.h"
00018 
00019 #include "appnearme_ndef_tlv.h"
00020 
00021 #define APPNEARME_HASH_SIZE 16
00022 
00023 typedef void (*appnearme_ndef_callback)(tlv_list* payload, void* param);
00024 
00025 int appnearme_ndef_init(char app_hash[APPNEARME_HASH_SIZE], uint32_t version);
00026 
00027 void appnearme_ndef_register_encode_callback(appnearme_ndef_callback cb, void* param);
00028 
00029 void appnearme_ndef_register_decode_callback(appnearme_ndef_callback cb, void* param);
00030 
00031 int appnearme_ndef_encode_message(buffer* pMem);
00032 
00033 int appnearme_ndef_decode_message(buffer* pMem);
00034 
00035 #ifdef __cplusplus
00036 }
00037 #endif
00038 
00039 #endif /* APPNEARME_NDEF_H_ */