First check in.

This commit is contained in:
iceman1001 2014-09-11 23:23:46 +02:00
commit f38a152863
103 changed files with 10544 additions and 508 deletions

View file

@ -11,7 +11,7 @@
#ifndef _MIFARE_H_
#define _MIFARE_H_
#include "common.h"
#include "../include/common.h"
//-----------------------------------------------------------------------------
// ISO 14443A

View file

@ -14,6 +14,7 @@
// Might as well have the hardware-specific defines everywhere.
#include "at91sam7s512.h"
#include "config_gpio.h"
#include "usb_cmd.h"
#define WDT_HIT() AT91C_BASE_WDTC->WDTC_WDCR = 0xa5000001
@ -67,8 +68,6 @@
#define TRUE 1
#define FALSE 0
#include <usb_cmd.h>
//#define PACKED __attribute__((__packed__))
#define LED_A_ON() HIGH(GPIO_LED_A)

View file

@ -117,6 +117,8 @@ typedef struct {
#define CMD_SNOOP_ICLASS 0x0392
#define CMD_SIMULATE_TAG_ICLASS 0x0393
#define CMD_READER_ICLASS 0x0394
#define CMD_READER_ICLASS_REPLAY 0x0395
#define CMD_ICLASS_ISO14443A_WRITE 0x0397
// For measurements of the antenna tuning
#define CMD_MEASURE_ANTENNA_TUNING 0x0400
@ -151,6 +153,19 @@ typedef struct {
#define CMD_MIFARE_CHKKEYS 0x0623
#define CMD_MIFARE_SNIFFER 0x0630
//ultralightC
#define CMD_MIFAREUC_AUTH1 0x0724
#define CMD_MIFAREUC_AUTH2 0x0725
#define CMD_MIFAREUC_READCARD 0x0726
// mifare desfire
#define CMD_MIFARE_DESFIRE_READBL 0x0728
#define CMD_MIFARE_DESFIRE_WRITEBL 0x0729
#define CMD_MIFARE_DESFIRE_AUTH1 0x072a
#define CMD_MIFARE_DESFIRE_AUTH2 0x072b
#define CMD_MIFARE_DES_READER 0x072c
#define CMD_MIFARE_DESFIRE_INFO 0x072d
#define CMD_UNKNOWN 0xFFFF
@ -162,6 +177,8 @@ typedef struct {
#define FLAG_NR_AR_ATTACK 0x08
//Iclass reader flags
#define FLAG_ICLASS_READER_ONLY_ONCE 0x01
// CMD_DEVICE_INFO response packet has flags in arg[0], flag definitions:
/* Whether a bootloader that understands the common_area is present */