Oops - fix Host mode pre-enumeration settle delay being ignored leading to failure...
[pub/USBasp.git] / Projects / AVRISP / Lib / PDITarget.h
index 55a1a95..294d1a9 100644 (file)
                \r
                #include <LUFA/Common/Common.h>\r
        \r
+       /* Preprocessor Checks: */\r
+               #if (BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)\r
+                       #undef  ENABLE_ISP_PROTOCOL\r
+                       \r
+                       #if !defined(ENABLE_PDI_PROTOCOL)\r
+                               #define ENABLE_PDI_PROTOCOL\r
+                       #endif\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