Add SPI speed option + Various minor changes (#276)
+ Change default SPI speed to SPI_CLOCK_DIV4
This commit is contained in:
committed by
Rotzbua
parent
5f6c8f9a01
commit
12a00174b5
14
MFRC522.h
14
MFRC522.h
@@ -78,6 +78,8 @@
|
||||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
|
||||
#define MFRC522_SPICLOCK SPI_CLOCK_DIV4 // MFRC522 accept upto 10MHz
|
||||
|
||||
// Firmware data for self-test
|
||||
// Reference values based on firmware version
|
||||
// Hint: if needed, you can remove unused self-test data to save flash memory
|
||||
@@ -328,13 +330,13 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// Basic interface functions for communicating with the MFRC522
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
void PCD_WriteRegister(byte reg, byte value);
|
||||
void PCD_WriteRegister(byte reg, byte count, byte *values);
|
||||
byte PCD_ReadRegister(byte reg);
|
||||
void PCD_ReadRegister(byte reg, byte count, byte *values, byte rxAlign = 0);
|
||||
void PCD_WriteRegister(PCD_Register reg, byte value);
|
||||
void PCD_WriteRegister(PCD_Register reg, byte count, byte *values);
|
||||
byte PCD_ReadRegister(PCD_Register reg);
|
||||
void PCD_ReadRegister(PCD_Register reg, byte count, byte *values, byte rxAlign = 0);
|
||||
void setBitMask(unsigned char reg, unsigned char mask);
|
||||
void PCD_SetRegisterBitMask(byte reg, byte mask);
|
||||
void PCD_ClearRegisterBitMask(byte reg, byte mask);
|
||||
void PCD_SetRegisterBitMask(PCD_Register reg, byte mask);
|
||||
void PCD_ClearRegisterBitMask(PCD_Register reg, byte mask);
|
||||
StatusCode PCD_CalculateCRC(byte *data, byte length, byte *result);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user