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

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!

Committer:
AppNearMe
Date:
Wed Nov 07 18:18:52 2012 +0000
Revision:
10:2af578c635cd
Updated library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AppNearMe 10:2af578c635cd 1 /*
AppNearMe 10:2af578c635cd 2 transaction_event.h
AppNearMe 10:2af578c635cd 3 Copyright (c) Donatien Garnier 2012
AppNearMe 10:2af578c635cd 4 donatien.garnier@appnearme.com
AppNearMe 10:2af578c635cd 5 http://www.appnearme.com/
AppNearMe 10:2af578c635cd 6 */
AppNearMe 10:2af578c635cd 7
AppNearMe 10:2af578c635cd 8
AppNearMe 10:2af578c635cd 9 #ifndef TRANSACTION_EVENT_H_
AppNearMe 10:2af578c635cd 10 #define TRANSACTION_EVENT_H_
AppNearMe 10:2af578c635cd 11
AppNearMe 10:2af578c635cd 12 #ifdef __cplusplus
AppNearMe 10:2af578c635cd 13 extern "C" {
AppNearMe 10:2af578c635cd 14 #endif
AppNearMe 10:2af578c635cd 15
AppNearMe 10:2af578c635cd 16 #include "core/fwk.h"
AppNearMe 10:2af578c635cd 17
AppNearMe 10:2af578c635cd 18 typedef enum __transaction_event
AppNearMe 10:2af578c635cd 19 {
AppNearMe 10:2af578c635cd 20 TRANSACTION_STARTED, //< Transaction with reader/tag started (anticollision successful)
AppNearMe 10:2af578c635cd 21 TRANSACTION_SUCCESSFUL, //< Transaction with reader/tag successful
AppNearMe 10:2af578c635cd 22 TRANSACTION_FAILED //< Transaction with reader/tag failed
AppNearMe 10:2af578c635cd 23 } transaction_event;
AppNearMe 10:2af578c635cd 24
AppNearMe 10:2af578c635cd 25 typedef enum __transaction_type
AppNearMe 10:2af578c635cd 26 {
AppNearMe 10:2af578c635cd 27 TRANSACTION_READER, //< Transaction in reader mode (with a tag)
AppNearMe 10:2af578c635cd 28 TRANSACTION_TARGET, //< Transaction in target mode (with a reader)
AppNearMe 10:2af578c635cd 29 } transaction_type;
AppNearMe 10:2af578c635cd 30
AppNearMe 10:2af578c635cd 31 typedef void (*transaction_event_callback)(transaction_event event, transaction_type type, void* param);
AppNearMe 10:2af578c635cd 32
AppNearMe 10:2af578c635cd 33 void transaction_event_init(void);
AppNearMe 10:2af578c635cd 34
AppNearMe 10:2af578c635cd 35 void transaction_event_register_callback(transaction_event_callback cb, void* param);
AppNearMe 10:2af578c635cd 36
AppNearMe 10:2af578c635cd 37 void transaction_event_fire(transaction_event event, transaction_type type);
AppNearMe 10:2af578c635cd 38
AppNearMe 10:2af578c635cd 39 #ifdef __cplusplus
AppNearMe 10:2af578c635cd 40 }
AppNearMe 10:2af578c635cd 41 #endif
AppNearMe 10:2af578c635cd 42
AppNearMe 10:2af578c635cd 43 #endif /* TRANSACTION_EVENT_H_ */