ac-real-io/acrealio/RR10.h

39 lines
992 B
C
Raw Permalink Normal View History

2013-09-07 10:46:05 -04:00
#ifndef RR10_H
#define RR10_H
#include "Arduino.h"
#include "RfidModule.h"
class RR10 : public RfidModule
{
public:
RR10();
void setPins(int sensor, HardwareSerial* serialid);
2013-09-07 10:46:05 -04:00
void read();
2017-01-25 15:59:19 -05:00
void update();
byte isCardPresent();
2017-01-25 15:59:19 -05:00
void getUID(byte* uid);
private:
void sendCmd(byte* cmd);
boolean cmdUpdate();
2013-09-07 10:46:05 -04:00
private:
byte card; // 0 : no card 1:ISO15693 2:Felica
2013-09-07 10:46:05 -04:00
byte uid[8];
HardwareSerial* rfSerial; // rfid Serial
boolean pinset; // pin init done flag
boolean readcmd; // read request from host flag
2017-01-25 15:59:19 -05:00
boolean incmd; // command is being processed
byte command[256]; //command
byte comstatus; // 0 : idle, 1 : handshake sent , 2 : command sent , 3 : handshake sent back, waiting for answer
2017-01-25 15:59:19 -05:00
byte readstatus; // 0 : nothing read, 1 : ISO15693 read, reading Felica
unsigned long timesent;
byte rfidp[256]; // rfid response buffer
byte rf_i; //response buffer size
2013-09-07 10:46:05 -04:00
};
#endif
2017-01-25 15:59:19 -05:00