14 uint8_t serial[10] = {0};
16 uint8_t ser_ack[3] = {0};
17 int32_t max_blocks = 64;
18 uint8_t page_step = 0;
39 int init(
const char*, uint8_t, uint32_t, uint16_t, uint8_t);
66 char detect_tag(uint16_t *tag_type, uint8_t *buff);
75 char read_tag_serialn(uint8_t *serial, uint8_t *serial_size, uint8_t *ser_ack, uint8_t *buff);
int init(const char *device, uint8_t mode=0, uint32_t speed=1000000, uint16_t delay=0, uint8_t bits_per_word=8)
RFID reader init through values.
int init_from_conf()
RFID reader init from loaded configuration.
char read_tag_serialn(uint8_t *serial, uint8_t *serial_size, uint8_t *ser_ack, uint8_t *buff)
This function reads the serial number of RIFD tag put near the reader.
void clean()
Stops the reading thread.
void clear_event_queue()
Clears event queue, discarding all waiting events.
int read_tag(rfid_tag *tag)
This function is a loop handling the scanner.
rfid_event * poll_event()
Polls event from RFID event_queue.
char detect_tag(uint16_t *tag_type, uint8_t *buff)
This function detects if a RFID tag was put near the reader.
void start_reading_cards()
Loop that is run in its own thread, reading the RFID reader.
RFID_FLAGS_
Flags of RFID events.
Structure used for RFID event. This structure contains read tag and flags of the event.
rfid_reader::rfid_tag tag
RFID tag structure. Stores data read from SPI.