X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/a5adbae652bcf5382ef34d71da4d11de15b482a6..a925407588726cf6c0587e932b56b3b6257529e0:/Projects/AVRISP/Lib/PDITarget.h?ds=sidebyside diff --git a/Projects/AVRISP/Lib/PDITarget.h b/Projects/AVRISP/Lib/PDITarget.h index 55a1a9562..294d1a98b 100644 --- a/Projects/AVRISP/Lib/PDITarget.h +++ b/Projects/AVRISP/Lib/PDITarget.h @@ -42,16 +42,36 @@ #include + /* Preprocessor Checks: */ + #if (BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1) + #undef ENABLE_ISP_PROTOCOL + + #if !defined(ENABLE_PDI_PROTOCOL) + #define ENABLE_PDI_PROTOCOL + #endif + #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