#include <RFID-SOLDERED.h>
Inherits EasyC.
|
| | Rfid () |
| | Rfid (int _rxPin, int _txPin, uint32_t _baud) |
| | Sensor specific native constructor.
|
| bool | checkHW () |
| bool | available () |
| | Check if there is new RFID data available.
|
| uint32_t | getId () |
| | Get the RFID Tag ID number.
|
| uint64_t | getRaw () |
| | Get the RFID RAW data with the headers, RAW Data, parity bits, etc.
|
| void | printHex64 (uint64_t _number) |
| | Prints out 64 bit number in HEX format in Serial.
|
| void | clear () |
| | Clears the tag ID data on brekaout.
|
| | EasyC () |
| | Main constructor for easyC version.
|
| void | begin () |
| | Initializes sensors on native or easyC on default address.
|
| void | begin (uint8_t _address) |
| | Initializes sensors on supplied i2c address.
|
| int | sendAddress (char regAddr) |
| | Private function to send a single byte to sensor.
|
| int | readData (char a[], int n) |
| | Private function to read n bytes over i2c.
|
| int | readRegister (char regAddr, char a[], size_t n) |
| | Private function to send over i2c and then read n bytes.
|
| int | sendData (const uint8_t *a, int n) |
| | Private function to write n bytes over i2c.
|
|
| void | initializeNative () |
| | Initialization of the native mode (serial / UART communication with the RFID).
|
|
| bool | getTheSerialData (char *_data, int _n, int _serialTimeout) |
| | Function gets the data from the serial.
|
| uint64_t | getUint64 (char *_c) |
| | Converts HEX char array into 64 bit number (integer).
|
| int | hexToInt (char _c) |
| | Converts HEX char into integer from 0 to 15.
|
| uint64_t | get16Base (int _exp) |
| | Calculates 16 base number for the given exponent.
|
| char | intToHex (uint8_t _n) |
| | Converts integer (from 0 to 15) to HEX char.
|
◆ Rfid() [1/2]
◆ Rfid() [2/2]
| Rfid::Rfid |
( |
int | _rxPin, |
|
|
int | _txPin, |
|
|
uint32_t | _baud ) |
Sensor specific native constructor.
- Parameters
-
| int | _pin Example parameter. |
◆ available()
Check if there is new RFID data available.
- Returns
- bool - True if available, false if not.
◆ checkHW()
◆ clear()
Clears the tag ID data on brekaout.
- Note
- It's only available for easyC version.
◆ get16Base()
| uint64_t Rfid::get16Base |
( |
int | _exp | ) |
|
|
private |
Calculates 16 base number for the given exponent.
- Parameters
-
| int | _exp Exponent (pow(16, _exp) alternative). |
- Returns
- uint64_t - Calculated value for the given exponent to the 16 base.
◆ getId()
Get the RFID Tag ID number.
- Returns
- uint32_t - Returns 32 bit tag ID number and clear it after reading.
◆ getRaw()
| uint64_t Rfid::getRaw |
( |
| ) |
|
Get the RFID RAW data with the headers, RAW Data, parity bits, etc.
- Returns
- uint64_t - Returns 64 bit long RAW RFID data.
◆ getTheSerialData()
| bool Rfid::getTheSerialData |
( |
char * | _data, |
|
|
int | _n, |
|
|
int | _serialTimeout ) |
|
private |
Function gets the data from the serial.
- Parameters
-
| char | *_data Ponter to the data buffer. |
| int | _n Size of the data buffer. |
| int | _serialTimeout Timeout from the last received char. |
- Returns
- bool - Return true if there is some data available, false if not.
◆ getUint64()
| uint64_t Rfid::getUint64 |
( |
char * | _c | ) |
|
|
private |
Converts HEX char array into 64 bit number (integer).
- Parameters
-
| char | *_c Char array that holds 64 bit HEX char array. |
- Returns
- uint64_t - 64 bit integer.
◆ hexToInt()
| int Rfid::hexToInt |
( |
char | _c | ) |
|
|
private |
Converts HEX char into integer from 0 to 15.
- Parameters
-
| char | *_c Char that holds HEX char. |
- Returns
- int - Converted HEX char into integer (from 0 to 15).
◆ initializeNative()
| void Rfid::initializeNative |
( |
| ) |
|
|
protectedvirtual |
Initialization of the native mode (serial / UART communication with the RFID).
Implements EasyC.
◆ intToHex()
| char Rfid::intToHex |
( |
uint8_t | _n | ) |
|
|
private |
Converts integer (from 0 to 15) to HEX char.
- Parameters
-
| uint8_t | _n Number that will be converted into HEX char. |
- Returns
- char - Converted HEX char.
◆ printHex64()
| void Rfid::printHex64 |
( |
uint64_t | _number | ) |
|
Prints out 64 bit number in HEX format in Serial.
- Parameters
-
| uint64_t | _number 64 bit numer that will be printed in serial in HEX format. |
◆ baudRate
◆ rfidRAW
| uint64_t Rfid::rfidRAW = 0 |
|
private |
◆ rfidSerial
| SoftwareSerial* Rfid::rfidSerial |
|
private |
◆ rxPin
◆ tagID
◆ txPin
The documentation for this class was generated from the following files: