mirror of
https://github.com/Vale54321/schafkopf-bot.git
synced 2025-12-16 03:39:34 +01:00
added arduino nfcReader files (#42)
This commit is contained in:
committed by
GitHub
parent
76cb0eaf1a
commit
6259d0bef3
30
Arduino/nfcReader/PN532_HSU/PN532_HSU.h
Normal file
30
Arduino/nfcReader/PN532_HSU/PN532_HSU.h
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef __PN532_HSU_H__
|
||||
#define __PN532_HSU_H__
|
||||
|
||||
#include "PN532Interface.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
#define PN532_HSU_DEBUG
|
||||
|
||||
#define PN532_HSU_READ_TIMEOUT (1000)
|
||||
|
||||
class PN532_HSU : public PN532Interface {
|
||||
public:
|
||||
PN532_HSU(HardwareSerial &serial);
|
||||
|
||||
void begin();
|
||||
void wakeup();
|
||||
virtual int8_t writeCommand(const uint8_t *header, uint8_t hlen, const uint8_t *body = 0, uint8_t blen = 0);
|
||||
int16_t readResponse(uint8_t buf[], uint8_t len, uint16_t timeout);
|
||||
|
||||
private:
|
||||
HardwareSerial* _serial;
|
||||
uint8_t command;
|
||||
|
||||
int8_t readAckFrame();
|
||||
|
||||
int8_t receive(uint8_t *buf, int len, uint16_t timeout=PN532_HSU_READ_TIMEOUT);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user