|
Files | |
file | codatech-rfid.h |
Codatex RFID driver. | |
Defines | |
#define | CTRFID_I2C_ADDR 0x04 |
#define | CTRFID_FIRM_VER 0x00 |
#define | CTRFID_MAN_NAME 0x08 |
#define | CTRFID_SENS_TYP 0x10 |
#define | CTRFID_STATUS 0x32 |
#define | CTRFID_OFFSET 0x41 |
#define | CTRFID_CMD 0x00 |
#define | CTRFID_BYTE1 0x01 |
#define | CTRFID_BYTE2 0x02 |
#define | CTRFID_BYTE3 0x03 |
#define | CTRFID_BYTE4 0x04 |
#define | CTRFID_BYTE5 0x05 |
#define | CTRFID_SERIAL 0xA0 |
#define | CTRFID_CMD_STOP 0x00 |
#define | CTRFID_CMD_SINGLESHOT 0x01 |
#define | CTRFID_CMD_CONTINUOUS 0x02 |
#define | CTRFID_CMD_BOOTLOADER 0x81 |
#define | CTRFID_CMD_STARTAPPFIRM 0x83 |
Functions | |
bool | CTRFIDinit (tSensors link) |
bool | CTRFIDsetContinuous (tSensors link) |
bool | CTRFIDsetSingleShot (tSensors link) |
bool | CTRFIDreadTransponder (tSensors link, string &transponderID) |
bool | _CTRFIDsendCommand (tSensors link, ubyte command) |
bool | _CTRFIDsendDummy (tSensors link) |
bool | _CTRFIDreadStatus (tSensors link, ubyte &_status) |
Variables | |
tByteArray | CTRFID_I2CRequest |
tByteArray | CTRFID_I2CReply |
bool | CTRFIDreadContinuous [4] = {false, false, false, false} |
bool | CTRFIDinitialised [4] = {false, false, false, false} |
Codatex RFID Sensor
#define CTRFID_BYTE1 0x01 |
1rst byte of transponder data
Definition at line 60 of file codatech-rfid.h.
#define CTRFID_BYTE2 0x02 |
2nd byte of transponder data
Definition at line 61 of file codatech-rfid.h.
#define CTRFID_BYTE3 0x03 |
3rd byte of transponder data
Definition at line 62 of file codatech-rfid.h.
#define CTRFID_BYTE4 0x04 |
4th byte of transponder data
Definition at line 63 of file codatech-rfid.h.
#define CTRFID_BYTE5 0x05 |
5th byte of transponder data
Definition at line 64 of file codatech-rfid.h.
#define CTRFID_CMD 0x00 |
Command to the RFID sensor
Definition at line 59 of file codatech-rfid.h.
#define CTRFID_CMD_BOOTLOADER 0x81 |
Start the bootloader
Definition at line 81 of file codatech-rfid.h.
#define CTRFID_CMD_CONTINUOUS 0x02 |
Continuous read, the sensor will continuously read and store data in registers 42h to 46h! After app. 2 sec. of inactivity on the I2C bus the sensor will enter the sleep mode
Definition at line 77 of file codatech-rfid.h.
#define CTRFID_CMD_SINGLESHOT 0x01 |
Will start a single read action, if any transponder is readable, the data will be read and stored in registers 42h to 46 h. Immediately after reading a transponder or after a max wait time of app. 0,5 seconds the sensor will enter the sleep mode
Definition at line 70 of file codatech-rfid.h.
#define CTRFID_CMD_STARTAPPFIRM 0x83 |
Start the application firmware
Definition at line 82 of file codatech-rfid.h.
#define CTRFID_CMD_STOP 0x00 |
Stop RFID sensor, will stop reading and put RFID sensor into sleep mode
Definition at line 68 of file codatech-rfid.h.
#define CTRFID_FIRM_VER 0x00 |
RFID Firmware version
Definition at line 54 of file codatech-rfid.h.
#define CTRFID_I2C_ADDR 0x04 |
RFID I2C device address
Definition at line 51 of file codatech-rfid.h.
#define CTRFID_MAN_NAME 0x08 |
RFID Manufacturer name (CODATEX)
Definition at line 55 of file codatech-rfid.h.
#define CTRFID_OFFSET 0x41 |
Offset for sensor's registers
Definition at line 58 of file codatech-rfid.h.
#define CTRFID_SENS_TYP 0x10 |
RFID Sensor type (RFID)
Definition at line 56 of file codatech-rfid.h.
#define CTRFID_SERIAL 0xA0 |
address of serial number
Definition at line 65 of file codatech-rfid.h.
#define CTRFID_STATUS 0x32 |
Sensor status info (0/1)
Definition at line 57 of file codatech-rfid.h.
bool _CTRFIDreadStatus | ( | tSensors | link, |
ubyte & | _status | ||
) |
Check if the sensor is in continuous mode.
Note: this is an internal function and should not be called directly.
link | the CTRFID port number, |
_status | the sensor's status (continuous mode : 1, idle : 0), |
Definition at line 154 of file codatech-rfid.h.
bool _CTRFIDsendCommand | ( | tSensors | link, |
ubyte | command | ||
) |
Send a command to the RFID sensor.
Note: this is an internal function and should not be called directly.
link | the CTRFID port number, |
command | the CTRFID command to be sent to the sensor |
Definition at line 114 of file codatech-rfid.h.
bool _CTRFIDsendDummy | ( | tSensors | link ) |
Send a dummy I2C packet to the sensor to wake it up
Note: this is an internal function and should not be called directly.
link | the CTRFID port number, |
Definition at line 136 of file codatech-rfid.h.
bool CTRFIDinit | ( | tSensors | link ) |
< Functions definition
Configure the sensor for reading transponders
link | the CTRFID port number, |
Definition at line 184 of file codatech-rfid.h.
bool CTRFIDreadTransponder | ( | tSensors | link, |
string & | transponderID | ||
) |
Read transponder ID's bytes. This function needs that a reading mode to be selected before using it.
link | the CTRFID port number, |
transponderID | the read transponder ID, |
Definition at line 237 of file codatech-rfid.h.
bool CTRFIDsetContinuous | ( | tSensors | link ) |
Configure the sensor for reading transponders in continuous mode
link | the CTRFID port number, |
Definition at line 200 of file codatech-rfid.h.
bool CTRFIDsetSingleShot | ( | tSensors | link ) |
Configure the sensor for reading transponders in single shot mode
Definition at line 218 of file codatech-rfid.h.
Array to hold I2C reply data
Definition at line 100 of file codatech-rfid.h.
< Global variables Array to hold I2C command data
Definition at line 99 of file codatech-rfid.h.
bool CTRFIDinitialised[4] = {false, false, false, false} |
Has the sensor been initialised?
Definition at line 103 of file codatech-rfid.h.
bool CTRFIDreadContinuous[4] = {false, false, false, false} |
Is the sensor configured for Continuous mode?
Definition at line 102 of file codatech-rfid.h.