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!
Diff: PN532/munfc/event/transaction_event.h
- Revision:
- 10:2af578c635cd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PN532/munfc/event/transaction_event.h Wed Nov 07 18:18:52 2012 +0000 @@ -0,0 +1,43 @@ +/* + transaction_event.h + Copyright (c) Donatien Garnier 2012 + donatien.garnier@appnearme.com + http://www.appnearme.com/ +*/ + + +#ifndef TRANSACTION_EVENT_H_ +#define TRANSACTION_EVENT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "core/fwk.h" + +typedef enum __transaction_event +{ + TRANSACTION_STARTED, //< Transaction with reader/tag started (anticollision successful) + TRANSACTION_SUCCESSFUL, //< Transaction with reader/tag successful + TRANSACTION_FAILED //< Transaction with reader/tag failed +} transaction_event; + +typedef enum __transaction_type +{ + TRANSACTION_READER, //< Transaction in reader mode (with a tag) + TRANSACTION_TARGET, //< Transaction in target mode (with a reader) +} transaction_type; + +typedef void (*transaction_event_callback)(transaction_event event, transaction_type type, void* param); + +void transaction_event_init(void); + +void transaction_event_register_callback(transaction_event_callback cb, void* param); + +void transaction_event_fire(transaction_event event, transaction_type type); + +#ifdef __cplusplus +} +#endif + +#endif /* TRANSACTION_EVENT_H_ */