summaryrefslogtreecommitdiff
path: root/at91lib
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-27 12:45:51 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-27 12:45:51 +0200
commit4ae5814b6966600106cfd9652140cf677f39c2a8 (patch)
tree8af88824304f8aeae65c43aab7cdec896b62d1e6 /at91lib
parenta44e5d716e31769cca8c4e1f026daa304ef5c5c5 (diff)
modify simtrace board.h to reflect simtrace hardware
modify simtrace board.h to reflect simtrace hardware Update Makefile to use simtrace board
Diffstat (limited to 'at91lib')
-rw-r--r--at91lib/boards/simtrace/board.h76
1 files changed, 10 insertions, 66 deletions
diff --git a/at91lib/boards/simtrace/board.h b/at91lib/boards/simtrace/board.h
index 1b28675..5ef2291 100644
--- a/at91lib/boards/simtrace/board.h
+++ b/at91lib/boards/simtrace/board.h
@@ -93,7 +93,7 @@
// Board
//------------------------------------------------------------------------------
/// String containing the name of the board.
-#define BOARD_NAME "AT91SAM7S-EK"
+#define BOARD_NAME "Osmocom SIMtrace"
/// Board definition.
#define at91sam7sek
/// Family definition.
@@ -145,8 +145,8 @@
#define BOARD_USB_ENDPOINTS_BANKS(i) (((i == 0) || (i == 3)) ? 1 : 2)
/// USB attributes configuration descriptor (bus or self powered, remote wakeup)
-#define BOARD_USB_BMATTRIBUTES USBConfigurationDescriptor_SELFPOWERED_NORWAKEUP
-//#define BOARD_USB_BMATTRIBUTES USBConfigurationDescriptor_BUSPOWERED_NORWAKEUP
+//#define BOARD_USB_BMATTRIBUTES USBConfigurationDescriptor_SELFPOWERED_NORWAKEUP
+#define BOARD_USB_BMATTRIBUTES USBConfigurationDescriptor_BUSPOWERED_NORWAKEUP
//#define BOARD_USB_BMATTRIBUTES USBConfigurationDescriptor_SELFPOWERED_RWAKEUP
//------------------------------------------------------------------------------
@@ -157,38 +157,18 @@
#define PINS_DBGU {0x00000600, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
/// LED #0 pin definition (PA0).
-#define PIN_LED_DS1 {1 << 0, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
+#define PIN_LED_DS1 {1 << 18, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
/// LED #1 pin definition (PA1).
-#define PIN_LED_DS2 {1 << 1, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
-/// LED #2 pin definition (PA2).
-#define PIN_LED_DS3 {1 << 2, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
-/// LED #3 pin definition (PA3).
-#define PIN_LED_DS4 {1 << 3, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
-/// List of the four LED pin definitions (PA0, PA1, PA2 & PA3)
-#define PINS_LEDS PIN_LED_DS1, PIN_LED_DS2, PIN_LED_DS3, PIN_LED_DS4
+#define PIN_LED_DS2 {1 << 17, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
+/// List of the two LED pin definitions (PA0, PA1, PA2 & PA3)
+#define PINS_LEDS PIN_LED_DS1, PIN_LED_DS2
/// Push button #0 definition (PA19).
#define PIN_PUSHBUTTON_1 {1 << 19, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
-/// Push button #1 definition (PA20).
-#define PIN_PUSHBUTTON_2 {1 << 20, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
-/// Push button #2 definition (PA15).
-#define PIN_PUSHBUTTON_3 {1 << 15, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
-/// Push button #3 definition (PA14).
-#define PIN_PUSHBUTTON_4 {1 << 14, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
/// List of all push button definitions (PA19, PA20, PA15 & PA14).
-#define PINS_PUSHBUTTONS PIN_PUSHBUTTON_1, PIN_PUSHBUTTON_2, PIN_PUSHBUTTON_3, PIN_PUSHBUTTON_4
+#define PINS_PUSHBUTTONS PIN_PUSHBUTTON_1
/// Push button #1 index.
#define PUSHBUTTON_BP1 0
-/// Push button #2 index.
-#define PUSHBUTTON_BP2 1
-/// Push button #1 index.
-#define PUSHBUTTON_BP3 2
-/// Push button #2 index.
-#define PUSHBUTTON_BP4 3
-/// Simulated joystick LEFT index.
-#define JOYSTICK_LEFT 0
-/// Simulated joystick RIGHT index.
-#define JOYSTICK_RIGHT 1
/// USART0 TXD pin definition (PA5).
#define PIN_USART0_RXD {1 << 5, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
@@ -211,45 +191,9 @@
#define PINS_SPI PIN_SPI_MISO, PIN_SPI_MOSI, PIN_SPI_SPCK
/// SPI chip select 0 pin definition (PA11).
#define PIN_SPI_NPCS0 {1 << 11, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-/// SPI chip select 1
-#define PIN_SPI_NPCS1 {1 << 31, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-/// SPI chip select 2
-#define PIN_SPI_NPCS2 {1 << 10, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
-/// SPI chip select 3
-#define PIN_SPI_NPCS3 {1 << 3, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
-
-/// PWMC PWM0 pin definition (PA0).
-#define PIN_PWMC_PWM0 {1 << 0, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-/// PWMC PWM0 pin definition (PA1).
-#define PIN_PWMC_PWM1 {1 << 1, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-/// PWMC PWM0 pin definition (PA2).
-#define PIN_PWMC_PWM2 {1 << 2, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-
-/// PWM pin definition for LED0
-#define PIN_PWM_LED0 PIN_PWMC_PWM1
-/// PWM pin definition for LED1
-#define PIN_PWM_LED1 PIN_PWMC_PWM2
-/// PWM channel for LED0
-#define CHANNEL_PWM_LED0 1
-/// PWM channel for LED1
-#define CHANNEL_PWM_LED1 2
-
-/// TWI pins definition. Contains TWD (PA3) and TWCK (PA4).
-#define PINS_TWI {0x00000018, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
-
-/// ADC_AD0 pin definition.
-#define PIN_ADC_AD0 {1 << 17, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD1 pin definition.
-#define PIN_ADC_AD1 {1 << 18, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD2 pin definition. (mixed with PIN_PUSHBUTTON_1)
-#define PIN_ADC_AD2 {1 << 19, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
-/// ADC_AD3 pin definition. (mixed with PIN_PUSHBUTTON_2)
-#define PIN_ADC_AD3 {1 << 20, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
-/// Pins ADC
-#define PINS_ADC PIN_ADC_AD0, PIN_ADC_AD1, PIN_ADC_AD2, PIN_ADC_AD3
/// USB VBus monitoring pin definition (PA13).
-#define PIN_USB_VBUS {1 << 13, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
+//#define PIN_USB_VBUS {1 << 13, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
/// USB pull-up control pin definition (PA16).
#define PIN_USB_PULLUP {1 << 16, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
//------------------------------------------------------------------------------
@@ -290,7 +234,7 @@
/// - PINS_ISO7816
/// Smartcard detection pin
-#define PIN_SMARTCARD_CONNECT {1 << 5, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
+#define PIN_SMARTCARD_CONNECT {1 << 8, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
/// PIN used for reset the smartcard
#define PIN_ISO7816_RSTMC {1 << 7, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
/// Pins used for connect the smartcard
personal git repositories of Harald Welte. Your mileage may vary