knksmith57 / eecs373-actel-mfrc522-spi

Some example code for using the NXP MFRC522 NFC chip via SPI on the Actel SmartFusion dev boards used in EECS 373

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actel A2F200M3F + SunFounder Mifare RC522

Modified version of this arduino code for use with the Actel A2F200M3F boards.

Check out main.c for a quick example program that listens for cards and echos out the ID on contact.

Quickstart

#include <stdio.h>
#include <inttypes.h>
#include "mfrc522.c"

int main() {

  // setup does initial pin config, performs a soft reset on the card, and sets
  // some sane defaults for the SunFounder Mifare RC522 card
  setup();

  // now do what you want

  // if you just wanted to do a simple read or write to a register on the chip,
  // use one of the below commands...
  /*
   * uchar readd = Read_MFRC522(TxControlReg);
   * Write_MFRC522(TxControlReg, 0x03);
  */

  return(0);
}

About

Some example code for using the NXP MFRC522 NFC chip via SPI on the Actel SmartFusion dev boards used in EECS 373


Languages

Language:C 100.0%