Auto-configure AVRISP programmer configuration when built for the XPLAIN board to...
[pub/USBasp.git] / Projects / AVRISP / Lib / PDITarget.h
index 55a1a95..f2281fe 100644 (file)
                \r
                #include <LUFA/Common/Common.h>\r
        \r
+       /* Preprocessor Checks: */\r
+               #if BOARD == BOARD_XPLAIN\r
+                       #undef  ENABLE_SPI_PROTOCOL\r
+                       #define ENABLE_PDI_PROTOCOL\r
+               #endif\r
+\r
        /* Defines: */\r
-               #define PDIDATA_LINE_PORT     PORTB\r
-               #define PDIDATA_LINE_DDR      DDRB\r
-               #define PDIDATA_LINE_PIN      PINB\r
-               #define PDIDATA_LINE_MASK     (1 << 2)\r
+               #if BOARD == BOARD_XPLAIN\r
+                       #define PDIDATA_LINE_PORT     PORTD\r
+                       #define PDIDATA_LINE_DDR      DDRD\r
+                       #define PDIDATA_LINE_PIN      PIND\r
+                       #define PDIDATA_LINE_MASK     (1 << 2)\r
+                       \r
+                       #define PDICLOCK_LINE_PORT    PORTD\r
+                       #define PDICLOCK_LINE_DDR     DDRD\r
+                       #define PDICLOCK_LINE_MASK    (1 << 5)\r
+               #else\r
+                       #define PDIDATA_LINE_PORT     PORTB\r
+                       #define PDIDATA_LINE_DDR      DDRB\r
+                       #define PDIDATA_LINE_PIN      PINB\r
+                       #define PDIDATA_LINE_MASK     (1 << 2)\r
+                       \r
+                       #define PDICLOCK_LINE_PORT    RESET_LINE_PORT\r
+                       #define PDICLOCK_LINE_DDR     RESET_LINE_DDR\r
+                       #define PDICLOCK_LINE_MASK    RESET_LINE_MASK\r
+               #endif\r
                \r
-               #define PDICLOCK_LINE_PORT    RESET_LINE_PORT\r
-               #define PDICLOCK_LINE_DDR     RESET_LINE_DDR\r
-               #define PDICLOCK_LINE_MASK    RESET_LINE_MASK\r
-\r
                #define PDI_CMD_LDS           0x00\r
                #define PDI_CMD_LD            0x20\r
                #define PDI_CMD_STS           0x40\r