mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
chg: moved flash mem config for spi into flashmem.c
chg: fpgasendcommand, now waits until command has been sent to fpga.
This commit is contained in:
parent
35bdf6a58d
commit
a21ab49f14
6 changed files with 231 additions and 86 deletions
|
@ -2111,7 +2111,6 @@ typedef struct _AT91S_UDP {
|
|||
#define AT91C_PIO_PA1 (1 << 1) // Pin Controlled by PA1
|
||||
#define AT91C_PA1_PWM1 (AT91C_PIO_PA1) // PWM Channel 1
|
||||
#define AT91C_PA1_TIOB0 (AT91C_PIO_PA1) // Timer Counter 0 Multipurpose Timer I/O Pin B
|
||||
#define AT91C_PA1_NPCS3 (AT91C_PIO_PA1) // SPI Peripheral Chip Select 3
|
||||
#define AT91C_PIO_PA2 (1 << 2) // Pin Controlled by PA2
|
||||
#define AT91C_PA2_PWM2 (AT91C_PIO_PA2) // PWM Channel 2
|
||||
#define AT91C_PA2_SCK0 (AT91C_PIO_PA2) // USART 0 Serial Clock
|
||||
|
|
|
@ -19,9 +19,11 @@
|
|||
#define GPIO_LRST AT91C_PIO_PA7
|
||||
#define GPIO_LED_B AT91C_PIO_PA8
|
||||
#define GPIO_LED_C AT91C_PIO_PA9
|
||||
#define GPIO_NCS3 AT91C_PA1_NPCS3
|
||||
#define GPIO_NCS2 AT91C_PA10_NPCS2
|
||||
|
||||
//#define GPIO_NCS2 AT91C_PA10_NPCS2
|
||||
#define GPIO_NCS2 AT91C_PIO_PA1
|
||||
#define GPIO_NCS0 AT91C_PA11_NPCS0
|
||||
|
||||
#define GPIO_MISO AT91C_PA12_MISO
|
||||
#define GPIO_MOSI AT91C_PA13_MOSI
|
||||
#define GPIO_SPCK AT91C_PA14_SPCK
|
||||
|
|
|
@ -82,22 +82,22 @@
|
|||
#define LED_D_ON() HIGH(GPIO_LED_D)
|
||||
#define LED_D_OFF() LOW(GPIO_LED_D)
|
||||
#define LED_D_INV() INVBIT(GPIO_LED_D)
|
||||
|
||||
// SPI
|
||||
#define SCK_LOW LOW(GPIO_SPCK)
|
||||
#define SCK_HIGH HIGH(GPIO_SPCK)
|
||||
#define MOSI_HIGH HIGH(GPIO_MOSI)
|
||||
#define MOSI_LOW LOW(GPIO_MOSI)
|
||||
#define MISO_VALUE (AT91C_BASE_PIOA->PIO_PDSR & GPIO_MISO)
|
||||
|
||||
// fpga
|
||||
#define NCS_0_LOW LOW(GPIO_NCS0)
|
||||
#define NCS_0_HIGH HIGH(GPIO_NCS0)
|
||||
// lcd
|
||||
// lcd - flash mem
|
||||
#define NCS_2_LOW LOW(GPIO_NCS2)
|
||||
#define NCS_2_HIGH HIGH(GPIO_NCS2)
|
||||
// flash mem
|
||||
#define NCS_3_LOW LOW(GPIO_NCS3)
|
||||
#define NCS_3_HIGH HIGH(GPIO_NCS3)
|
||||
|
||||
|
||||
#define MISO_VALUE (AT91C_BASE_PIOA->PIO_PDSR & GPIO_MISO)
|
||||
#define RELAY_ON() HIGH(GPIO_RELAY)
|
||||
#define RELAY_OFF() LOW(GPIO_RELAY)
|
||||
#define BUTTON_PRESS() !((AT91C_BASE_PIOA->PIO_PDSR & GPIO_BUTTON) == GPIO_BUTTON)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue