Files
resy/project/rfid/rfid_reader.hpp
Siegfried Kienzle c9bbfff992 implement destructor
2017-06-15 19:09:29 +02:00

28 lines
392 B
C++

#ifndef RFIDREADER_HPP_
#define RFIDREADER_HPP_
#include <cstdint>
#include <thread>
#include "MFRC522.h"
class rfid_reader
{
public:
uint32_t last_id() const;
rfid_reader();
rfid_reader(const rfid_reader &) = delete;
rfid_reader(const rfid_reader &&) = delete;
~rfid_reader();
void loop();
private:
MFRC522 mfrc;
uint32_t uid;
std::thread thread;
bool stop_thread;
};
#endif