1
0
Fork 0

Add SPI and RFID-RC522 pin definitions for Arduino Mega

This commit is contained in:
Silver Kits 2016-12-05 12:12:03 +02:00
parent 4dde6ad12f
commit c55ff6b1c0
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#ifndef MAT_HWDEFS_H
#define MAT_HWDEFS_H
#define DDR(x) (*(&x - 1))
#define PIN(x) (*(&x - 2))
#define MFRC522_SS_PORT PORTB
#define MFRC522_SS_BIT 0
#define MFRC522_RST_PORT PORTL
#define MFRC522_RST_BIT 0
#define SCK_DDR DDRB
#define SCK_BIT DDB1
#define MOSI_DDR DDRB
#define MOSI_BIT DDB2
#define MISO_DDR DDRB
#define MISO_BIT DDB3
#endif