aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/AVRISP/Lib/PDITarget.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-03 08:35:32 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-03 08:35:32 +0000
commitf1baf12fae61a13e6d8e88655d709d74977322b5 (patch)
tree3903a0a155f520bac44def96e666352e5fbf224b /Projects/AVRISP/Lib/PDITarget.h
parenta5adbae652bcf5382ef34d71da4d11de15b482a6 (diff)
downloadlufa-f1baf12fae61a13e6d8e88655d709d74977322b5.tar.gz
lufa-f1baf12fae61a13e6d8e88655d709d74977322b5.tar.bz2
lufa-f1baf12fae61a13e6d8e88655d709d74977322b5.zip
Auto-configure AVRISP programmer configuration when built for the XPLAIN board to match the XPLAIN hardware connections.
Diffstat (limited to 'Projects/AVRISP/Lib/PDITarget.h')
-rw-r--r--Projects/AVRISP/Lib/PDITarget.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/Projects/AVRISP/Lib/PDITarget.h b/Projects/AVRISP/Lib/PDITarget.h
index 55a1a9562..f2281fe11 100644
--- a/Projects/AVRISP/Lib/PDITarget.h
+++ b/Projects/AVRISP/Lib/PDITarget.h
@@ -42,16 +42,33 @@
#include <LUFA/Common/Common.h>
+ /* Preprocessor Checks: */
+ #if BOARD == BOARD_XPLAIN
+ #undef ENABLE_SPI_PROTOCOL
+ #define ENABLE_PDI_PROTOCOL
+ #endif
+
/* Defines: */
- #define PDIDATA_LINE_PORT PORTB
- #define PDIDATA_LINE_DDR DDRB
- #define PDIDATA_LINE_PIN PINB
- #define PDIDATA_LINE_MASK (1 << 2)
+ #if BOARD == BOARD_XPLAIN
+ #define PDIDATA_LINE_PORT PORTD
+ #define PDIDATA_LINE_DDR DDRD
+ #define PDIDATA_LINE_PIN PIND
+ #define PDIDATA_LINE_MASK (1 << 2)
+
+ #define PDICLOCK_LINE_PORT PORTD
+ #define PDICLOCK_LINE_DDR DDRD
+ #define PDICLOCK_LINE_MASK (1 << 5)
+ #else
+ #define PDIDATA_LINE_PORT PORTB
+ #define PDIDATA_LINE_DDR DDRB
+ #define PDIDATA_LINE_PIN PINB
+ #define PDIDATA_LINE_MASK (1 << 2)
+
+ #define PDICLOCK_LINE_PORT RESET_LINE_PORT
+ #define PDICLOCK_LINE_DDR RESET_LINE_DDR
+ #define PDICLOCK_LINE_MASK RESET_LINE_MASK
+ #endif
- #define PDICLOCK_LINE_PORT RESET_LINE_PORT
- #define PDICLOCK_LINE_DDR RESET_LINE_DDR
- #define PDICLOCK_LINE_MASK RESET_LINE_MASK
-
#define PDI_CMD_LDS 0x00
#define PDI_CMD_LD 0x20
#define PDI_CMD_STS 0x40