X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/391a974f53b8344d2dd1e04dab382bb5d397916d..e73e717239300d6b47d5f5d81256d8feb493299f:/armsrc/fpga.c diff --git a/armsrc/fpga.c b/armsrc/fpga.c deleted file mode 100644 index 059fc82a..00000000 --- a/armsrc/fpga.c +++ /dev/null @@ -1,232 +0,0 @@ -//----------------------------------------------------------------------------- -// Routines to load the FPGA image, and then to configure the FPGA's major -// mode once it is configured. -// -// Jonathan Westhues, April 2006 -//----------------------------------------------------------------------------- -#include -#include "apps.h" - -//----------------------------------------------------------------------------- -// Set up the Serial Peripheral Interface as master -// Used to write the FPGA config word -// May also be used to write to other SPI attached devices like an LCD -//----------------------------------------------------------------------------- -void SetupSpi(int mode) -{ - // PA10 -> SPI_NCS2 chip select (LCD) - // PA11 -> SPI_NCS0 chip select (FPGA) - // PA12 -> SPI_MISO Master-In Slave-Out - // PA13 -> SPI_MOSI Master-Out Slave-In - // PA14 -> SPI_SPCK Serial Clock - - // Disable PIO control of the following pins, allows use by the SPI peripheral - PIO_DISABLE = (1 << GPIO_NCS0) | - (1 << GPIO_NCS2) | - (1 << GPIO_MISO) | - (1 << GPIO_MOSI) | - (1 << GPIO_SPCK); - - PIO_PERIPHERAL_A_SEL = (1 << GPIO_NCS0) | - (1 << GPIO_MISO) | - (1 << GPIO_MOSI) | - (1 << GPIO_SPCK); - - PIO_PERIPHERAL_B_SEL = (1 << GPIO_NCS2); - - //enable the SPI Peripheral clock - PMC_PERIPHERAL_CLK_ENABLE = (1<