ID12RFID with interrupts

Fork of ID12RFID by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
jnagendran3
Date:
Wed Dec 03 22:39:10 2014 +0000
Parent:
1:f04afa911cf5
Commit message:
Additional code for generating interrupts.

Changed in this revision

ID12RFID.cpp Show annotated file Show diff for this revision Revisions of this file
ID12RFID.h Show annotated file Show diff for this revision Revisions of this file
--- a/ID12RFID.cpp	Tue Nov 23 17:17:15 2010 +0000
+++ b/ID12RFID.cpp	Wed Dec 03 22:39:10 2014 +0000
@@ -51,3 +51,7 @@
     
     return v;
 }
+
+void ID12RFID::setInterrupt(void (*fptr)()) {
+    _rfid.attach(fptr);
+}
--- a/ID12RFID.h	Tue Nov 23 17:17:15 2010 +0000
+++ b/ID12RFID.h	Wed Dec 03 22:39:10 2014 +0000
@@ -64,6 +64,8 @@
      * @return The ID tag value
      */
     int read();
+    
+    void setInterrupt(void (fptr)());
 
 private:
     Serial _rfid;